🧩 DataRec: A Python Library for Standardized and Reproducible Data Management in Recommender Systems
DataRec focuses on the data management phase of recommender systems, promoting standardization, interoperability, and best practices for data filtering, splitting, analysis, and export.
Official repository of the paper:
📄 DataRec: A Python Library for Standardized and Reproducible Data Management in Recommender Systems (SIGIR 2025) doi
📑 Table of Contents
- Features
- Installation
- Quickstart
- Datasets
- Documentation
- Contributing
- Citation
- Authors and Contributors
- Related Projects
- License
Features ✨
- Dataset Management: multi-format I/O with dynamic schema specification.
- Reference Datasets: curated, versioned, and traceable datasets.
- Filtering Strategies: widely used user/item interaction filters.
- Splitting Strategies: temporal and random splits for reproducible evaluation.
- Data Characteristics: compute dataset-level statistics (e.g., sparsity, popularity).
- Interoperability: export datasets to external recommendation frameworks.
Installation
From PyPI
pip install datarec
Migration from datarec-lib
datarec-lib has been renamed to datarec. The Python import package
remains datarec, so existing imports such as from datarec.datasets import ...
do not need to change. Please update dependency files and installation commands
to use datarec.
From source (recommended for development)
git clone https://github.com/sisinflab/DataRec.git
cd DataRec
python3.9 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
# editable mode + optional dependency groups (defined in pyproject.toml)
pip install -e '.[dev,docs]'
Quickstart 🚀
from datarec.datasets import AmazonOffice
from datarec.processing import FilterOutDuplicatedInteractions, UserItemIterativeKCore
from datarec.splitters import RandomHoldOut
# 1️⃣ Load a reference dataset
data = AmazonOffice(version='2014').prepare_and_load()
# 2️⃣ Apply preprocessing filters
data = FilterOutDuplicatedInteractions().run(data)
data = UserItemIterativeKCore(cores=5).run(data)
# 3️⃣ Split into train/validation/test
splitter = RandomHoldOut(test_ratio=0.2, val_ratio=0.1, seed=42)
splits = splitter.run(data)
train, val, test = splits['train'], splits['val'], splits['test']
Pipeline paths
When using YAML pipelines, store only filenames in the steps and pass the base folders at runtime:
from datarec.pipeline import Pipeline
pipeline = Pipeline.from_yaml("create_pipeline.yml")
pipeline.apply(input_folder="./data", output_folder="./outputs")
For file loaders use filename (instead of path) and for export steps use filename
(instead of output_path) in the YAML.
Datasets 📊
The complete and up-to-date list of datasets (with metadata and statistics) is available in the documentation:
Documentation 📚
Full documentation available at: https://sisinflab.github.io/DataRec/
Includes API reference, guides, tutorials, and dataset overview.
Contributing 🤝
Contributions are welcome!
To contribute:
- Create a feature/fix branch.
- Add tests and documentation updates as needed.
- Run tests before pushing.
- Open a pull request describing your changes clearly.
The project also receives updates from a private development repository maintained by SisInfLab.
Citation 📖
If you use DataRec in your research, please cite our SIGIR 2025 paper:
@inproceedings{DBLP:conf/sigir/MancinoBF0MPN25,
author = {Alberto Carlo Maria Mancino and
Salvatore Bufi and
Angela Di Fazio and
Antonio Ferrara and
Daniele Malitesta and
Claudio Pomo and
Tommaso Di Noia},
title = {DataRec: {A} Python Library for Standardized and Reproducible Data
Management in Recommender Systems},
booktitle = {{SIGIR}},
pages = {3478--3487},
publisher = {{ACM}},
year = {2025}
}
Authors and Contributors 👥
Authors
- Alberto Carlo Maria Mancino (Politecnico di Bari)
- Salvatore Bufi
- Angela Di Fazio
- Daniele Malitesta
- Antonio Ferrara
- Claudio Pomo
- Tommaso Di Noia
Contributors
Alberto C. M. Mancino |
Angela Di Fazio |
Salvatore Bufi |
Giuseppe Fasano |
Gianluca Colonna |
Maria L. N. De Bonis |
Marco Valentini |
Related Projects 🧩
- Ducho — library for multimodal representation learning: https://github.com/sisinflab/Ducho
- D&D4Rec Tutorial (RecSys 2025) — Standard Practices for Data Processing and Multimodal Feature Extraction in Recommendation with DataRec and Ducho:
https://sites.google.com/view/dd4rec-tutorial/home
License 📜
Distributed under the MIT License.
See LICENSE.
Maintained with ❤️ by SisInfLab
Metadata
Release files for datarec 1.5.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| datarec-1.5.7.tar.gz | 119.1 kB | Without provenance | Details for datarec-1.5.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| datarec-1.5.7-py3-none-any.whl | Python 3 | none | any | Details for datarec-1.5.7-py3-none-any.whl |
Total release size: 318.7 kB
Release files / datarec-1.5.7.tar.gz
| Download URL | datarec-1.5.7.tar.gz |
|---|---|
| Size | 119.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
954349dd17a9836620f8ade3a849a90adadd188b1f383c046a9452d6b6d5494a
|
|
BLAKE2b-256 checksum How to use checksums |
371879264c9987599aa21a2882541d4ddc7eca1413f5929a3437aec8fecdff01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.18
|
Release files / datarec-1.5.7-py3-none-any.whl
| Download URL | datarec-1.5.7-py3-none-any.whl |
|---|---|
| Size | 199.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
769ccd47a54e6261be157c2e9d49257f46b8305709a0d932cbc6721928d9825a
|
|
BLAKE2b-256 checksum How to use checksums |
bb71e0a16eaaef0523ef1c9cd81afc77b3cc984e8b115378c8a71192ac741fef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.18
|
Security for datarec 1.5.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.