RecBole is a unified, comprehensive, and efficient Python library for recommendation systems, built on PyTorch. It provides a wide array of state-of-the-art recommendation models and datasets, featuring standardized data processing, training, and evaluation pipelines. The library undergoes active development, with major updates and new versions typically released every few months, incorporating user feedback and architectural improvements.
pip install recboleVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to run a basic BPR recommendation model on the `ml-100k` dataset using `run_recbole`. RecBole will automatically download and preprocess the dataset if not found. The configuration dictionary allows for inline specification of model, dataset, and evaluation parameters without needing a separate YAML file.
Review the official documentation for the specific version you are upgrading to. Pay close attention to changes in data loading, dataset preparation (e.g., `create_dataset`), and how configuration objects (`Config`) are initialized and passed.
For GPU usage, ensure your system has a compatible CUDA toolkit installed. Then, use `pip install recbole[gpu]` or `pip install recbole torch==X.Y.Z+cuXXX` where `X.Y.Z` and `cuXXX` match your CUDA version and desired PyTorch build. Always check the official PyTorch installation guide for the correct command.
Ensure your dataset files are correctly placed in the `dataset` directory (e.g., `dataset/ml-100k/ml-100k.inter`). For custom datasets, carefully follow the data format specification in the RecBole documentation. Use `config['data_path']` if your dataset is not in the default location.