├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── bug_report_CN.md │ ├── feature_request.md │ └── feature_request_CN.md └── workflows │ └── python-package.yml ├── .gitignore ├── LICENSE ├── MANIFEST.in ├── README.md ├── README_CN.md ├── asset ├── dataset_list.json ├── framework.png ├── hyper_tune_configs │ ├── context │ │ ├── avazu-2m_context.md │ │ ├── criteo-4m_context.md │ │ └── ml-1m_context.md │ ├── general │ │ ├── amazon-books_general.md │ │ ├── ml-1m_general.md │ │ └── yelp_general.md │ ├── knowledge │ │ ├── amazon-books_kg.md │ │ ├── lastfm-track_kg.md │ │ └── ml-1m_kg.md │ └── sequential │ │ ├── amazon-books_seq.md │ │ ├── ml-1m_seq.md │ │ └── yelp_seq.md ├── logo.png ├── model_list.json ├── new.gif ├── questionnaire.xlsx └── time_test_result │ ├── Context-aware_recommendation.md │ ├── General_recommendation.md │ ├── Knowledge-based_recommendation.md │ └── Sequential_recommendation.md ├── conda ├── build.sh ├── conda_release.sh └── meta.yaml ├── dataset └── ml-100k │ ├── ml-100k.inter │ ├── ml-100k.item │ └── ml-100k.user ├── docs ├── Makefile └── source │ ├── asset │ ├── afm.jpg │ ├── autoint.png │ ├── bert4rec.png │ ├── bpr.png │ ├── caser.png │ ├── cdae.png │ ├── cke.png │ ├── convncf.png │ ├── core.png │ ├── data_flow_en.png │ ├── dcn.png │ ├── dcnv2.png │ ├── ddp.png │ ├── deepfm.png │ ├── dgcf.jpg │ ├── dien.png │ ├── diffrec.png │ ├── din.png │ ├── dmf.jpg │ ├── dssm.png │ ├── enmf.jpg │ ├── eulernet.png │ ├── evaluation.png │ ├── fdsa.png │ ├── fearec.png │ ├── ffm.png │ ├── fignn.png │ ├── fm.png │ ├── fnn.png │ ├── fossil.jpg │ ├── fpmc.png │ ├── framework.png │ ├── fwfm.png │ ├── gcmc.png │ ├── gcsan.png │ ├── gru4rec.png │ ├── gru4recf.png │ ├── hgn.jpg │ ├── hrm.jpg │ ├── hyper_tuning.png │ ├── kd_dagfm.png │ ├── kgat.png │ ├── kgcn.png │ ├── kgin.png │ ├── kgnnls.png │ ├── ksr.jpg │ ├── ktup.png │ ├── ldiffrec.png │ ├── lightgcn.png │ ├── lightsans.png │ ├── line.png │ ├── logo.png │ ├── lr.png │ ├── macridvae.png │ ├── mcclk.png │ ├── mkr.png │ ├── multidae.png │ ├── multivae.png │ ├── nais.png │ ├── narm.png │ ├── ncl.png │ ├── neumf.png │ ├── nextitnet.png │ ├── nfm.jpg │ ├── ngcf.jpg │ ├── nncf.png │ ├── npe.jpg │ ├── pnn.jpg │ ├── ract.png │ ├── recvae.png │ ├── repeatnet.jpg │ ├── ripplenet.jpg │ ├── s3rec.png │ ├── sasrec.png │ ├── sgl.png │ ├── shan.jpg │ ├── simplex.png │ ├── sine.png │ ├── spectralcf.png │ ├── srgnn.png │ ├── stamp.png │ ├── tensorboard_1.png │ ├── tensorboard_2.png │ ├── transrec.png │ ├── widedeep.png │ └── xdeepfm.png │ ├── conf.py │ ├── developer_guide │ ├── customize_dataloaders.rst │ ├── customize_metrics.rst │ ├── customize_models.rst │ ├── customize_samplers.rst │ └── customize_trainers.rst │ ├── get_started │ ├── distributed_training.rst │ ├── install.rst │ ├── quick_start.rst │ └── started │ │ ├── context-aware.rst │ │ ├── general.rst │ │ ├── knowledge-based.rst │ │ └── sequential.rst │ ├── index.rst │ ├── recbole │ ├── recbole.config.configurator.rst │ ├── recbole.data.dataloader.abstract_dataloader.rst │ ├── recbole.data.dataloader.general_dataloader.rst │ ├── recbole.data.dataloader.knowledge_dataloader.rst │ ├── recbole.data.dataloader.rst │ ├── recbole.data.dataloader.user_dataloader.rst │ ├── recbole.data.dataset.customized_dataset.rst │ ├── recbole.data.dataset.dataset.rst │ ├── recbole.data.dataset.kg_dataset.rst │ ├── recbole.data.dataset.kg_seq_dataset.rst │ ├── recbole.data.dataset.rst │ ├── recbole.data.dataset.sequential_dataset.rst │ ├── recbole.data.interaction.rst │ ├── recbole.data.rst │ ├── recbole.data.utils.rst │ ├── recbole.evaluator.base_metric.rst │ ├── recbole.evaluator.collector.rst │ ├── recbole.evaluator.evaluator.rst │ ├── recbole.evaluator.metrics.rst │ ├── recbole.evaluator.register.rst │ ├── recbole.evaluator.rst │ ├── recbole.evaluator.utils.rst │ ├── recbole.model.abstract_recommender.rst │ ├── recbole.model.context_aware_recommender.afm.rst │ ├── recbole.model.context_aware_recommender.autoint.rst │ ├── recbole.model.context_aware_recommender.dcn.rst │ ├── recbole.model.context_aware_recommender.dcnv2.rst │ ├── recbole.model.context_aware_recommender.deepfm.rst │ ├── recbole.model.context_aware_recommender.dssm.rst │ ├── recbole.model.context_aware_recommender.eulernet.rst │ ├── recbole.model.context_aware_recommender.ffm.rst │ ├── recbole.model.context_aware_recommender.fignn.rst │ ├── recbole.model.context_aware_recommender.fm.rst │ ├── recbole.model.context_aware_recommender.fnn.rst │ ├── recbole.model.context_aware_recommender.fwfm.rst │ ├── recbole.model.context_aware_recommender.kd_dagfm.rst │ ├── recbole.model.context_aware_recommender.lr.rst │ ├── recbole.model.context_aware_recommender.nfm.rst │ ├── recbole.model.context_aware_recommender.pnn.rst │ ├── recbole.model.context_aware_recommender.rst │ ├── recbole.model.context_aware_recommender.widedeep.rst │ ├── recbole.model.context_aware_recommender.xdeepfm.rst │ ├── recbole.model.exlib_recommender.lightgbm.rst │ ├── recbole.model.exlib_recommender.rst │ ├── recbole.model.exlib_recommender.xgboost.rst │ ├── recbole.model.general_recommender.admmslim.rst │ ├── recbole.model.general_recommender.asymknn.rst │ ├── recbole.model.general_recommender.bpr.rst │ ├── recbole.model.general_recommender.cdae.rst │ ├── recbole.model.general_recommender.convncf.rst │ ├── recbole.model.general_recommender.dgcf.rst │ ├── recbole.model.general_recommender.diffrec.rst │ ├── recbole.model.general_recommender.dmf.rst │ ├── recbole.model.general_recommender.ease.rst │ ├── recbole.model.general_recommender.enmf.rst │ ├── recbole.model.general_recommender.fism.rst │ ├── recbole.model.general_recommender.gcmc.rst │ ├── recbole.model.general_recommender.itemknn.rst │ ├── recbole.model.general_recommender.ldiffrec.rst │ ├── recbole.model.general_recommender.lightgcn.rst │ ├── recbole.model.general_recommender.line.rst │ ├── recbole.model.general_recommender.macridvae.rst │ ├── recbole.model.general_recommender.multidae.rst │ ├── recbole.model.general_recommender.multivae.rst │ ├── recbole.model.general_recommender.nais.rst │ ├── recbole.model.general_recommender.nceplrec.rst │ ├── recbole.model.general_recommender.ncl.rst │ ├── recbole.model.general_recommender.neumf.rst │ ├── recbole.model.general_recommender.ngcf.rst │ ├── recbole.model.general_recommender.nncf.rst │ ├── recbole.model.general_recommender.pop.rst │ ├── recbole.model.general_recommender.ract.rst │ ├── recbole.model.general_recommender.random.rst │ ├── recbole.model.general_recommender.recvae.rst │ ├── recbole.model.general_recommender.rst │ ├── recbole.model.general_recommender.sgl.rst │ ├── recbole.model.general_recommender.simplex.rst │ ├── recbole.model.general_recommender.slimelastic.rst │ ├── recbole.model.general_recommender.spectralcf.rst │ ├── recbole.model.init.rst │ ├── recbole.model.knowledge_aware_recommender.cfkg.rst │ ├── recbole.model.knowledge_aware_recommender.cke.rst │ ├── recbole.model.knowledge_aware_recommender.kgat.rst │ ├── recbole.model.knowledge_aware_recommender.kgcn.rst │ ├── recbole.model.knowledge_aware_recommender.kgin.rst │ ├── recbole.model.knowledge_aware_recommender.kgnnls.rst │ ├── recbole.model.knowledge_aware_recommender.ktup.rst │ ├── recbole.model.knowledge_aware_recommender.mcclk.rst │ ├── recbole.model.knowledge_aware_recommender.mkr.rst │ ├── recbole.model.knowledge_aware_recommender.ripplenet.rst │ ├── recbole.model.knowledge_aware_recommender.rst │ ├── recbole.model.layers.rst │ ├── recbole.model.loss.rst │ ├── recbole.model.rst │ ├── recbole.model.sequential_recommender.bert4rec.rst │ ├── recbole.model.sequential_recommender.caser.rst │ ├── recbole.model.sequential_recommender.core.rst │ ├── recbole.model.sequential_recommender.dien.rst │ ├── recbole.model.sequential_recommender.din.rst │ ├── recbole.model.sequential_recommender.fdsa.rst │ ├── recbole.model.sequential_recommender.fearec.rst │ ├── recbole.model.sequential_recommender.fossil.rst │ ├── recbole.model.sequential_recommender.fpmc.rst │ ├── recbole.model.sequential_recommender.gcsan.rst │ ├── recbole.model.sequential_recommender.gru4rec.rst │ ├── recbole.model.sequential_recommender.gru4reccpr.rst │ ├── recbole.model.sequential_recommender.gru4recf.rst │ ├── recbole.model.sequential_recommender.gru4reckg.rst │ ├── recbole.model.sequential_recommender.hgn.rst │ ├── recbole.model.sequential_recommender.hrm.rst │ ├── recbole.model.sequential_recommender.ksr.rst │ ├── recbole.model.sequential_recommender.lightsans.rst │ ├── recbole.model.sequential_recommender.narm.rst │ ├── recbole.model.sequential_recommender.nextitnet.rst │ ├── recbole.model.sequential_recommender.npe.rst │ ├── recbole.model.sequential_recommender.repeatnet.rst │ ├── recbole.model.sequential_recommender.rst │ ├── recbole.model.sequential_recommender.s3rec.rst │ ├── recbole.model.sequential_recommender.sasrec.rst │ ├── recbole.model.sequential_recommender.sasreccpr.rst │ ├── recbole.model.sequential_recommender.sasrecf.rst │ ├── recbole.model.sequential_recommender.shan.rst │ ├── recbole.model.sequential_recommender.sine.rst │ ├── recbole.model.sequential_recommender.srgnn.rst │ ├── recbole.model.sequential_recommender.stamp.rst │ ├── recbole.model.sequential_recommender.transrec.rst │ ├── recbole.quick_start.quick_start.rst │ ├── recbole.sampler.sampler.rst │ ├── recbole.trainer.hyper_tuning.rst │ ├── recbole.trainer.trainer.rst │ ├── recbole.utils.case_study.rst │ ├── recbole.utils.enum_type.rst │ ├── recbole.utils.logger.rst │ └── recbole.utils.utils.rst │ └── user_guide │ ├── config │ ├── data_settings.rst │ ├── environment_settings.rst │ ├── evaluation_settings.rst │ ├── parameters_configuration.rst │ └── training_settings.rst │ ├── config_settings.rst │ ├── data │ ├── atomic_files.rst │ ├── data_flow.rst │ ├── dataset_download.rst │ ├── interaction.rst │ └── label_of_data.rst │ ├── data_intro.rst │ ├── model │ ├── context │ │ ├── afm.rst │ │ ├── autoint.rst │ │ ├── dcn.rst │ │ ├── dcnv2.rst │ │ ├── deepfm.rst │ │ ├── dien.rst │ │ ├── din.rst │ │ ├── dssm.rst │ │ ├── eulernet.rst │ │ ├── ffm.rst │ │ ├── fignn.rst │ │ ├── fm.rst │ │ ├── fnn.rst │ │ ├── fwfm.rst │ │ ├── kd_dagfm.rst │ │ ├── lightgbm.rst │ │ ├── lr.rst │ │ ├── nfm.rst │ │ ├── pnn.rst │ │ ├── widedeep.rst │ │ ├── xdeepfm.rst │ │ └── xgboost.rst │ ├── general │ │ ├── admmslim.rst │ │ ├── asymknn.rst │ │ ├── bpr.rst │ │ ├── cdae.rst │ │ ├── convncf.rst │ │ ├── dgcf.rst │ │ ├── diffrec.rst │ │ ├── dmf.rst │ │ ├── ease.rst │ │ ├── enmf.rst │ │ ├── fism.rst │ │ ├── gcmc.rst │ │ ├── itemknn.rst │ │ ├── ldiffrec.rst │ │ ├── lightgcn.rst │ │ ├── line.rst │ │ ├── macridvae.rst │ │ ├── multidae.rst │ │ ├── multivae.rst │ │ ├── nais.rst │ │ ├── nceplrec.rst │ │ ├── ncl.rst │ │ ├── neumf.rst │ │ ├── ngcf.rst │ │ ├── nncf.rst │ │ ├── pop.rst │ │ ├── ract.rst │ │ ├── random.rst │ │ ├── recvae.rst │ │ ├── sgl.rst │ │ ├── simplex.rst │ │ ├── slimelastic.rst │ │ └── spectralcf.rst │ ├── knowledge │ │ ├── cfkg.rst │ │ ├── cke.rst │ │ ├── kgat.rst │ │ ├── kgcn.rst │ │ ├── kgin.rst │ │ ├── kgnnls.rst │ │ ├── ktup.rst │ │ ├── mcclk.rst │ │ ├── mkr.rst │ │ └── ripplenet.rst │ └── sequential │ │ ├── bert4rec.rst │ │ ├── caser.rst │ │ ├── core.rst │ │ ├── fdsa.rst │ │ ├── fearec.rst │ │ ├── fossil.rst │ │ ├── fpmc.rst │ │ ├── gcsan.rst │ │ ├── gru4rec.rst │ │ ├── gru4reccpr.rst │ │ ├── gru4recf.rst │ │ ├── gru4reckg.rst │ │ ├── hgn.rst │ │ ├── hrm.rst │ │ ├── ksr.rst │ │ ├── lightsans.rst │ │ ├── narm.rst │ │ ├── nextitnet.rst │ │ ├── npe.rst │ │ ├── repeatnet.rst │ │ ├── s3rec.rst │ │ ├── sasrec.rst │ │ ├── sasreccpr.rst │ │ ├── sasrecf.rst │ │ ├── shan.rst │ │ ├── sine.rst │ │ ├── srgnn.rst │ │ ├── stamp.rst │ │ └── transrec.rst │ ├── model_intro.rst │ ├── train_eval_intro.rst │ ├── usage.rst │ └── usage │ ├── case_study.rst │ ├── load_pretrained_embedding.rst │ ├── parameter_tuning.rst │ ├── qa.rst │ ├── run_recbole.rst │ ├── run_recbole_group.rst │ ├── running_different_models.rst │ ├── running_new_dataset.rst │ ├── save_and_load_data_and_model.rst │ ├── significance_test.rst │ ├── use_modules.rst │ ├── use_tensorboard.rst │ └── use_weights_and_biases.rst ├── hyper.test ├── recbole ├── __init__.py ├── config │ ├── __init__.py │ └── configurator.py ├── data │ ├── __init__.py │ ├── dataloader │ │ ├── __init__.py │ │ ├── abstract_dataloader.py │ │ ├── general_dataloader.py │ │ ├── knowledge_dataloader.py │ │ └── user_dataloader.py │ ├── dataset │ │ ├── __init__.py │ │ ├── customized_dataset.py │ │ ├── dataset.py │ │ ├── decisiontree_dataset.py │ │ ├── kg_dataset.py │ │ ├── kg_seq_dataset.py │ │ └── sequential_dataset.py │ ├── interaction.py │ ├── transform.py │ └── utils.py ├── dataset_example │ └── ml-100k │ │ ├── ml-100k.inter │ │ ├── ml-100k.item │ │ ├── ml-100k.kg │ │ ├── ml-100k.link │ │ └── ml-100k.user ├── evaluator │ ├── __init__.py │ ├── base_metric.py │ ├── collector.py │ ├── evaluator.py │ ├── metrics.py │ ├── register.py │ └── utils.py ├── model │ ├── __init__.py │ ├── abstract_recommender.py │ ├── context_aware_recommender │ │ ├── __init__.py │ │ ├── afm.py │ │ ├── autoint.py │ │ ├── dcn.py │ │ ├── dcnv2.py │ │ ├── deepfm.py │ │ ├── dssm.py │ │ ├── eulernet.py │ │ ├── ffm.py │ │ ├── fignn.py │ │ ├── fm.py │ │ ├── fnn.py │ │ ├── fwfm.py │ │ ├── kd_dagfm.py │ │ ├── lr.py │ │ ├── nfm.py │ │ ├── pnn.py │ │ ├── widedeep.py │ │ └── xdeepfm.py │ ├── exlib_recommender │ │ ├── __init__.py │ │ ├── lightgbm.py │ │ └── xgboost.py │ ├── general_recommender │ │ ├── __init__.py │ │ ├── admmslim.py │ │ ├── asymknn.py │ │ ├── bpr.py │ │ ├── cdae.py │ │ ├── convncf.py │ │ ├── dgcf.py │ │ ├── diffrec.py │ │ ├── dmf.py │ │ ├── ease.py │ │ ├── enmf.py │ │ ├── fism.py │ │ ├── gcmc.py │ │ ├── itemknn.py │ │ ├── ldiffrec.py │ │ ├── lightgcn.py │ │ ├── line.py │ │ ├── macridvae.py │ │ ├── multidae.py │ │ ├── multivae.py │ │ ├── nais.py │ │ ├── nceplrec.py │ │ ├── ncl.py │ │ ├── neumf.py │ │ ├── ngcf.py │ │ ├── nncf.py │ │ ├── pop.py │ │ ├── ract.py │ │ ├── random.py │ │ ├── recvae.py │ │ ├── sgl.py │ │ ├── simplex.py │ │ ├── slimelastic.py │ │ └── spectralcf.py │ ├── init.py │ ├── knowledge_aware_recommender │ │ ├── __init__.py │ │ ├── cfkg.py │ │ ├── cke.py │ │ ├── kgat.py │ │ ├── kgcn.py │ │ ├── kgin.py │ │ ├── kgnnls.py │ │ ├── ktup.py │ │ ├── mcclk.py │ │ ├── mkr.py │ │ └── ripplenet.py │ ├── layers.py │ ├── loss.py │ └── sequential_recommender │ │ ├── __init__.py │ │ ├── bert4rec.py │ │ ├── caser.py │ │ ├── core.py │ │ ├── dien.py │ │ ├── din.py │ │ ├── fdsa.py │ │ ├── fearec.py │ │ ├── fossil.py │ │ ├── fpmc.py │ │ ├── gcsan.py │ │ ├── gru4rec.py │ │ ├── gru4reccpr.py │ │ ├── gru4recf.py │ │ ├── gru4reckg.py │ │ ├── hgn.py │ │ ├── hrm.py │ │ ├── ksr.py │ │ ├── lightsans.py │ │ ├── narm.py │ │ ├── nextitnet.py │ │ ├── npe.py │ │ ├── repeatnet.py │ │ ├── s3rec.py │ │ ├── sasrec.py │ │ ├── sasreccpr.py │ │ ├── sasrecf.py │ │ ├── shan.py │ │ ├── sine.py │ │ ├── srgnn.py │ │ ├── stamp.py │ │ └── transrec.py ├── properties │ ├── dataset │ │ ├── kg_url.yaml │ │ ├── ml-100k.yaml │ │ ├── sample.yaml │ │ └── url.yaml │ ├── model │ │ ├── ADMMSLIM.yaml │ │ ├── AFM.yaml │ │ ├── AsymKNN.yaml │ │ ├── AutoInt.yaml │ │ ├── BERT4Rec.yaml │ │ ├── BPR.yaml │ │ ├── CDAE.yaml │ │ ├── CFKG.yaml │ │ ├── CKE.yaml │ │ ├── CORE.yaml │ │ ├── Caser.yaml │ │ ├── ConvNCF.yaml │ │ ├── DCN.yaml │ │ ├── DCNV2.yaml │ │ ├── DGCF.yaml │ │ ├── DIEN.yaml │ │ ├── DIN.yaml │ │ ├── DMF.yaml │ │ ├── DSSM.yaml │ │ ├── DeepFM.yaml │ │ ├── DiffRec.yaml │ │ ├── EASE.yaml │ │ ├── ENMF.yaml │ │ ├── EulerNet.yaml │ │ ├── FDSA.yaml │ │ ├── FEARec.yaml │ │ ├── FFM.yaml │ │ ├── FISM.yaml │ │ ├── FM.yaml │ │ ├── FNN.yaml │ │ ├── FOSSIL.yaml │ │ ├── FPMC.yaml │ │ ├── FiGNN.yaml │ │ ├── FwFM.yaml │ │ ├── GCMC.yaml │ │ ├── GCSAN.yaml │ │ ├── GRU4Rec.yaml │ │ ├── GRU4RecCPR.yaml │ │ ├── GRU4RecF.yaml │ │ ├── GRU4RecKG.yaml │ │ ├── HGN.yaml │ │ ├── HRM.yaml │ │ ├── ItemKNN.yaml │ │ ├── KD_DAGFM.yaml │ │ ├── KGAT.yaml │ │ ├── KGCN.yaml │ │ ├── KGIN.yaml │ │ ├── KGNNLS.yaml │ │ ├── KSR.yaml │ │ ├── KTUP.yaml │ │ ├── LDiffRec.yaml │ │ ├── LINE.yaml │ │ ├── LR.yaml │ │ ├── LightGCN.yaml │ │ ├── LightSANs.yaml │ │ ├── MCCLK.yaml │ │ ├── MKR.yaml │ │ ├── MacridVAE.yaml │ │ ├── MultiDAE.yaml │ │ ├── MultiVAE.yaml │ │ ├── NAIS.yaml │ │ ├── NARM.yaml │ │ ├── NCEPLRec.yaml │ │ ├── NCL.yaml │ │ ├── NFM.yaml │ │ ├── NGCF.yaml │ │ ├── NNCF.yaml │ │ ├── NPE.yaml │ │ ├── NeuMF.yaml │ │ ├── NextItNet.yaml │ │ ├── PNN.yaml │ │ ├── Pop.yaml │ │ ├── RaCT.yaml │ │ ├── RecVAE.yaml │ │ ├── RepeatNet.yaml │ │ ├── RippleNet.yaml │ │ ├── S3Rec.yaml │ │ ├── SASRec.yaml │ │ ├── SASRecCPR.yaml │ │ ├── SASRecF.yaml │ │ ├── SGL.yaml │ │ ├── SHAN.yaml │ │ ├── SINE.yaml │ │ ├── SLIMElastic.yaml │ │ ├── SRGNN.yaml │ │ ├── STAMP.yaml │ │ ├── SimpleX.yaml │ │ ├── SpectralCF.yaml │ │ ├── TransRec.yaml │ │ ├── WideDeep.yaml │ │ ├── lightgbm.yaml │ │ ├── xDeepFM.yaml │ │ └── xgboost.yaml │ ├── overall.yaml │ └── quick_start_config │ │ ├── context-aware.yaml │ │ ├── context-aware_ml-100k.yaml │ │ ├── knowledge_base.yaml │ │ ├── sequential.yaml │ │ ├── sequential_DIN.yaml │ │ ├── sequential_DIN_on_ml-100k.yaml │ │ ├── sequential_embedding_model.yaml │ │ └── special_sequential_on_ml-100k.yaml ├── quick_start │ ├── __init__.py │ └── quick_start.py ├── sampler │ ├── __init__.py │ └── sampler.py ├── trainer │ ├── __init__.py │ ├── hyper_tuning.py │ └── trainer.py └── utils │ ├── __init__.py │ ├── argument_list.py │ ├── case_study.py │ ├── enum_type.py │ ├── logger.py │ ├── url.py │ ├── utils.py │ └── wandblogger.py ├── requirements.txt ├── run_example ├── case_study_example.py ├── lstm-model-with-item-infor-fix-missing-last-item.ipynb ├── recbole-using-all-items-for-prediction.ipynb ├── save_and_load_example.py ├── sequential-model-fixed-missing-last-item.ipynb └── session_based_rec_example.py ├── run_hyper.py ├── run_recbole.py ├── run_recbole_group.py ├── run_test.sh ├── setup.py ├── significance_test.py ├── style.cfg └── tests ├── config ├── run.sh ├── test_command_line.py ├── test_config.py ├── test_config_example.yaml └── test_overall.py ├── data ├── build_dataset │ └── build_dataset.inter ├── filter_by_field_value │ └── filter_by_field_value.inter ├── filter_by_inter_num │ └── filter_by_inter_num.inter ├── filter_inter_by_ui_and_inter_num │ ├── filter_inter_by_ui_and_inter_num.inter │ ├── filter_inter_by_ui_and_inter_num.item │ └── filter_inter_by_ui_and_inter_num.user ├── filter_inter_by_user_or_item │ ├── filter_inter_by_user_or_item.inter │ ├── filter_inter_by_user_or_item.item │ └── filter_inter_by_user_or_item.user ├── filter_nan_user_or_item │ ├── filter_nan_user_or_item.inter │ ├── filter_nan_user_or_item.item │ └── filter_nan_user_or_item.user ├── filter_value_and_filter_inter_by_ui │ ├── filter_value_and_filter_inter_by_ui.inter │ ├── filter_value_and_filter_inter_by_ui.item │ └── filter_value_and_filter_inter_by_ui.user ├── filter_value_and_inter_num │ ├── filter_value_and_inter_num.inter │ ├── filter_value_and_inter_num.item │ └── filter_value_and_inter_num.user ├── general_dataloader │ ├── general_dataloader.inter │ └── general_dataloader.item ├── general_full_dataloader │ ├── general_full_dataloader.inter │ └── general_full_dataloader.item ├── general_uni100_dataloader │ ├── general_uni100_dataloader.inter │ └── general_uni100_dataloader.item ├── kg_filter_by_triple_num │ ├── kg_filter_by_triple_num.inter │ ├── kg_filter_by_triple_num.kg │ └── kg_filter_by_triple_num.link ├── kg_remap_id │ ├── kg_remap_id.inter │ ├── kg_remap_id.kg │ └── kg_remap_id.link ├── kg_reverse_r │ ├── kg_reverse_r.inter │ ├── kg_reverse_r.kg │ └── kg_reverse_r.link ├── normalize │ └── normalize.inter ├── remap_id │ └── remap_id.inter ├── remove_duplication │ └── remove_duplication.inter ├── reorder_dataset │ └── reorder_dataset.inter ├── rm_dup_and_filter_by_inter_num │ └── rm_dup_and_filter_by_inter_num.inter ├── rm_dup_and_filter_value │ └── rm_dup_and_filter_value.inter ├── seq_benchmark │ ├── seq_benchmark.test.inter │ ├── seq_benchmark.train.inter │ └── seq_benchmark.valid.inter ├── seq_dataset │ └── seq_dataset.inter ├── set_label_by_threshold │ └── set_label_by_threshold.inter ├── test_dataloader.py ├── test_dataset.py ├── test_transform.py └── ui_feat_preparation_and_fill_nan │ ├── ui_feat_preparation_and_fill_nan.inter │ ├── ui_feat_preparation_and_fill_nan.item │ └── ui_feat_preparation_and_fill_nan.user ├── evaluation_setting └── test_evaluation_setting.py ├── hyper_tuning ├── test_hyper_tuning.py ├── test_hyper_tuning_config.yaml └── test_hyper_tuning_params.yaml ├── metrics ├── test_loss_metrics.py ├── test_rank_metrics.py └── test_topk_metrics.py ├── model ├── test_model.yaml ├── test_model_auto.py └── test_model_manual.py └── test_data └── test ├── test.inter ├── test.item ├── test.kg ├── test.link └── test.user /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[\U0001F41BBUG] Describe your problem in one sentence." 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. extra yaml file 16 | 2. your code 17 | 3. script for running 18 | 19 | **Expected behavior** 20 | A clear and concise description of what you expected to happen. 21 | 22 | **Screenshots** 23 | If applicable, add screenshots to help explain your problem. 24 | 25 | **Colab Links** 26 | If applicable, add links to Colab or other Jupyter laboratory platforms that can reproduce the bug. 27 | 28 | **Desktop (please complete the following information):** 29 | - OS: [e.g. Linux, macOS or Windows] 30 | - RecBole Version [e.g. 0.1.0] 31 | - Python Version [e.g. 3.79] 32 | - PyTorch Version [e.g. 1.60] 33 | - cudatoolkit Version [e.g. 9.2, none] 34 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report_CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug 报告 3 | about: 提交一份 bug 报告,帮助 RecBole 变得更好 4 | title: "[\U0001F41BBUG] 用一句话描述您的问题。" 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **描述这个 bug** 11 | 对 bug 作一个清晰简明的描述。 12 | 13 | **如何复现** 14 | 复现这个 bug 的步骤: 15 | 1. 您引入的额外 yaml 文件 16 | 2. 您的代码 17 | 3. 您的运行脚本 18 | 19 | **预期** 20 | 对您的预期作清晰简明的描述。 21 | 22 | **屏幕截图** 23 | 添加屏幕截图以帮助解释您的问题。(可选) 24 | 25 | **链接** 26 | 添加能够复现 bug 的代码链接,如 Colab 或者其他在线 Jupyter 平台。(可选) 27 | 28 | **实验环境(请补全下列信息):** 29 | - 操作系统: [如 Linux, macOS 或 Windows] 30 | - RecBole 版本 [如 0.1.0] 31 | - Python 版本 [如 3.79] 32 | - PyTorch 版本 [如 1.60] 33 | - cudatoolkit 版本 [如 9.2, none] 34 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: "[\U0001F4A1SUG] Description of what you want to happen in one sentence" 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request_CN.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 请求添加新功能 3 | about: 提出一个关于本项目新功能/新特性的建议 4 | title: "[\U0001F4A1SUG] 一句话描述您希望新增的功能或特性" 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **您希望添加的功能是否与某个问题相关?** 11 | 关于这个问题的简洁清晰的描述,例如,当 [...] 时,我总是很沮丧。 12 | 13 | **描述您希望的解决方案** 14 | 关于解决方案的简洁清晰的描述。 15 | 16 | **描述您考虑的替代方案** 17 | 关于您考虑的,能实现这个功能的其他替代方案的简洁清晰的描述。 18 | 19 | **其他** 20 | 您可以添加其他任何的资料、链接或者屏幕截图,以帮助我们理解这个新功能。 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Saved models 2 | /saved* 3 | *.pth 4 | 5 | .vscode/ 6 | .idea/ 7 | *.pyc 8 | *.log 9 | log_tensorboard 10 | saved/ 11 | *.lprof 12 | *.egg-info/ 13 | docs/build/ 14 | wandb/* 15 | /ray_log* -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 RUCAIBox 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include recbole/properties * 2 | recursive-include recbole/dataset_example * 3 | -------------------------------------------------------------------------------- /asset/framework.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/asset/framework.png -------------------------------------------------------------------------------- /asset/hyper_tune_configs/context/avazu-2m_context.md: -------------------------------------------------------------------------------- 1 | # Avazu-Context 2 | 3 | **Dataset:** avazu-2m_context 4 | 5 | **Normalization:** we normalize the scalar value of the numerical fields `timestamp` and `banner_pos`. 6 | 7 | **Evaluation metric:** AUC, Log Loss 8 | 9 | ## Dataset Information 10 | 11 | | Dataset | #Fields | #Features | #Instance | 12 | | ------- | ------ | ------ | ------------- | 13 | | avazu-2m | 23 | 2,736,107 | 2,000,000 | 14 | 15 | **Configuration file (avazu-2m_context.yaml):** 16 | 17 | ```yaml 18 | # dataset config 19 | field_separator: "\t" 20 | seq_separator: " " 21 | USER_ID_FIELD: ~ 22 | ITEM_ID_FIELD: ~ 23 | LABEL_FIELD: label 24 | fill_nan: True 25 | normalize_all: True 26 | numerical_features: ['timestamp','banner_pos'] 27 | load_col: 28 | inter: '*' 29 | 30 | save_dataloaders: True 31 | 32 | # training and evaluation 33 | epochs: 500 34 | train_batch_size: 4096 35 | eval_batch_size: 40960000 36 | 37 | eval_args: 38 | group_by: ~ 39 | split: {'RS':[0.8, 0.1, 0.1]} 40 | mode: labeled 41 | order: RO 42 | valid_metric: AUC 43 | metrics: ['AUC', 'LogLoss'] 44 | ``` 45 | 46 | ## Note 47 | 48 | - In order to ensure fairness between models, we limit the embedding dimension of users and items to `16`. Please adjust the parameter name in different models. 49 | 50 | ```yaml 51 | embedding_size: 16 52 | ``` -------------------------------------------------------------------------------- /asset/hyper_tune_configs/context/criteo-4m_context.md: -------------------------------------------------------------------------------- 1 | # Criteo-Context 2 | 3 | **Dataset:** criteo-4m_context 4 | 5 | **Discretization:** we lognormalize the scalar value of the numerical fields `I1` ~ `I13`. 6 | 7 | **Evaluation metric:** AUC, Log Loss 8 | 9 | ## Dataset Information 10 | 11 | | Dataset | #Fields | #Features | #Instance | 12 | | ------- | ------ | ------ | ------------- | 13 | | criteo-4m | 39 | 4,156,307 | 4,000,000 | 14 | 15 | **Configuration file (criteo-4m_context.yaml):** 16 | 17 | ```yaml 18 | # dataset config 19 | field_separator: "\t" 20 | seq_separator: " " 21 | USER_ID_FIELD: ~ 22 | ITEM_ID_FIELD: ~ 23 | LABEL_FIELD: label 24 | fill_nan: True 25 | numerical_features: ['I1','I2','I3','I4','I5','I6','I7','I8','I9','I10','I11','I12','I13'] 26 | discretization: 27 | I1: 28 | method: 'LD' 29 | I2: 30 | method: 'LD' 31 | I3: 32 | method: 'LD' 33 | I4: 34 | method: 'LD' 35 | I5: 36 | method: 'LD' 37 | I6: 38 | method: 'LD' 39 | I7: 40 | method: 'LD' 41 | I8: 42 | method: 'LD' 43 | I9: 44 | method: 'LD' 45 | I10: 46 | method: 'LD' 47 | I11: 48 | method: 'LD' 49 | I12: 50 | method: 'LD' 51 | I13: 52 | method: 'LD' 53 | load_col: 54 | inter: '*' 55 | 56 | # training and evaluation 57 | epochs: 500 58 | train_batch_size: 4096 59 | eval_batch_size: 40960000 60 | 61 | eval_args: 62 | group_by: ~ 63 | split: {'RS':[0.8, 0.1, 0.1]} 64 | mode: labeled 65 | order: RO 66 | valid_metric: AUC 67 | metrics: ['AUC', 'LogLoss'] 68 | ``` 69 | 70 | ## Note 71 | 72 | - In order to ensure fairness between models, we limit the embedding dimension of users and items to `16`. Please adjust the parameter name in different models. 73 | 74 | ```yaml 75 | embedding_size: 16 76 | ``` -------------------------------------------------------------------------------- /asset/hyper_tune_configs/context/ml-1m_context.md: -------------------------------------------------------------------------------- 1 | # MovieLens-Context 2 | 3 | **Dataset:** ml-1m_context 4 | 5 | **Data filtering:** delete interactive records with rating of 3 6 | 7 | **Threshold:** the ratings for 1s and 2s are normalized to be 0s; 4s and 5s to be 1s; 8 | 9 | **Evaluation metric:** AUC, Log Loss 10 | 11 | ## Dataset Information 12 | 13 | | Dataset | #Fields | #Features | #Instance | 14 | | ------- | ------ | ------ | ------------- | 15 | | ml-1m | 7 | 10040 | 739,012 | 16 | 17 | **Configuration file (ml-1m_context.yaml):** 18 | 19 | ```yaml 20 | # dataset config 21 | field_separator: "\t" 22 | seq_separator: " " 23 | USER_ID_FIELD: user_id 24 | ITEM_ID_FIELD: item_id 25 | RATING_FIELD: rating 26 | NEG_PREFIX: neg_ 27 | LABEL_FIELD: label 28 | threshold: 29 | rating: 4 30 | val_interval: 31 | rating: "[0,3);(3,inf)" 32 | load_col: 33 | inter: [user_id, item_id, rating] 34 | user: [user_id, age, gender, occupation] 35 | item: [item_id, genre, release_year] 36 | 37 | # training and evaluation 38 | epochs: 500 39 | train_batch_size: 4096 40 | eval_batch_size: 40960000 41 | 42 | eval_args: 43 | split: {'RS':[0.8, 0.1, 0.1]} 44 | group_by: ~ 45 | mode: labeled 46 | order: RO 47 | valid_metric: AUC 48 | metrics: ['AUC', 'LogLoss'] 49 | ``` 50 | 51 | ## Note 52 | 53 | - In order to ensure fairness between models, we limit the embedding dimension of users and items to `16`. Please adjust the parameter name in different models. 54 | 55 | ```yaml 56 | embedding_size: 16 57 | ``` -------------------------------------------------------------------------------- /asset/hyper_tune_configs/general/amazon-books_general.md: -------------------------------------------------------------------------------- 1 | # Amazon-Books(2018) General 2 | 3 | **Dataset:** amazon-books_general 4 | 5 | **Data filtering:** delete interactive records with rating less than 3 6 | 7 | **K-core filtering:** delete inactive users or unpopular items with less than 10 interactions 8 | 9 | **Evaluation method:** randomized arrangement, random split data set and full sorting 10 | 11 | **Evaluation metric:** Recall@10, NGCG@10, MRR@10, Hit@10, Precision@10 12 | 13 | ## Dataset Information 14 | 15 | | Dataset | #Users | #Items | #Interactions | Sparsity | 16 | | ------------------- | ------ | ------ | ------------- | -------- | 17 | | Amazon-Books (2018) | 40,550 | 31,094 | 1,181,294 | 99.91% | 18 | 19 | **Configuration file (amazon-books_general.yaml):** 20 | 21 | ```yaml 22 | # dataset config 23 | field_separator: "\t" 24 | seq_separator: " " 25 | USER_ID_FIELD: user_id 26 | ITEM_ID_FIELD: item_id 27 | RATING_FIELD: rating 28 | NEG_PREFIX: neg_ 29 | LABEL_FIELD: label 30 | load_col: 31 | inter: [user_id, item_id, rating, timestamp] 32 | 33 | # data filtering for interactions 34 | val_interval: 35 | rating: "[3,inf)" 36 | timestamp: "[1490000000,inf)" 37 | unused_col: 38 | inter: [rating, timestamp] 39 | 40 | user_inter_num_interval: "[10,inf)" 41 | item_inter_num_interval: "[10,inf)" 42 | 43 | # training and evaluation 44 | epochs: 500 45 | train_batch_size: 4096 46 | eval_batch_size: 40960000 47 | valid_metric: NDCG@10 48 | train_neg_sample_args: 49 | distribution: uniform 50 | sample_num: 1 51 | dynamic: False 52 | ``` 53 | 54 | ## Note 55 | 56 | - In order to ensure fairness between models, we limit the embedding dimension of users and items to `64`. Please adjust the parameter name in different models. 57 | 58 | ```yaml 59 | embedding_size: 64 60 | ``` 61 | -------------------------------------------------------------------------------- /asset/hyper_tune_configs/general/ml-1m_general.md: -------------------------------------------------------------------------------- 1 | # MovieLens-General 2 | 3 | **Dataset:** ml-1m_general 4 | 5 | **Data filtering:** delete interactive records with rating less than 3 6 | 7 | **K-core filtering:** delete inactive users or unpopular items with less than 10 interactions 8 | 9 | **Evaluation method:** randomized arrangement, random split data set and full sorting 10 | 11 | **Evaluation metric:** Recall@10, NGCG@10, MRR@10, Hit@10, Precision@10 12 | 13 | ## Dataset Information 14 | 15 | | Dataset | #Users | #Items | #Interactions | Sparsity | 16 | | ------- | ------ | ------ | ------------- | -------- | 17 | | ml-1m | 6,040 | 3,124 | 834,449 | 95.57% | 18 | 19 | **Configuration file (ml-1m_general.yaml):** 20 | 21 | ```yaml 22 | # dataset config 23 | field_separator: "\t" 24 | seq_separator: " " 25 | USER_ID_FIELD: user_id 26 | ITEM_ID_FIELD: item_id 27 | RATING_FIELD: rating 28 | NEG_PREFIX: neg_ 29 | LABEL_FIELD: label 30 | load_col: 31 | inter: [user_id, item_id, rating, timestamp] 32 | 33 | # data filtering for interactions 34 | val_interval: 35 | rating: "[3,inf)" 36 | unused_col: 37 | inter: [rating] 38 | 39 | user_inter_num_interval: "[10,inf)" 40 | item_inter_num_interval: "[10,inf)" 41 | 42 | # training and evaluation 43 | epochs: 500 44 | train_batch_size: 4096 45 | eval_batch_size: 40960000 46 | valid_metric: NDCG@10 47 | train_neg_sample_args: 48 | distribution: uniform 49 | sample_num: 1 50 | dynamic: False 51 | ``` 52 | 53 | ## Note 54 | 55 | - In order to ensure fairness between models, we limit the embedding dimension of users and items to `64`. Please adjust the parameter name in different models. 56 | 57 | ```yaml 58 | embedding_size: 64 59 | ``` 60 | -------------------------------------------------------------------------------- /asset/hyper_tune_configs/general/yelp_general.md: -------------------------------------------------------------------------------- 1 | # Yelp2022-General 2 | 3 | **Dataset:** yelp2022_general 4 | 5 | **Data filtering:** delete interactive records with rating less than 3 6 | 7 | **K-core filtering:** delete inactive users or unpopular items with less than 10 interactions 8 | 9 | **Evaluation method:** random ordering, ratio-based data splitting and full sorting 10 | 11 | **Evaluation metric:** Recall@10, MRR@10, NGCG@10, Hit@10, Precision@10 12 | 13 | ## Dataset Information 14 | 15 | | Dataset | #Users | #Items | #Interactions | Sparsity | 16 | | -------- | ------ | ------ | ------------- | -------- | 17 | | yelp2022 | 72,488 | 43,749 | 2,043,402 | 99.9356% | 18 | 19 | **Configuration file (ml-1m_seq.yaml):** 20 | 21 | ```yaml 22 | # dataset config 23 | field_separator: "\t" 24 | seq_separator: " " 25 | USER_ID_FIELD: user_id 26 | ITEM_ID_FIELD: item_id 27 | RATING_FIELD: rating 28 | NEG_PREFIX: neg_ 29 | LABEL_FIELD: label 30 | load_col: 31 | inter: [user_id, item_id, rating] 32 | 33 | # data filtering for interactions 34 | val_interval: 35 | rating: "[3,inf)" 36 | unused_col: 37 | inter: [rating] 38 | 39 | user_inter_num_interval: "[10,inf)" 40 | item_inter_num_interval: "[10,inf)" 41 | 42 | # training and evaluation 43 | epochs: 500 44 | train_batch_size: 4096 45 | eval_batch_size: 40960000 46 | valid_metric: NDCG@10 47 | train_neg_sample_args: 48 | distribution: uniform 49 | sample_num: 1 50 | dynamic: False 51 | 52 | # model 53 | embedding_size: 64 54 | ``` 55 | 56 | ## Note 57 | 58 | - In order to ensure fairness between models, we limit the embedding dimension of users and items to `64`. Please adjust the parameter name in different models. 59 | 60 | ```yaml 61 | embedding_size: 64 62 | ``` -------------------------------------------------------------------------------- /asset/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/asset/logo.png -------------------------------------------------------------------------------- /asset/new.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/asset/new.gif -------------------------------------------------------------------------------- /asset/questionnaire.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/asset/questionnaire.xlsx -------------------------------------------------------------------------------- /conda/build.sh: -------------------------------------------------------------------------------- 1 | $PYTHON setup.py install -------------------------------------------------------------------------------- /conda/conda_release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | conda-build --python 3.7 . 4 | printf "python 3.7 version is released \n" 5 | conda-build --python 3.8 . 6 | printf "python 3.8 version is released \n" 7 | conda-build --python 3.9 . 8 | printf "python 3.9 version is released \n" 9 | conda-build --python 3.10 . 10 | printf "python 3.10 version is released \n" 11 | -------------------------------------------------------------------------------- /conda/meta.yaml: -------------------------------------------------------------------------------- 1 | package: 2 | name: recbole 3 | version: 1.2.1 4 | 5 | source: 6 | path: ../ 7 | 8 | requirements: 9 | build: 10 | - python 11 | host: 12 | - python 13 | - numpy >=1.17.2 14 | - scipy >=1.6.0 15 | - pandas >=1.3.0 16 | - tqdm >=4.48.2 17 | - pyyaml >=5.1.0 18 | - scikit-learn >=0.23.2 19 | - pytorch >=1.10.0 20 | - colorlog >=4.7.2 21 | - colorama >=0.4.4 22 | - tensorboard >=2.5.0 23 | - tabulate >=0.8.10 24 | - plotly >=4.0.0 25 | - texttable >=0.9.0 26 | - psutil >=5.9.0 27 | - ray-tune >=1.6.0 28 | run: 29 | - python 30 | - numpy >=1.17.2 31 | - scipy >=1.6.0 32 | - pandas >=1.3.0 33 | - tqdm >=4.48.2 34 | - pyyaml >=5.1.0 35 | - scikit-learn >=0.23.2 36 | - pytorch >=1.10.0 37 | - colorlog >=4.7.2 38 | - colorama >=0.4.4 39 | - tensorboard >=2.5.0 40 | - tabulate >=0.8.10 41 | - plotly >=4.0.0 42 | - texttable >=0.9.0 43 | - psutil >=5.9.0 44 | - ray-tune >=1.6.0 45 | test: 46 | imports: 47 | - recbole 48 | 49 | about: 50 | home: https://recbole.io/ 51 | license: MIT 52 | summary: "A unified, comprehensive and efficient recommendation library" 53 | 54 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = source 9 | BUILDDIR = build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs/source/asset/afm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/afm.jpg -------------------------------------------------------------------------------- /docs/source/asset/autoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/autoint.png -------------------------------------------------------------------------------- /docs/source/asset/bert4rec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/bert4rec.png -------------------------------------------------------------------------------- /docs/source/asset/bpr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/bpr.png -------------------------------------------------------------------------------- /docs/source/asset/caser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/caser.png -------------------------------------------------------------------------------- /docs/source/asset/cdae.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/cdae.png -------------------------------------------------------------------------------- /docs/source/asset/cke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/cke.png -------------------------------------------------------------------------------- /docs/source/asset/convncf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/convncf.png -------------------------------------------------------------------------------- /docs/source/asset/core.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/core.png -------------------------------------------------------------------------------- /docs/source/asset/data_flow_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/data_flow_en.png -------------------------------------------------------------------------------- /docs/source/asset/dcn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/dcn.png -------------------------------------------------------------------------------- /docs/source/asset/dcnv2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/dcnv2.png -------------------------------------------------------------------------------- /docs/source/asset/ddp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/ddp.png -------------------------------------------------------------------------------- /docs/source/asset/deepfm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/deepfm.png -------------------------------------------------------------------------------- /docs/source/asset/dgcf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/dgcf.jpg -------------------------------------------------------------------------------- /docs/source/asset/dien.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/dien.png -------------------------------------------------------------------------------- /docs/source/asset/diffrec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/diffrec.png -------------------------------------------------------------------------------- /docs/source/asset/din.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/din.png -------------------------------------------------------------------------------- /docs/source/asset/dmf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/dmf.jpg -------------------------------------------------------------------------------- /docs/source/asset/dssm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/dssm.png -------------------------------------------------------------------------------- /docs/source/asset/enmf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/enmf.jpg -------------------------------------------------------------------------------- /docs/source/asset/eulernet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/eulernet.png -------------------------------------------------------------------------------- /docs/source/asset/evaluation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/evaluation.png -------------------------------------------------------------------------------- /docs/source/asset/fdsa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/fdsa.png -------------------------------------------------------------------------------- /docs/source/asset/fearec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/fearec.png -------------------------------------------------------------------------------- /docs/source/asset/ffm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/ffm.png -------------------------------------------------------------------------------- /docs/source/asset/fignn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/fignn.png -------------------------------------------------------------------------------- /docs/source/asset/fm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/fm.png -------------------------------------------------------------------------------- /docs/source/asset/fnn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/fnn.png -------------------------------------------------------------------------------- /docs/source/asset/fossil.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/fossil.jpg -------------------------------------------------------------------------------- /docs/source/asset/fpmc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/fpmc.png -------------------------------------------------------------------------------- /docs/source/asset/framework.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/framework.png -------------------------------------------------------------------------------- /docs/source/asset/fwfm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/fwfm.png -------------------------------------------------------------------------------- /docs/source/asset/gcmc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/gcmc.png -------------------------------------------------------------------------------- /docs/source/asset/gcsan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/gcsan.png -------------------------------------------------------------------------------- /docs/source/asset/gru4rec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/gru4rec.png -------------------------------------------------------------------------------- /docs/source/asset/gru4recf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/gru4recf.png -------------------------------------------------------------------------------- /docs/source/asset/hgn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/hgn.jpg -------------------------------------------------------------------------------- /docs/source/asset/hrm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/hrm.jpg -------------------------------------------------------------------------------- /docs/source/asset/hyper_tuning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/hyper_tuning.png -------------------------------------------------------------------------------- /docs/source/asset/kd_dagfm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/kd_dagfm.png -------------------------------------------------------------------------------- /docs/source/asset/kgat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/kgat.png -------------------------------------------------------------------------------- /docs/source/asset/kgcn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/kgcn.png -------------------------------------------------------------------------------- /docs/source/asset/kgin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/kgin.png -------------------------------------------------------------------------------- /docs/source/asset/kgnnls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/kgnnls.png -------------------------------------------------------------------------------- /docs/source/asset/ksr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/ksr.jpg -------------------------------------------------------------------------------- /docs/source/asset/ktup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/ktup.png -------------------------------------------------------------------------------- /docs/source/asset/ldiffrec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/ldiffrec.png -------------------------------------------------------------------------------- /docs/source/asset/lightgcn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/lightgcn.png -------------------------------------------------------------------------------- /docs/source/asset/lightsans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/lightsans.png -------------------------------------------------------------------------------- /docs/source/asset/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/line.png -------------------------------------------------------------------------------- /docs/source/asset/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/logo.png -------------------------------------------------------------------------------- /docs/source/asset/lr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/lr.png -------------------------------------------------------------------------------- /docs/source/asset/macridvae.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/macridvae.png -------------------------------------------------------------------------------- /docs/source/asset/mcclk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/mcclk.png -------------------------------------------------------------------------------- /docs/source/asset/mkr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/mkr.png -------------------------------------------------------------------------------- /docs/source/asset/multidae.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/multidae.png -------------------------------------------------------------------------------- /docs/source/asset/multivae.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/multivae.png -------------------------------------------------------------------------------- /docs/source/asset/nais.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/nais.png -------------------------------------------------------------------------------- /docs/source/asset/narm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/narm.png -------------------------------------------------------------------------------- /docs/source/asset/ncl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/ncl.png -------------------------------------------------------------------------------- /docs/source/asset/neumf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/neumf.png -------------------------------------------------------------------------------- /docs/source/asset/nextitnet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/nextitnet.png -------------------------------------------------------------------------------- /docs/source/asset/nfm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/nfm.jpg -------------------------------------------------------------------------------- /docs/source/asset/ngcf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/ngcf.jpg -------------------------------------------------------------------------------- /docs/source/asset/nncf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/nncf.png -------------------------------------------------------------------------------- /docs/source/asset/npe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/npe.jpg -------------------------------------------------------------------------------- /docs/source/asset/pnn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/pnn.jpg -------------------------------------------------------------------------------- /docs/source/asset/ract.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/ract.png -------------------------------------------------------------------------------- /docs/source/asset/recvae.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/recvae.png -------------------------------------------------------------------------------- /docs/source/asset/repeatnet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/repeatnet.jpg -------------------------------------------------------------------------------- /docs/source/asset/ripplenet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/ripplenet.jpg -------------------------------------------------------------------------------- /docs/source/asset/s3rec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/s3rec.png -------------------------------------------------------------------------------- /docs/source/asset/sasrec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/sasrec.png -------------------------------------------------------------------------------- /docs/source/asset/sgl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/sgl.png -------------------------------------------------------------------------------- /docs/source/asset/shan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/shan.jpg -------------------------------------------------------------------------------- /docs/source/asset/simplex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/simplex.png -------------------------------------------------------------------------------- /docs/source/asset/sine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/sine.png -------------------------------------------------------------------------------- /docs/source/asset/spectralcf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/spectralcf.png -------------------------------------------------------------------------------- /docs/source/asset/srgnn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/srgnn.png -------------------------------------------------------------------------------- /docs/source/asset/stamp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/stamp.png -------------------------------------------------------------------------------- /docs/source/asset/tensorboard_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/tensorboard_1.png -------------------------------------------------------------------------------- /docs/source/asset/tensorboard_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/tensorboard_2.png -------------------------------------------------------------------------------- /docs/source/asset/transrec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/transrec.png -------------------------------------------------------------------------------- /docs/source/asset/widedeep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/widedeep.png -------------------------------------------------------------------------------- /docs/source/asset/xdeepfm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/docs/source/asset/xdeepfm.png -------------------------------------------------------------------------------- /docs/source/get_started/quick_start.rst: -------------------------------------------------------------------------------- 1 | Quick Start 2 | =============== 3 | Here is a quick-start example for using RecBole. RecBole supports general recommendation, sequential recommendation, context-aware recommendation and knowledge-based recommendation. We will select a representative model from each type of recommendation to show you how to train and test on the **ml-100k** dataset from both **API** 4 | and **source code**. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | started/general 10 | started/sequential 11 | started/context-aware 12 | started/knowledge-based 13 | 14 | In-depth Usage 15 | ------------------- 16 | For a more in-depth usage about RecBole, take a look at 17 | 18 | - :doc:`../user_guide/config_settings` 19 | - :doc:`../user_guide/data_intro` 20 | - :doc:`../user_guide/model_intro` 21 | - :doc:`../user_guide/train_eval_intro` 22 | - :doc:`../user_guide/usage` 23 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.config.configurator.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.config.configurator 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.data.dataloader.abstract_dataloader.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.data.dataloader.abstract_dataloader 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.data.dataloader.general_dataloader.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.data.dataloader.general_dataloader 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.data.dataloader.knowledge_dataloader.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.data.dataloader.knowledge_dataloader 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.data.dataloader.rst: -------------------------------------------------------------------------------- 1 | recbole.data.dataloader 2 | =============================== 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | recbole.data.dataloader.abstract_dataloader 8 | recbole.data.dataloader.general_dataloader 9 | recbole.data.dataloader.knowledge_dataloader 10 | recbole.data.dataloader.user_dataloader 11 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.data.dataloader.user_dataloader.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.data.dataloader.user_dataloader 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.data.dataset.customized_dataset.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.data.dataset.customized_dataset 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.data.dataset.dataset.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.data.dataset.dataset 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.data.dataset.kg_dataset.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.data.dataset.kg_dataset 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.data.dataset.kg_seq_dataset.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.data.dataset.kg_seq_dataset 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.data.dataset.rst: -------------------------------------------------------------------------------- 1 | recbole.data.dataset 2 | ============================ 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | recbole.data.dataset.customized_dataset 8 | recbole.data.dataset.dataset 9 | recbole.data.dataset.kg_dataset 10 | recbole.data.dataset.kg_seq_dataset 11 | recbole.data.dataset.sequential_dataset 12 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.data.dataset.sequential_dataset.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.data.dataset.sequential_dataset 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.data.interaction.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.data.interaction 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.data.rst: -------------------------------------------------------------------------------- 1 | recbole.data 2 | ==================== 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | recbole.data.dataloader 8 | recbole.data.dataset 9 | recbole.data.interaction 10 | recbole.data.utils 11 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.data.utils.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.data.utils 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.evaluator.base_metric.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.evaluator.base_metric 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.evaluator.collector.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.evaluator.collector 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.evaluator.evaluator.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.evaluator.evaluator 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.evaluator.metrics.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.evaluator.metrics 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.evaluator.register.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.evaluator.register 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.evaluator.rst: -------------------------------------------------------------------------------- 1 | recbole.evaluator 2 | ========================= 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | recbole.evaluator.base_metric 8 | recbole.evaluator.collector 9 | recbole.evaluator.evaluator 10 | recbole.evaluator.metrics 11 | recbole.evaluator.register 12 | recbole.evaluator.utils 13 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.evaluator.utils.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.evaluator.utils 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.abstract_recommender.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.abstract_recommender 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.context_aware_recommender.afm.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.context_aware_recommender.afm 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.context_aware_recommender.autoint.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.context_aware_recommender.autoint 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.context_aware_recommender.dcn.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.context_aware_recommender.dcn 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.context_aware_recommender.dcnv2.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.context_aware_recommender.dcnv2 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.context_aware_recommender.deepfm.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.context_aware_recommender.deepfm 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.context_aware_recommender.dssm.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.context_aware_recommender.dssm 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.context_aware_recommender.eulernet.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.context_aware_recommender.eulernet 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.context_aware_recommender.ffm.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.context_aware_recommender.ffm 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.context_aware_recommender.fignn.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.context_aware_recommender.fignn 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.context_aware_recommender.fm.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.context_aware_recommender.fm 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.context_aware_recommender.fnn.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.context_aware_recommender.fnn 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.context_aware_recommender.fwfm.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.context_aware_recommender.fwfm 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.context_aware_recommender.kd_dagfm.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.context_aware_recommender.kd_dagfm 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.context_aware_recommender.lr.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.context_aware_recommender.lr 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.context_aware_recommender.nfm.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.context_aware_recommender.nfm 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.context_aware_recommender.pnn.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.context_aware_recommender.pnn 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.context_aware_recommender.rst: -------------------------------------------------------------------------------- 1 | recbole.model.context\_aware\_recommender 2 | ================================================= 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | recbole.model.context_aware_recommender.afm 8 | recbole.model.context_aware_recommender.autoint 9 | recbole.model.context_aware_recommender.dcn 10 | recbole.model.context_aware_recommender.dcnv2 11 | recbole.model.context_aware_recommender.deepfm 12 | recbole.model.context_aware_recommender.dssm 13 | recbole.model.context_aware_recommender.eulernet 14 | recbole.model.context_aware_recommender.ffm 15 | recbole.model.context_aware_recommender.fignn 16 | recbole.model.context_aware_recommender.fm 17 | recbole.model.context_aware_recommender.fnn 18 | recbole.model.context_aware_recommender.fwfm 19 | recbole.model.context_aware_recommender.kd_dagfm 20 | recbole.model.context_aware_recommender.lr 21 | recbole.model.context_aware_recommender.nfm 22 | recbole.model.context_aware_recommender.pnn 23 | recbole.model.context_aware_recommender.widedeep 24 | recbole.model.context_aware_recommender.xdeepfm 25 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.context_aware_recommender.widedeep.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.context_aware_recommender.widedeep 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.context_aware_recommender.xdeepfm.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.context_aware_recommender.xdeepfm 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.exlib_recommender.lightgbm.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.exlib_recommender.lightgbm 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.exlib_recommender.rst: -------------------------------------------------------------------------------- 1 | recbole.model.exlib\_recommender 2 | ============================================= 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | recbole.model.exlib_recommender.xgboost 8 | recbole.model.exlib_recommender.lightgbm 9 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.exlib_recommender.xgboost.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.exlib_recommender.xgboost 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.admmslim.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.admmslim 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.asymknn.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.asymknn 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.bpr.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.bpr 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.cdae.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.cdae 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.convncf.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.convncf 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.dgcf.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.dgcf 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.diffrec.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.diffrec 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.dmf.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.dmf 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.ease.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.ease 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.enmf.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.enmf 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.fism.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.fism 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.gcmc.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.gcmc 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.itemknn.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.itemknn 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.ldiffrec.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.ldiffrec 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.lightgcn.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.lightgcn 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.line.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.line 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.macridvae.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.macridvae 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.multidae.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.multidae 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.multivae.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.multivae 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.nais.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.nais 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.nceplrec.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.nceplrec 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.ncl.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.ncl 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.neumf.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.neumf 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.ngcf.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.ngcf 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.nncf.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.nncf 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.pop.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.pop 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.ract.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.ract 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.random.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.random 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.recvae.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.recvae 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.rst: -------------------------------------------------------------------------------- 1 | recbole.model.general\_recommender 2 | ========================================== 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | recbole.model.general_recommender.asymknn 8 | recbole.model.general_recommender.admmslim 9 | recbole.model.general_recommender.bpr 10 | recbole.model.general_recommender.cdae 11 | recbole.model.general_recommender.convncf 12 | recbole.model.general_recommender.dgcf 13 | recbole.model.general_recommender.dmf 14 | recbole.model.general_recommender.diffrec 15 | recbole.model.general_recommender.ease 16 | recbole.model.general_recommender.enmf 17 | recbole.model.general_recommender.fism 18 | recbole.model.general_recommender.gcmc 19 | recbole.model.general_recommender.itemknn 20 | recbole.model.general_recommender.ldiffrec 21 | recbole.model.general_recommender.lightgcn 22 | recbole.model.general_recommender.line 23 | recbole.model.general_recommender.macridvae 24 | recbole.model.general_recommender.multidae 25 | recbole.model.general_recommender.multivae 26 | recbole.model.general_recommender.nais 27 | recbole.model.general_recommender.nceplrec 28 | recbole.model.general_recommender.ncl 29 | recbole.model.general_recommender.neumf 30 | recbole.model.general_recommender.ngcf 31 | recbole.model.general_recommender.nncf 32 | recbole.model.general_recommender.pop 33 | recbole.model.general_recommender.ract 34 | recbole.model.general_recommender.random 35 | recbole.model.general_recommender.recvae 36 | recbole.model.general_recommender.sgl 37 | recbole.model.general_recommender.simplex 38 | recbole.model.general_recommender.slimelastic 39 | recbole.model.general_recommender.spectralcf 40 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.sgl.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.sgl 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.simplex.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.simplex 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.slimelastic.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.slimelastic 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.general_recommender.spectralcf.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.general_recommender.spectralcf 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.init.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.init 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.knowledge_aware_recommender.cfkg.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.knowledge_aware_recommender.cfkg 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.knowledge_aware_recommender.cke.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.knowledge_aware_recommender.cke 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.knowledge_aware_recommender.kgat.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.knowledge_aware_recommender.kgat 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.knowledge_aware_recommender.kgcn.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.knowledge_aware_recommender.kgcn 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.knowledge_aware_recommender.kgin.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.knowledge_aware_recommender.kgin 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.knowledge_aware_recommender.kgnnls.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.knowledge_aware_recommender.kgnnls 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.knowledge_aware_recommender.ktup.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.knowledge_aware_recommender.ktup 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.knowledge_aware_recommender.mcclk.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.knowledge_aware_recommender.mcclk 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.knowledge_aware_recommender.mkr.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.knowledge_aware_recommender.mkr 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.knowledge_aware_recommender.ripplenet.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.knowledge_aware_recommender.ripplenet 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.knowledge_aware_recommender.rst: -------------------------------------------------------------------------------- 1 | recbole.model.knowledge\_aware\_recommender 2 | =================================================== 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | recbole.model.knowledge_aware_recommender.cfkg 8 | recbole.model.knowledge_aware_recommender.cke 9 | recbole.model.knowledge_aware_recommender.kgat 10 | recbole.model.knowledge_aware_recommender.kgcn 11 | recbole.model.knowledge_aware_recommender.kgin 12 | recbole.model.knowledge_aware_recommender.kgnnls 13 | recbole.model.knowledge_aware_recommender.ktup 14 | recbole.model.knowledge_aware_recommender.mcclk 15 | recbole.model.knowledge_aware_recommender.mkr 16 | recbole.model.knowledge_aware_recommender.ripplenet 17 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.layers.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.layers 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.loss.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.loss 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.rst: -------------------------------------------------------------------------------- 1 | recbole.model 2 | ===================== 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | recbole.model.context_aware_recommender 8 | recbole.model.exlib_recommender 9 | recbole.model.general_recommender 10 | recbole.model.knowledge_aware_recommender 11 | recbole.model.sequential_recommender 12 | recbole.model.abstract_recommender 13 | recbole.model.init 14 | recbole.model.layers 15 | recbole.model.loss 16 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.bert4rec.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.bert4rec 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.caser.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.caser 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.core.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.core 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.dien.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.dien 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.din.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.din 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.fdsa.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.fdsa 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.fearec.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.fearec 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.fossil.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.fossil 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.fpmc.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.fpmc 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.gcsan.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.gcsan 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.gru4rec.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.gru4rec 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.gru4reccpr.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.gru4reccpr 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.gru4recf.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.gru4recf 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.gru4reckg.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.gru4reckg 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.hgn.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.hgn 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.hrm.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.hrm 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.ksr.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.ksr 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.lightsans.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.lightsans 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.narm.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.narm 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.nextitnet.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.nextitnet 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.npe.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.npe 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.repeatnet.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.repeatnet 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.rst: -------------------------------------------------------------------------------- 1 | recbole.model.sequential\_recommender 2 | ============================================= 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | recbole.model.sequential_recommender.bert4rec 8 | recbole.model.sequential_recommender.caser 9 | recbole.model.sequential_recommender.core 10 | recbole.model.sequential_recommender.din 11 | recbole.model.sequential_recommender.fdsa 12 | recbole.model.sequential_recommender.fossil 13 | recbole.model.sequential_recommender.fpmc 14 | recbole.model.sequential_recommender.gcsan 15 | recbole.model.sequential_recommender.gru4rec 16 | recbole.model.sequential_recommender.gru4recf 17 | recbole.model.sequential_recommender.gru4reckg 18 | recbole.model.sequential_recommender.hgn 19 | recbole.model.sequential_recommender.hrm 20 | recbole.model.sequential_recommender.ksr 21 | recbole.model.sequential_recommender.narm 22 | recbole.model.sequential_recommender.nextitnet 23 | recbole.model.sequential_recommender.npe 24 | recbole.model.sequential_recommender.repeatnet 25 | recbole.model.sequential_recommender.s3rec 26 | recbole.model.sequential_recommender.sasrec 27 | recbole.model.sequential_recommender.sasrecf 28 | recbole.model.sequential_recommender.shan 29 | recbole.model.sequential_recommender.srgnn 30 | recbole.model.sequential_recommender.stamp 31 | recbole.model.sequential_recommender.transrec 32 | recbole.model.sequential_recommender.fearec 33 | recbole.model.sequential_recommender.gru4reccpr 34 | recbole.model.sequential_recommender.sasreccpr 35 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.s3rec.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.s3rec 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.sasrec.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.sasrec 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.sasreccpr.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.sasreccpr 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.sasrecf.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.sasrecf 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.shan.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.shan 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.sine.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.sine 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.srgnn.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.srgnn 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.stamp.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.stamp 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.model.sequential_recommender.transrec.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.model.sequential_recommender.transrec 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.quick_start.quick_start.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.quick_start.quick_start 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.sampler.sampler.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.sampler.sampler 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.trainer.hyper_tuning.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.trainer.hyper_tuning 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.trainer.trainer.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.trainer.trainer 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.utils.case_study.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.utils.case_study 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.utils.enum_type.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.utils.enum_type 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.utils.logger.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.utils.logger 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/recbole/recbole.utils.utils.rst: -------------------------------------------------------------------------------- 1 | .. automodule:: recbole.utils.utils 2 | :members: 3 | :undoc-members: 4 | :show-inheritance: 5 | -------------------------------------------------------------------------------- /docs/source/user_guide/config_settings.rst: -------------------------------------------------------------------------------- 1 | Config Introduction 2 | =================== 3 | RecBole is able to config different parameters for controlling the experiment 4 | setup (e.g., data processing, data splitting, training and evaluation). 5 | The users can select the settings according to their own requirements. 6 | 7 | Config Settings 8 | ----------------------------- 9 | We split all the config settings into five parts: environment settings, data settings, model settings, training settings and evaluation settings. 10 | The introduction of different parameter configurations are presented as follows (for model settings, please read the specific model page in :doc:`model_intro`): 11 | 12 | .. toctree:: 13 | :maxdepth: 1 14 | 15 | config/environment_settings 16 | config/data_settings 17 | config/training_settings 18 | config/evaluation_settings 19 | 20 | How to set config? 21 | ----------------------------- 22 | RecBole supports three types of parameter configurations: Config files, Parameter Dicts and Command Line. 23 | The parameters are assigned via the Configuration module. 24 | 25 | For more details about setting config, please read 26 | 27 | .. toctree:: 28 | :maxdepth: 1 29 | 30 | config/parameters_configuration 31 | 32 | 33 | -------------------------------------------------------------------------------- /docs/source/user_guide/data_intro.rst: -------------------------------------------------------------------------------- 1 | Data Module Introduction 2 | ========================= 3 | 4 | RecBole not only implements lots of popular recommender models, but also collects and releases 44 commonly-used publiced datasets. 5 | You can freely download these datasets following our docs :doc:`data/dataset_download`. 6 | 7 | For extensibility and reusability, Recbole has a flexible and extensible data module. 8 | Our data module designs an elegant data flow that transforms raw data 9 | into the model input. Detailed as :doc:`data/data_flow`. 10 | In order to characterize most forms of the input data 11 | required by different recommendation tasks, RecBole designs an input data format called :doc:`data/atomic_files`. All the input data should be 12 | converted into `Atomic Files` format. 13 | Besides, we design a data structure called :doc:`data/interaction` to provides a unified internal data representation for different 14 | recommendation algorithms. 15 | 16 | Plus, RecBole supports both explicit feedback (labeled data) scenes and implicit feedback (unlabeled data) scenes. For explicit feedback scenes, 17 | users can set the `LABEL_FIELD` in the config and RecBole will train and test model based on the label. For implicit feedback scenes, RecBole will 18 | regard all the observed interactions as positive samples and automatically select the negative samples from the unobserved interactions (which is known as negative sampling). 19 | For more information about label setting in RecBole, 20 | please read :doc:`data/label_of_data`. 21 | 22 | Here are the related docs for data module: 23 | 24 | .. toctree:: 25 | :maxdepth: 1 26 | 27 | data/dataset_download 28 | data/data_flow 29 | data/atomic_files 30 | data/interaction 31 | data/label_of_data -------------------------------------------------------------------------------- /docs/source/user_guide/model/general/pop.rst: -------------------------------------------------------------------------------- 1 | Pop 2 | =========== 3 | 4 | Introduction 5 | --------------------- 6 | 7 | This is a model that records the popularity of items in the dataset and recommend the most popular items to users. 8 | 9 | Running with RecBole 10 | ------------------------- 11 | 12 | **Model Hyper-Parameters:** 13 | 14 | - No hyper-parameters 15 | 16 | 17 | **A Running Example:** 18 | 19 | Write the following code to a python file, such as `run.py` 20 | 21 | .. code:: python 22 | 23 | from recbole.quick_start import run_recbole 24 | 25 | run_recbole(model='Pop', dataset='ml-100k') 26 | 27 | And then: 28 | 29 | .. code:: bash 30 | 31 | python run.py 32 | 33 | 34 | If you want to change parameters, dataset or evaluation settings, take a look at 35 | 36 | - :doc:`../../../user_guide/config_settings` 37 | - :doc:`../../../user_guide/data_intro` 38 | - :doc:`../../../user_guide/train_eval_intro` 39 | - :doc:`../../../user_guide/usage` -------------------------------------------------------------------------------- /docs/source/user_guide/model/general/random.rst: -------------------------------------------------------------------------------- 1 | Random 2 | =========== 3 | 4 | Introduction 5 | --------------------- 6 | 7 | When discussing recommendation systems, accuracy is often regarded as the most crucial metric. 8 | However, besides accuracy, several other key metrics can evaluate the effectiveness of a recommendation system, such as diversity, coverage, and efficiency. 9 | In this context, the random recommendation algorithm is a valuable baseline. 10 | In terms of implementation, for a given user and item, the random recommendation algorithm provides a random rating. 11 | 12 | Running with RecBole 13 | 14 | 15 | 16 | **A Running Example:** 17 | 18 | Write the following code to a python file, such as `run.py` 19 | 20 | .. code:: python 21 | 22 | from recbole.quick_start import run_recbole 23 | 24 | run_recbole(model='Random', dataset='ml-100k') 25 | 26 | And then: 27 | 28 | .. code:: bash 29 | 30 | python run.py 31 | 32 | 33 | If you want to change parameters, dataset or evaluation settings, take a look at 34 | 35 | - :doc:`../../../user_guide/config_settings` 36 | - :doc:`../../../user_guide/data_intro` 37 | - :doc:`../../../user_guide/train_eval_intro` 38 | - :doc:`../../../user_guide/usage` -------------------------------------------------------------------------------- /docs/source/user_guide/usage.rst: -------------------------------------------------------------------------------- 1 | Usage 2 | =================== 3 | In order to help users learn the depth usage of RecBole, we write the following usage docs 4 | to give a detailed introduction about RecBole's features. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | usage/run_recbole 10 | usage/use_modules 11 | usage/parameter_tuning 12 | usage/running_new_dataset 13 | usage/running_different_models 14 | usage/load_pretrained_embedding 15 | usage/save_and_load_data_and_model 16 | usage/case_study 17 | usage/use_tensorboard 18 | usage/use_weights_and_biases 19 | usage/qa 20 | usage/significance_test 21 | usage/run_recbole_group 22 | -------------------------------------------------------------------------------- /docs/source/user_guide/usage/qa.rst: -------------------------------------------------------------------------------- 1 | Clarifications on some practical issues 2 | ========================================= 3 | 4 | **Q1**: 5 | 6 | Why the result of ``Dataset.item_num`` always one plus of the actual number of items in the dataset? 7 | 8 | **A1**: 9 | 10 | We add ``[PAD]`` for all the token like fields. Thus after remapping ID, ``0`` will be reserved for ``[PAD]``, which makes the result of ``Dataset.item_num`` more than the actual number. 11 | 12 | Note that for Knowledge-based models, we add one more relation called ``U-I Relation``. It describes the history interactions which will be used in :meth:`recbole.data.dataset.kg_dataset.KnowledgeBasedDataset.ckg_graph`. 13 | Thus the result of ``KGDataset.relation_num`` is two more than the actual number of relations. 14 | 15 | **Q2**: 16 | 17 | Why are the test results usually better than the best valid results? 18 | 19 | **A2**: 20 | 21 | For more rigorous evaluation, those user-item interaction records in validation sets will not be ranked while testing. 22 | Thus the distribution of validation & test sets may be inconsistent. 23 | 24 | However, this doesn't affect the comparison between models. 25 | -------------------------------------------------------------------------------- /docs/source/user_guide/usage/run_recbole.rst: -------------------------------------------------------------------------------- 1 | Use run_recbole 2 | ========================== 3 | We enclose the training and evaluation processes in the api of 4 | :func:`~recbole.quick_start.quick_start.run_recbole`, 5 | which is composed of: dataset loading, dataset splitting, model initialization, 6 | model training and model evaluation. 7 | 8 | If this process can satisfy your requirement, you can recall this api to use 9 | RecBole. 10 | 11 | You can create a python file (e.g., `run.py` ), and write the following code 12 | into the file. 13 | 14 | .. code:: python 15 | 16 | from recbole.quick_start import run_recbole 17 | 18 | run_recbole(dataset=dataset, model=model, config_file_list=config_file_list, config_dict=config_dict) 19 | 20 | :attr:`dataset` is the name of the data, such as 'ml-100k', 21 | :attr:`model` indicates the model name, such as 'BPR'. 22 | 23 | :attr:`config_file_list` indicates the configuration files, 24 | :attr:`config_dict` is the parameter dict. 25 | The two variables are used to config parameters in our toolkit. 26 | If you do not want to use the two variables to config parameters, 27 | please ignore them. In addition, we also support to control parameters 28 | by the command line. 29 | 30 | Please refer to :doc:`../config_settings` for more details about config settings. 31 | 32 | Then execute the following command to run:: 33 | 34 | .. code:: bash 35 | 36 | python run.py --[param_name]=[param_value] 37 | 38 | `--[param_name]=[param_value]` is the way to control parameters by 39 | the command line. 40 | -------------------------------------------------------------------------------- /docs/source/user_guide/usage/run_recbole_group.rst: -------------------------------------------------------------------------------- 1 | Use run_recbole_group 2 | ========================== 3 | 4 | We have implemented ``run_recbole_group.py`` 5 | to support users to evaluate multiple models in a unified configuration and 6 | display the best results on each evaluation metric. 7 | Meanwhile, we support the conversion of evaluation results into latex code, 8 | so that users can use it conveniently when writing papers. 9 | 10 | 11 | Like :func:`~recbole.quick_start.quick_start.run_recbole`, you can execute the following command to run: 12 | 13 | .. code:: bash 14 | 15 | python run_recbole_group.py --[model_list]=[model_list] --[dataset]=[dataset] --[config_files]=[config_files] 16 | --[valid_latex]=[valid_latex] --[test_latex]=[test_latex] 17 | 18 | `--[model_list]=[model_list]` is used to select the scope of the models for evaluating. 19 | Different models are separated by commas, such as 'BPR,LightGCN'. 20 | `--[dataset]=[dataset]` is the way to control dataset by the command line, such as 'ml-100k'. 21 | All models run on this unified dataset. 22 | `--[config_files]=[config_files]` indicates the configuration files. 23 | Please refer to :doc:`../config_settings` for more details about config settings. 24 | `--[valid_latex]=[valid_latex]` is the way to control 25 | the output path of the latex code for the results on valid dataset. 26 | `--[test_latex]=[test_latex]` is the way to control 27 | the output path of the latex code for the results on test dataset. 28 | -------------------------------------------------------------------------------- /docs/source/user_guide/usage/use_tensorboard.rst: -------------------------------------------------------------------------------- 1 | Use Tensorboard 2 | ==================== 3 | 4 | In the latest release, RecBole allows tracking and visualizing train loss and valid score with TensorBoard. 5 | 6 | In Recbole, TensorBoard output to `./log_tensorboard/` directory by default. You can start TensorBoard with: 7 | 8 | .. code:: sh 9 | 10 | $ tensorboard --logdir=log_tensorboard 11 | 12 | Then, go to the URL it provides OR to http://localhost:6006/. You can see the following page. 13 | 14 | .. image:: ../../asset/tensorboard_1.png 15 | 16 | This dashboard shows how the train loss and valid score change with every epoch. 17 | 18 | You can also compare hyperparameters by switching to the 'HPAPAMS' page 19 | from the header menu. It’s helpful to compare these metrics across different training runs to improve your model. 20 | 21 | .. image:: ../../asset/tensorboard_2.png -------------------------------------------------------------------------------- /hyper.test: -------------------------------------------------------------------------------- 1 | learning_rate loguniform -8,0 2 | embedding_size choice [64,96,128] 3 | train_batch_size choice [512,1024,2048] 4 | mlp_hidden_size choice ['[64,64,64]','[128,128]'] -------------------------------------------------------------------------------- /recbole/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from __future__ import print_function 3 | from __future__ import division 4 | 5 | __version__ = "1.2.1" 6 | -------------------------------------------------------------------------------- /recbole/config/__init__.py: -------------------------------------------------------------------------------- 1 | from recbole.config.configurator import Config 2 | -------------------------------------------------------------------------------- /recbole/data/__init__.py: -------------------------------------------------------------------------------- 1 | from recbole.data.utils import * 2 | 3 | __all__ = [ 4 | "create_dataset", 5 | "data_preparation", 6 | "save_split_dataloaders", 7 | "load_split_dataloaders", 8 | ] 9 | -------------------------------------------------------------------------------- /recbole/data/dataloader/__init__.py: -------------------------------------------------------------------------------- 1 | from recbole.data.dataloader.abstract_dataloader import * 2 | from recbole.data.dataloader.general_dataloader import * 3 | from recbole.data.dataloader.knowledge_dataloader import * 4 | from recbole.data.dataloader.user_dataloader import * 5 | -------------------------------------------------------------------------------- /recbole/data/dataset/__init__.py: -------------------------------------------------------------------------------- 1 | from recbole.data.dataset.dataset import Dataset 2 | from recbole.data.dataset.sequential_dataset import SequentialDataset 3 | from recbole.data.dataset.kg_dataset import KnowledgeBasedDataset 4 | from recbole.data.dataset.kg_seq_dataset import KGSeqDataset 5 | from recbole.data.dataset.decisiontree_dataset import DecisionTreeDataset 6 | from recbole.data.dataset.customized_dataset import * 7 | -------------------------------------------------------------------------------- /recbole/data/dataset/kg_seq_dataset.py: -------------------------------------------------------------------------------- 1 | # @Time : 2020/9/23 2 | # @Author : Xingyu Pan 3 | # @Email : panxingyu@ruc.edu.cn 4 | 5 | """ 6 | recbole.data.kg_seq_dataset 7 | ############################# 8 | """ 9 | 10 | from recbole.data.dataset import SequentialDataset, KnowledgeBasedDataset 11 | 12 | 13 | class KGSeqDataset(SequentialDataset, KnowledgeBasedDataset): 14 | """Containing both processing of Sequential Models and Knowledge-based Models. 15 | 16 | Inherit from :class:`~recbole.data.dataset.sequential_dataset.SequentialDataset` and 17 | :class:`~recbole.data.dataset.kg_dataset.KnowledgeBasedDataset`. 18 | """ 19 | 20 | def __init__(self, config): 21 | super().__init__(config) 22 | -------------------------------------------------------------------------------- /recbole/evaluator/__init__.py: -------------------------------------------------------------------------------- 1 | from recbole.evaluator.base_metric import * 2 | from recbole.evaluator.metrics import * 3 | from recbole.evaluator.evaluator import * 4 | from recbole.evaluator.register import * 5 | from recbole.evaluator.collector import * 6 | -------------------------------------------------------------------------------- /recbole/evaluator/evaluator.py: -------------------------------------------------------------------------------- 1 | # -*- encoding: utf-8 -*- 2 | # @Time : 2021/6/25 3 | # @Author : Zhichao Feng 4 | # @email : fzcbupt@gmail.com 5 | 6 | """ 7 | recbole.evaluator.evaluator 8 | ##################################### 9 | """ 10 | 11 | from recbole.evaluator.register import metrics_dict 12 | from recbole.evaluator.collector import DataStruct 13 | from collections import OrderedDict 14 | 15 | 16 | class Evaluator(object): 17 | """Evaluator is used to check parameter correctness, and summarize the results of all metrics.""" 18 | 19 | def __init__(self, config): 20 | self.config = config 21 | self.metrics = [metric.lower() for metric in self.config["metrics"]] 22 | self.metric_class = {} 23 | 24 | for metric in self.metrics: 25 | self.metric_class[metric] = metrics_dict[metric](self.config) 26 | 27 | def evaluate(self, dataobject: DataStruct): 28 | """calculate all the metrics. It is called at the end of each epoch 29 | 30 | Args: 31 | dataobject (DataStruct): It contains all the information needed for metrics. 32 | 33 | Returns: 34 | collections.OrderedDict: such as ``{'hit@20': 0.3824, 'recall@20': 0.0527, 'hit@10': 0.3153, 'recall@10': 0.0329, 'gauc': 0.9236}`` 35 | 36 | """ 37 | result_dict = OrderedDict() 38 | for metric in self.metrics: 39 | metric_val = self.metric_class[metric].calculate_metric(dataobject) 40 | result_dict.update(metric_val) 41 | return result_dict 42 | -------------------------------------------------------------------------------- /recbole/model/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from __future__ import print_function 3 | from __future__ import division 4 | -------------------------------------------------------------------------------- /recbole/model/context_aware_recommender/__init__.py: -------------------------------------------------------------------------------- 1 | from recbole.model.context_aware_recommender.afm import AFM 2 | from recbole.model.context_aware_recommender.autoint import AutoInt 3 | from recbole.model.context_aware_recommender.dcn import DCN 4 | from recbole.model.context_aware_recommender.dcnv2 import DCNV2 5 | from recbole.model.context_aware_recommender.deepfm import DeepFM 6 | from recbole.model.context_aware_recommender.dssm import DSSM 7 | from recbole.model.context_aware_recommender.ffm import FFM 8 | from recbole.model.context_aware_recommender.fm import FM 9 | from recbole.model.context_aware_recommender.fnn import FNN 10 | from recbole.model.context_aware_recommender.fwfm import FwFM 11 | from recbole.model.context_aware_recommender.lr import LR 12 | from recbole.model.context_aware_recommender.nfm import NFM 13 | from recbole.model.context_aware_recommender.pnn import PNN 14 | from recbole.model.context_aware_recommender.widedeep import WideDeep 15 | from recbole.model.context_aware_recommender.xdeepfm import xDeepFM 16 | from recbole.model.context_aware_recommender.fignn import FiGNN 17 | from recbole.model.context_aware_recommender.kd_dagfm import KD_DAGFM 18 | from recbole.model.context_aware_recommender.eulernet import EulerNet 19 | -------------------------------------------------------------------------------- /recbole/model/context_aware_recommender/lr.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # @Time : 2020/08/30 3 | # @Author : Xinyan Fan 4 | # @Email : xinyan.fan@ruc.edu.cn 5 | # @File : lr.py 6 | 7 | r""" 8 | LR 9 | ##################################################### 10 | Reference: 11 | Matthew Richardson et al. "Predicting Clicks Estimating the Click-Through Rate for New Ads." in WWW 2007. 12 | """ 13 | 14 | import torch.nn as nn 15 | from torch.nn.init import xavier_normal_ 16 | 17 | from recbole.model.abstract_recommender import ContextRecommender 18 | 19 | 20 | class LR(ContextRecommender): 21 | r"""LR is a context-based recommendation model. 22 | It aims to predict the CTR given a set of features by using logistic regression, 23 | which is ideally suited for probabilities as it always predicts a value between 0 and 1: 24 | 25 | .. math:: 26 | CTR = \frac{1}{1+e^{-Z}} 27 | 28 | Z = \sum_{i} {w_i}{x_i} 29 | """ 30 | 31 | def __init__(self, config, dataset): 32 | super(LR, self).__init__(config, dataset) 33 | 34 | self.sigmoid = nn.Sigmoid() 35 | self.loss = nn.BCEWithLogitsLoss() 36 | 37 | # parameters initialization 38 | self.apply(self._init_weights) 39 | 40 | def _init_weights(self, module): 41 | if isinstance(module, nn.Embedding): 42 | xavier_normal_(module.weight.data) 43 | 44 | def forward(self, interaction): 45 | output = self.first_order_linear(interaction) 46 | return output.squeeze(-1) 47 | 48 | def calculate_loss(self, interaction): 49 | label = interaction[self.LABEL] 50 | 51 | output = self.forward(interaction) 52 | return self.loss(output, label) 53 | 54 | def predict(self, interaction): 55 | return self.sigmoid(self.forward(interaction)) 56 | -------------------------------------------------------------------------------- /recbole/model/exlib_recommender/__init__.py: -------------------------------------------------------------------------------- 1 | from recbole.model.exlib_recommender.lightgbm import LightGBM 2 | from recbole.model.exlib_recommender.xgboost import XGBoost 3 | -------------------------------------------------------------------------------- /recbole/model/exlib_recommender/lightgbm.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # @Time : 2020/1/17 3 | # @Author : Chen Yang 4 | # @Email : 254170321@qq.com 5 | 6 | r""" 7 | recbole.model.exlib_recommender.lightgbm 8 | ########################################## 9 | """ 10 | 11 | import lightgbm as lgb 12 | from recbole.utils import ModelType, InputType 13 | 14 | 15 | class LightGBM(lgb.Booster): 16 | r"""LightGBM is inherited from lgb.Booster""" 17 | 18 | type = ModelType.DECISIONTREE 19 | input_type = InputType.POINTWISE 20 | 21 | def __init__(self, config, dataset): 22 | super(lgb.Booster, self).__init__() 23 | 24 | def to(self, device): 25 | return self 26 | 27 | def load_state_dict(self, model_file): 28 | r"""Load state dictionary 29 | 30 | Args: 31 | model_file (str): file path of saved model 32 | 33 | """ 34 | self = lgb.Booster(model_file=model_file) 35 | 36 | def load_other_parameter(self, other_parameter): 37 | r"""Load other parameters""" 38 | pass 39 | -------------------------------------------------------------------------------- /recbole/model/exlib_recommender/xgboost.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # @Time : 2020/11/19 3 | # @Author : Chen Yang 4 | # @Email : 254170321@qq.com 5 | 6 | r""" 7 | recbole.model.exlib_recommender.xgboost 8 | ######################################## 9 | """ 10 | 11 | import xgboost as xgb 12 | from recbole.utils import ModelType, InputType 13 | 14 | 15 | class XGBoost(xgb.Booster): 16 | r"""XGBoost is inherited from xgb.Booster""" 17 | 18 | type = ModelType.DECISIONTREE 19 | input_type = InputType.POINTWISE 20 | 21 | def __init__(self, config, dataset): 22 | super().__init__(params=None, cache=(), model_file=None) 23 | 24 | def to(self, device): 25 | return self 26 | 27 | def load_state_dict(self, model_file): 28 | r"""Load state dictionary 29 | 30 | Args: 31 | model_file (str): file path of saved model 32 | 33 | """ 34 | self.load_model(model_file) 35 | 36 | def load_other_parameter(self, other_parameter): 37 | r"""Load other parameters""" 38 | pass 39 | -------------------------------------------------------------------------------- /recbole/model/general_recommender/random.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # @Time : 2023/03/01 3 | # @Author : João Felipe Guedes 4 | # @Email : guedes.joaofelipe@poli.ufrj.br 5 | # UPDATE 6 | 7 | r""" 8 | Random 9 | ################################################ 10 | 11 | """ 12 | 13 | import torch 14 | import random 15 | 16 | from recbole.model.abstract_recommender import GeneralRecommender 17 | from recbole.utils import InputType, ModelType 18 | 19 | 20 | class Random(GeneralRecommender): 21 | """Random is an fundamental model that recommends random items.""" 22 | 23 | input_type = InputType.POINTWISE 24 | type = ModelType.TRADITIONAL 25 | 26 | def __init__(self, config, dataset): 27 | super(Random, self).__init__(config, dataset) 28 | torch.manual_seed(config["seed"] + self.n_users + self.n_items) 29 | self.fake_loss = torch.nn.Parameter(torch.zeros(1)) 30 | 31 | def forward(self): 32 | pass 33 | 34 | def calculate_loss(self, interaction): 35 | return torch.nn.Parameter(torch.zeros(1)) 36 | 37 | def predict(self, interaction): 38 | return torch.rand(len(interaction), device=self.device).squeeze(-1) 39 | 40 | def full_sort_predict(self, interaction): 41 | batch_user_num = interaction[self.USER_ID].shape[0] 42 | result = torch.rand(self.n_items, 1).to(torch.float64) 43 | result = torch.repeat_interleave(result.unsqueeze(0), batch_user_num, dim=0) 44 | return result.view(-1) 45 | -------------------------------------------------------------------------------- /recbole/model/init.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # @Time : 2020/9/16 3 | # @Author : Shanlei Mu 4 | # @Email : slmu@ruc.edu.cn 5 | 6 | """ 7 | recbole.model.init 8 | ######################## 9 | """ 10 | 11 | import torch.nn as nn 12 | from torch.nn.init import xavier_normal_, xavier_uniform_, constant_ 13 | 14 | 15 | def xavier_normal_initialization(module): 16 | r"""using `xavier_normal_`_ in PyTorch to initialize the parameters in 17 | nn.Embedding and nn.Linear layers. For bias in nn.Linear layers, 18 | using constant 0 to initialize. 19 | 20 | .. _`xavier_normal_`: 21 | https://pytorch.org/docs/stable/nn.init.html?highlight=xavier_normal_#torch.nn.init.xavier_normal_ 22 | 23 | Examples: 24 | >>> self.apply(xavier_normal_initialization) 25 | """ 26 | if isinstance(module, nn.Embedding): 27 | xavier_normal_(module.weight.data) 28 | elif isinstance(module, nn.Linear): 29 | xavier_normal_(module.weight.data) 30 | if module.bias is not None: 31 | constant_(module.bias.data, 0) 32 | 33 | 34 | def xavier_uniform_initialization(module): 35 | r"""using `xavier_uniform_`_ in PyTorch to initialize the parameters in 36 | nn.Embedding and nn.Linear layers. For bias in nn.Linear layers, 37 | using constant 0 to initialize. 38 | 39 | .. _`xavier_uniform_`: 40 | https://pytorch.org/docs/stable/nn.init.html?highlight=xavier_uniform_#torch.nn.init.xavier_uniform_ 41 | 42 | Examples: 43 | >>> self.apply(xavier_uniform_initialization) 44 | """ 45 | if isinstance(module, nn.Embedding): 46 | xavier_uniform_(module.weight.data) 47 | elif isinstance(module, nn.Linear): 48 | xavier_uniform_(module.weight.data) 49 | if module.bias is not None: 50 | constant_(module.bias.data, 0) 51 | -------------------------------------------------------------------------------- /recbole/model/knowledge_aware_recommender/__init__.py: -------------------------------------------------------------------------------- 1 | from recbole.model.knowledge_aware_recommender.cfkg import CFKG 2 | from recbole.model.knowledge_aware_recommender.cke import CKE 3 | from recbole.model.knowledge_aware_recommender.kgat import KGAT 4 | from recbole.model.knowledge_aware_recommender.kgcn import KGCN 5 | from recbole.model.knowledge_aware_recommender.kgin import KGIN 6 | from recbole.model.knowledge_aware_recommender.kgnnls import KGNNLS 7 | from recbole.model.knowledge_aware_recommender.ktup import KTUP 8 | from recbole.model.knowledge_aware_recommender.mcclk import MCCLK 9 | from recbole.model.knowledge_aware_recommender.mkr import MKR 10 | from recbole.model.knowledge_aware_recommender.ripplenet import RippleNet 11 | -------------------------------------------------------------------------------- /recbole/properties/dataset/kg_url.yaml: -------------------------------------------------------------------------------- 1 | amazon-books: https://recbole.s3-accelerate.amazonaws.com/KGDatasets/Amazon-book-KG.zip 2 | lfm1b-albums-merged: https://recbole.s3-accelerate.amazonaws.com/KGDatasets/LFM-1b-KG.zip 3 | lfm1b-artists-merged: https://recbole.s3-accelerate.amazonaws.com/KGDatasets/LFM-1b-KG.zip 4 | lfm1b-tracks-merged: https://recbole.s3-accelerate.amazonaws.com/KGDatasets/LFM-1b-KG.zip 5 | lfm1b-albums-not-merged: https://recbole.s3-accelerate.amazonaws.com/KGDatasets/LFM-1b-KG.zip 6 | lfm1b-artists-not-merged: https://recbole.s3-accelerate.amazonaws.com/KGDatasets/LFM-1b-KG.zip 7 | lfm1b-tracks-not-merged: https://recbole.s3-accelerate.amazonaws.com/KGDatasets/LFM-1b-KG.zip 8 | ml-100k: https://recbole.s3-accelerate.amazonaws.com/KGDatasets/MovieLens-KG.zip 9 | ml-1m: https://recbole.s3-accelerate.amazonaws.com/KGDatasets/MovieLens-KG.zip 10 | ml-10m: https://recbole.s3-accelerate.amazonaws.com/KGDatasets/MovieLens-KG.zip 11 | ml-20m: https://recbole.s3-accelerate.amazonaws.com/KGDatasets/MovieLens-KG.zip 12 | -------------------------------------------------------------------------------- /recbole/properties/model/ADMMSLIM.yaml: -------------------------------------------------------------------------------- 1 | lambda1: 3.0 # (float) L1-norm regularization parameter. 2 | lambda2: 200.0 # (float) L2-norm regularization parameter. 3 | alpha: 0.50 # (float) The exponents to control the power-law in the regularization terms. 4 | rho: 4000.0 # (float) The penalty applies to the squared difference between primal variables. 5 | k: 100 # (int) The number of running iterations. 6 | positive_only: True # (bool) Whether or not to preserve all positive values only. 7 | center_columns: False # (bool) Whether or not to use additional item-bias terms. -------------------------------------------------------------------------------- /recbole/properties/model/AFM.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 10 # (int) The embedding size of features. 2 | attention_size: 25 # (int) The vector size in attention mechanism. 3 | dropout_prob: 0.3 # (float) The dropout rate. 4 | reg_weight: 2.0 # (float) The L2 regularization weight. -------------------------------------------------------------------------------- /recbole/properties/model/AsymKNN.yaml: -------------------------------------------------------------------------------- 1 | k: 100 # Number of neighbors to consider in the similarity calculation. 2 | q: 1 # Exponent for adjusting the 'locality of scoring function' after similarity computation. 3 | beta: 1.0 # Parameter for controlling the balance between factors in the final score normalization. 4 | alpha: 0.5 # Weight parameter for asymmetric cosine similarity 5 | knn_method: 'item' # Calculate the similarity of users if method is 'user', otherwise, calculate the similarity of items. -------------------------------------------------------------------------------- /recbole/properties/model/AutoInt.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 10 # (int) The embedding size of features. 2 | attention_size: 16 # (int) The vector size in attention mechanism. 3 | n_layers: 3 # (int) The number of attention layers. 4 | num_heads: 2 # (int) The number of attention heads. 5 | dropout_probs: [0.2,0.2,0.2] # (list of float) The dropout rate of dropout layer. 6 | mlp_hidden_size: [128,128] # (list of int) The hidden size of MLP layers. -------------------------------------------------------------------------------- /recbole/properties/model/BERT4Rec.yaml: -------------------------------------------------------------------------------- 1 | n_layers: 2 # (int) The number of transformer layers in transformer encoder. 2 | n_heads: 2 # (int) The number of attention heads for multi-head attention layer. 3 | hidden_size: 64 # (int) The number of features in the hidden state. 4 | inner_size: 256 # (int) The inner hidden size in feed-forward layer. 5 | hidden_dropout_prob: 0.2 # (float) The probability of an element to be zeroed. 6 | attn_dropout_prob: 0.2 # (float) The probability of an attention score to be zeroed. 7 | hidden_act: 'gelu' # (str) The activation function in feed-forward layer. 8 | layer_norm_eps: 1e-12 # (float) A value added to the denominator for numerical stability. 9 | initializer_range: 0.02 # (float) The standard deviation for normal initialization. 10 | mask_ratio: 0.2 # (float) The probability for a item replaced by MASK token. 11 | loss_type: 'CE' # (str) The type of loss function. 12 | transform: mask_itemseq # (str) The transform operation for batch data process. 13 | ft_ratio: 0.5 # (float) The probability of generating fine-tuning samples 14 | -------------------------------------------------------------------------------- /recbole/properties/model/BPR.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users and items. -------------------------------------------------------------------------------- /recbole/properties/model/CDAE.yaml: -------------------------------------------------------------------------------- 1 | loss_type: BCE # (str) The loss function of model. Range in [BCE, MSE]. 2 | hid_activation: relu # (str) The hidden layer activation function. Range in [sigmoid, relu, tanh]. 3 | out_activation: sigmoid # (str) The output layer activation function. Range in [sigmoid, relu]. 4 | corruption_ratio: 0.5 # (float) The corruption ratio of the input. 5 | embedding_size: 64 # (int) The embedding size of user. 6 | reg_weight_1: 0. # (float) L1-regularization weight. 7 | reg_weight_2: 0.01 # (float) L2-regularization weight. 8 | -------------------------------------------------------------------------------- /recbole/properties/model/CFKG.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users, items, entities and relations. 2 | loss_function: 'inner_product' # (str) The optimization loss function. Range in ['inner_product', 'transe']. 3 | margin: 1.0 # (float) The margin in margin loss, only used in 'transe'. -------------------------------------------------------------------------------- /recbole/properties/model/CKE.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users, items and entities. 2 | kg_embedding_size: 64 # (int) The embedding size of relations in knowledge graph. 3 | reg_weights: [1e-2,1e-2] # (list of float) The L2 regularization weights. -------------------------------------------------------------------------------- /recbole/properties/model/CORE.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The number of features in the hidden state. 2 | inner_size: 256 # (int) The inner hidden size in feed-forward layer. 3 | n_layers: 2 # (int) The number of transformer layers in transformer encoder. 4 | n_heads: 2 # (int) The number of attention heads for multi-head attention layer. 5 | hidden_dropout_prob: 0.5 # (float) The probability of an element to be zeroed. 6 | attn_dropout_prob: 0.5 # (float) The probability of an attention score to be zeroed. 7 | hidden_act: gelu # (str) The activation function in feed-forward layer. 8 | layer_norm_eps: 1e-12 # (float) A value added to the denominator for numerical stability. 9 | initializer_range: 0.02 # (float) The standard deviation for normal initialization. 10 | loss_type: CE # (str) The type of loss function. Range in [CE, BPR]. 11 | dnn_type: trm # (str) The type of DNN. Range in [trm, ave]. 12 | 13 | sess_dropout: 0.2 # (float) The probability of item embeddings in a session to be zeroed. 14 | item_dropout: 0.2 # (float) The probability of candidate item embeddings to be zeroed. 15 | temperature: 0.07 # (float) Temperature for contrastive loss. 16 | -------------------------------------------------------------------------------- /recbole/properties/model/Caser.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users and items. 2 | dropout_prob: 0.4 # (float) The dropout rate. 3 | reg_weight: 1e-4 # (float) The L2 regularization weight. 4 | nv: 4 # (int) The number of vertical Convolutional filters. 5 | nh: 8 # (int) The number of horizontal Convolutional filters. 6 | loss_type: 'CE' # (str) The type of loss function. 7 | -------------------------------------------------------------------------------- /recbole/properties/model/ConvNCF.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users and items. 2 | cnn_channels: [1, 32, 32, 32, 32] # (list of int) The number of channels in CNN layers. 3 | cnn_kernels: [4, 4, 2, 2] # (list of int) The size of convolutional kernel in CNN layers. 4 | cnn_strides: [4, 4, 2, 2] # (list of int) The strides of convolution in CNN layers. 5 | dropout_prob: 0.2 # (float) The dropout rate in the linear predict layer. 6 | reg_weights: [0.1, 0.1] # (list of float) The L2 regularization weights. 7 | train_method: 'no_pretrain' # (str) The training method. Range in ['after_pretrain', 'no_pretrain']. 8 | pre_model_path: '' # (str) The path of pretrained model. -------------------------------------------------------------------------------- /recbole/properties/model/DCN.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 10 # (int) The embedding size of features. 2 | mlp_hidden_size: [256, 256, 256] # (list of int) The hidden size of MLP layers. 3 | cross_layer_num: 6 # (int) The number of cross layers. 4 | reg_weight: 2 # (int) The L2 regularization weight. 5 | dropout_prob: 0.2 # (float) The dropout rate. -------------------------------------------------------------------------------- /recbole/properties/model/DCNV2.yaml: -------------------------------------------------------------------------------- 1 | mixed: False # (bool) The structure of cross network. 2 | structure: 'stacked' # (string) The combination method between cross network and deep network. 3 | cross_layer_num: 3 # (int) The number of cross network layers. 4 | expert_num: 4 # (int) The number of experts in mixed cross network. 5 | low_rank: 128 # (int) The size of low rank space. 6 | embedding_size: 16 # (int) The embedding size of features. 7 | mlp_hidden_size: [768, 768] # (list of int) The hidden size of deep network. 8 | reg_weight: 2 # (int) The L2 regularization weight. 9 | dropout_prob: 0.2 # (float) The dropout rate. 10 | -------------------------------------------------------------------------------- /recbole/properties/model/DGCF.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users and items. 2 | n_factors: 4 # (int) The number of factors for disentanglement. 3 | n_iterations: 2 # (int) The number of iterations for each layer. 4 | n_layers: 1 # (int) The number of reasoning layers. 5 | reg_weight: 1e-3 # (float) The L2 regularization weight. 6 | cor_weight: 0.01 # (float) The correlation loss weight. -------------------------------------------------------------------------------- /recbole/properties/model/DIEN.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 10 # (int) The embedding size of features. 2 | mlp_hidden_size: [256,256,256] # (list of int) The hidden size of MLP layers. 3 | dropout_prob: 0.0 # (float) The dropout rate. 4 | pooling_mode: 'mean' # (str) Pooling mode of sequence data. 5 | gru_type: 'AUGRU' # (str) GRU type of Interest Evolving Layer. 6 | alpha: 1.0 # (float) Weight to balance the interest representation and CTR prediction. -------------------------------------------------------------------------------- /recbole/properties/model/DIN.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 10 # (int) The embedding size of features. 2 | mlp_hidden_size: [256,256,256] # (list of int) The hidden size of MLP layers. 3 | dropout_prob: 0.0 # (float) The dropout rate. 4 | pooling_mode: 'mean' # (str) Pooling mode of sequence data. 5 | 6 | -------------------------------------------------------------------------------- /recbole/properties/model/DMF.yaml: -------------------------------------------------------------------------------- 1 | # WARNING: 2 | # 1. if you set inter_matrix_type='rating', you must set `unused_col: ~` in your data config files. 3 | # 2. The dimensions of the last layer of users and items must be the same 4 | 5 | inter_matrix_type: '01' # (str) Type of interaction matrix. Range in ['01', 'rating']. 6 | user_embedding_size: 64 # (int) The initial embedding size of users. 7 | item_embedding_size: 64 # (int) The initial embedding size of items. 8 | user_hidden_size_list: [64, 64] # (list of int) The hidden size of each layer in MLP for users. 9 | item_hidden_size_list: [64, 64] # (list of int) The hidden size of each layer in MLP for items. 10 | embedding_size: 10 # (int) The embedding size of features. -------------------------------------------------------------------------------- /recbole/properties/model/DSSM.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 10 # (int) The embedding size of features. 2 | mlp_hidden_size: [256, 256, 256] # (list of int) The hidden size of MLP layers. 3 | dropout_prob: 0.3 # (float) The dropout rate of edge in the linear predict layer. 4 | double_tower: True # (bool) Whether or not to use the double-tower mode. -------------------------------------------------------------------------------- /recbole/properties/model/DeepFM.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 10 # (int) The embedding size of features. 2 | mlp_hidden_size: [128, 128, 128] # (list of int) The hidden size of MLP layers. 3 | dropout_prob: 0.2 # (float) The dropout rate. 4 | -------------------------------------------------------------------------------- /recbole/properties/model/DiffRec.yaml: -------------------------------------------------------------------------------- 1 | # params for the diffusion 2 | noise_schedule: 'linear' # (str) The schedule for noise generating: [linear, linear-var, cosine, binomial] 3 | noise_scale: 0.001 # (int) The scale for noise generating 4 | noise_min: 0.0005 # (int) Noise lower bound for noise generating 5 | noise_max: 0.005 # (int) Noise upper bound for noise generating 6 | sampling_noise: False # (bool) Whether to use sampling noise 7 | sampling_steps: 0 # (int) Steps of the forward process during inference 8 | reweight: True # (bool) Assign different weight to different timestep or not 9 | mean_type: 'x0' # (str) MeanType for diffusion: [x0, eps] 10 | steps: 5 # (int) Diffusion steps 11 | history_num_per_term: 10 # (int) The number of history items needed to calculate loss weight 12 | beta_fixed: True # (bool) Whether to fix the variance of the first step to prevent overfitting 13 | 14 | # params for the model 15 | dims_dnn: [300] # (list of int) The dims for the DNN 16 | embedding_size: 10 # (int) Timestep embedding size 17 | mlp_act_func: 'tanh' # (str) Activation function for MLP 18 | time-aware: False # (bool) T-DiffRec or not 19 | w_max: 1 # (int) The upper bound of the time-aware interaction weight 20 | w_min: 0.1 # (int) The lower bound of the time-aware interaction weight 21 | -------------------------------------------------------------------------------- /recbole/properties/model/EASE.yaml: -------------------------------------------------------------------------------- 1 | reg_weight: 250.0 # (float) The L2 regularization weight. -------------------------------------------------------------------------------- /recbole/properties/model/ENMF.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of user. 2 | dropout_prob: 0.7 # (float) The dropout ratio of the embedding. 3 | reg_weight: 0.0 # (float) L2-regularization weight. 4 | negative_weight: 0.5 # (float) The weight of non-observed data. -------------------------------------------------------------------------------- /recbole/properties/model/EulerNet.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 16 # (int) The embedding size of features. 2 | order_list: [30] # (list) The order vectors of EulerNet 3 | drop_ex: 0.3 # (float) The dropout rate for the modulus and phase 4 | drop_im: 0.3 # (float) The dropout rate for the real and imaginary part 5 | apply_norm: False # (bool) Whether perform the layer norm 6 | reg_weight: 1e-5 # (float) The L2 regularization weight. -------------------------------------------------------------------------------- /recbole/properties/model/FDSA.yaml: -------------------------------------------------------------------------------- 1 | n_layers: 2 # (int) The number of transformer layers in transformer encoder. 2 | n_heads: 2 # (int) The number of attention heads for multi-head attention layer. 3 | hidden_size: 64 # (int) The number of features in the hidden state. 4 | inner_size: 256 # (int) The inner hidden size in feed-forward layer. 5 | hidden_dropout_prob: 0.5 # (float) The probability of an element to be zeroed. 6 | attn_dropout_prob: 0.5 # (float) The probability of an attention score to be zeroed. 7 | hidden_act: 'gelu' # (str) The activation function in feed-forward layer. 8 | layer_norm_eps: 1e-12 # (float) A value added to the denominator for numerical stability. 9 | initializer_range: 0.02 # (float) The standard deviation for normal initialization. 10 | selected_features: ['class'] # (list of str) The list of selected item features. 11 | pooling_mode: 'mean' # (str) The intra-feature pooling mode. 12 | loss_type: 'CE' # (str) The type of loss function. -------------------------------------------------------------------------------- /recbole/properties/model/FEARec.yaml: -------------------------------------------------------------------------------- 1 | n_layers: 2 # (int) The number of transformer layers in transformer encoder. 2 | n_heads: 2 # (int) The number of attention heads for multi-head attention layer. 3 | hidden_size: 64 # (int) The number of features in the hidden state 4 | inner_size: 256 # (int) The inner hidden size in feed-forward layer. 5 | hidden_dropout_prob: 0.5 # (float) The probability of an element to be zeroed. 6 | attn_dropout_prob: 0.5 # (float) The probability of an attention score to be zeroed. 7 | hidden_act: 'gelu' # (str) The activation function in feed-forward layer. 8 | layer_norm_eps: 1e-12 # (float) A value added to the denominator for numerical stability. 9 | initializer_range: 0.02 # (float) The standard deviation for normal initialization. 10 | loss_type: 'CE' # (str) The type of loss function. 11 | lmd: 0.1 # (float) The weight of unsupervised normalized CE loss. 12 | lmd_sem: 0.1 # (float) The weight of supervised normalized CE loss. 13 | 14 | global_ratio: 1 # (float) The ratio of frequency components 15 | dual_domain: False # (bool) Frequency domain processing or not 16 | std: False # (bool) Use the specific time index or not 17 | spatial_ratio: 0 # (float) The ratio of the spatial domain and frequency domain 18 | fredom: False # (bool) Regularization in the frequency domain or not 19 | fredom_type: None # (str) The type of loss in different scenarios 20 | topk_factor: 1 # (int) To aggregate time delayed sequences with high autocorrelation 21 | -------------------------------------------------------------------------------- /recbole/properties/model/FFM.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 10 # (int) The embedding size of features. 2 | fields: ~ # (dict or None) key: field's id, value: features in this field. -------------------------------------------------------------------------------- /recbole/properties/model/FISM.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users and items. 2 | split_to: 0 # (int) Used to reduce the GPU memory usage during the evaluation. 3 | reg_weights: [1e-2, 1e-2] # (list of float) The L2 regularization weights. 4 | alpha: 0.0 # (float) Weight to control the normalization effect of interactions. -------------------------------------------------------------------------------- /recbole/properties/model/FM.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 10 # (int) The embedding size of features. -------------------------------------------------------------------------------- /recbole/properties/model/FNN.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 10 # (int) The embedding size of features. 2 | mlp_hidden_size: [256, 256, 256] # (list of int) The hidden size of MLP layers. 3 | dropout_prob: 0.2 # (float) The dropout rate. -------------------------------------------------------------------------------- /recbole/properties/model/FOSSIL.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users and items. 2 | loss_type: 'CE' # (str) The type of loss function. Range in ['BPR', 'CE']. 3 | reg_weight: 0.0 # (float) The L2 regularization weight. 4 | order_len: 3 # (int) The last N items. 5 | alpha: 0.6 # (float) Weight parameter to calculate the similarity. -------------------------------------------------------------------------------- /recbole/properties/model/FPMC.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users and items. 2 | loss_type: 'BPR' # (str) The type of loss function. Range in ['BPR']. 3 | -------------------------------------------------------------------------------- /recbole/properties/model/FiGNN.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 10 # (int) The embedding size of features. 2 | attention_size: 16 # (int) The vector size in attention mechanism. 3 | n_layers: 2 # (int) The number of layers. 4 | num_heads: 2 # (int) The number of attention heads. 5 | hidden_dropout_prob: 0.2 # (float) The dropout rate of hidden layer. 6 | attn_dropout_prob: 0.2 # (float) The dropout rate of multi-head self-attention layer. -------------------------------------------------------------------------------- /recbole/properties/model/FwFM.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 10 # (int) The embedding size of features. 2 | dropout_prob: 0.0 # (float) The dropout rate. 3 | fields: ~ # (dict) key: field's id, value: features in this field. -------------------------------------------------------------------------------- /recbole/properties/model/GCMC.yaml: -------------------------------------------------------------------------------- 1 | accum: 'stack' # (str) The accumulation function in the GCN layers. Range in ['sum', 'stack']. 2 | gcn_output_dim: 500 # (int) The output dimension of GCN layer in GCN encoder. 3 | embedding_size: 64 # (int) The embedding size of user and item. 4 | dropout_prob: 0.3 # (float) The dropout rate. 5 | sparse_feature: True # (bool) Whether to use sparse tensor to represent features. 6 | class_num: 2 # (int) Number of rating types. 7 | num_basis_functions: 2 # (int) Number of basis functions for BiDecoder. -------------------------------------------------------------------------------- /recbole/properties/model/GCSAN.yaml: -------------------------------------------------------------------------------- 1 | # weight (float): The weight to control the contribution of self-attention representation and 2 | # the last-clicked action, 0.4 to 0.8 is suggested in the original paper. 3 | weight: 0.6 4 | n_layers: 2 # (int) The number of transformer layers in transformer encoder. 5 | n_heads: 2 # (int) The number of attention heads for multi-head attention layer. 6 | hidden_size: 64 # (int) The number of features in the hidden state. 7 | inner_size: 256 # (int) The inner hidden size in feed-forward layer. 8 | hidden_dropout_prob: 0.5 # (float) The probability of an element to be zeroed. 9 | attn_dropout_prob: 0.5 # (float) The probability of an attention score to be zeroed. 10 | hidden_act: 'gelu' # (str) The activation function in feed-forward layer. 11 | layer_norm_eps: 1e-12 # (float) A value added to the denominator for numerical stability. 12 | initializer_range: 0.02 # (float) The standard deviation for normal initialization. 13 | step: 1 # (int) The number of layers in GNN. 14 | reg_weight: 5e-5 # (float) The L2 regularization weight. 15 | loss_type: 'CE' # (str) The type of loss function. Range in ['BPR', 'CE']. -------------------------------------------------------------------------------- /recbole/properties/model/GRU4Rec.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of items. 2 | hidden_size: 128 # (int) The number of features in the hidden state. 3 | num_layers: 1 # (int) The number of layers in GRU. 4 | dropout_prob: 0.3 # (float) The dropout rate. 5 | loss_type: 'CE' # (str) The type of loss function. Range in ['BPR', 'CE']. -------------------------------------------------------------------------------- /recbole/properties/model/GRU4RecF.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of items. 2 | hidden_size: 128 # (int) The number of features in the hidden state. 3 | num_layers: 1 # (int) The number of layers in GRU. 4 | dropout_prob: 0.3 # (float) The dropout rate. 5 | selected_features: ['class'] # (list of str) The list of selected item features, e.g., 'class' in ml-100k.item. 6 | pooling_mode: 'sum' # (str) The intra-feature pooling mode. Range in ['max', 'mean', 'sum']. 7 | loss_type: 'CE' # (str) The type of loss function. Range in ['BPR', 'CE']. -------------------------------------------------------------------------------- /recbole/properties/model/GRU4RecKG.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of items. 2 | hidden_size: 128 # (int) The number of features in the hidden state. 3 | num_layers: 1 # (int) The number of layers in GRU. 4 | dropout_prob: 0.1 # (float) The dropout rate. 5 | freeze_kg: True # (bool) Whether to freeze the pre-trained knowledge embedding feature. 6 | loss_type: 'CE' # (str) The type of loss function. -------------------------------------------------------------------------------- /recbole/properties/model/HGN.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users and items. 2 | loss_type: 'CE' # (str) The type of loss function. Range in ['BPR', 'CE']. 3 | pooling_type: "average" # (str) The type of pooling include average pooling and max pooling. 4 | reg_weight: [0.00,0.00] # (list of float) The L2 regularization weight. -------------------------------------------------------------------------------- /recbole/properties/model/HRM.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users and items. 2 | high_order: 2 # (int) The last N items. 3 | loss_type: 'CE' # (str) The type of loss function. Range in ['BPR', 'CE']. 4 | dropout_prob: 0.2 # (float) The dropout rate. 5 | pooling_type_layer_1: 'max' # (str) Pooling type in the first layer. Range in ['max', 'average']. 6 | pooling_type_layer_2: 'max' # (str) Pooling type in the second layer. Range in ['max', 'average']. -------------------------------------------------------------------------------- /recbole/properties/model/ItemKNN.yaml: -------------------------------------------------------------------------------- 1 | k: 100 # (int) The neighborhood size. 2 | shrink: 0.0 # (float) A normalization parameter to calculate cosine distance. 3 | knn_method: 'item' # (string) The method to calculate the similarity matrix ['item','user'] -------------------------------------------------------------------------------- /recbole/properties/model/KD_DAGFM.yaml: -------------------------------------------------------------------------------- 1 | teacher: 'CrossNet' # (str) The name of teacher network. 2 | phase: 'teacher_training' # (str) Range in ['teacher_training, 'distillation', 'finetuning']. 3 | type: 'outer' # (str) The type of interaction learning function in student network. 4 | embedding_size: 16 # (int) The embedding size of features. 5 | t_depth: 3 # (int) The depth of teacher network. 6 | depth: 3 # (int) The depth of student network. 7 | alpha: 0.1 # (float) The hyperparameter of the weight of KD loss. 8 | beta: 921.6 # (float) The hyperparameter of the weight of CTR loss. 9 | warm_up: '' # (str) The path of teacher model or student model. 10 | t_cin: [200, 200, 200] # (list of int) The parameter for teacher network CIN. -------------------------------------------------------------------------------- /recbole/properties/model/KGAT.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users, items and entities. 2 | kg_embedding_size: 64 # (int) The embedding size of relations in knowledge graph. 3 | layers: [64] # (list of int) The hidden size in GNN layers. 4 | mess_dropout: 0.1 # (float) The message dropout rate in GNN layer. 5 | reg_weight: 1e-5 # (float) The L2 regularization weight. 6 | aggregator_type: 'bi' # (str) The aggregator type used in GNN. Range in ['gcn', 'graphsage', 'bi']. -------------------------------------------------------------------------------- /recbole/properties/model/KGCN.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users, items and entities. 2 | n_iter: 1 # (int) The number of iterations when computing entity representation. 3 | aggregator: 'sum' # (str) The aggregator for GNN ranging in ['sum', 'neighbor', 'concat']. 4 | reg_weight: 1e-7 # (float) The L2 regularization weight. 5 | neighbor_sample_size: 4 # (int) The number of neighbors to be sampled. -------------------------------------------------------------------------------- /recbole/properties/model/KGIN.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users, items, entities and relations. 2 | reg_weight: 1e-5 # (float) The L2 regularization weight. 3 | node_dropout_rate: 0.5 # (float) The node dropout rate in GCN layer. 4 | mess_dropout_rate: 0.0 # (float) The message dropout rate in GCN layer. 5 | sim_regularity: 1e-4 # (float) The intents independence loss weight. 6 | context_hops: 2 # (int) The number of context hops in GCN layer. 7 | n_factors: 4 # (int) The number of user intents. 8 | ind: 'cosine' # (float) The intents independence loss type. 9 | temperature: 0.2 # (float) The temperature parameter used in loss calculation. 10 | -------------------------------------------------------------------------------- /recbole/properties/model/KGNNLS.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The initial embedding size of users, relations and entities. 2 | n_iter: 1 # (int) The number of iterations when computing entity representation. 3 | aggregator: 'sum' # (str) The aggregator for GNN ranging in ['sum', 'neighbor', 'concat']. 4 | reg_weight: 1e-7 # (float) The L2 regularization weight. 5 | neighbor_sample_size: 4 # (int) The number of neighbors to be sampled. 6 | ls_weight: 0.5 # (float) The label smoothness regularization weight. -------------------------------------------------------------------------------- /recbole/properties/model/KSR.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of items. 2 | kg_embedding_size: 64 # (int) The embedding size of the KG feature. 3 | hidden_size: 128 # (int) The number of features in the hidden state. 4 | num_layers: 1 # (int) The number of layers in GRU. 5 | dropout_prob: 0.1 # (float) The dropout rate. 6 | loss_type: 'CE' # (str) The type of loss function. Range in ['BPR', 'CE']. 7 | freeze_kg: False # (bool) Whether to freeze the pre-trained knowledge embedding feature. 8 | gamma: 10.0 # (float) The scaling factor when calculating the attention weights. -------------------------------------------------------------------------------- /recbole/properties/model/KTUP.yaml: -------------------------------------------------------------------------------- 1 | train_rec_step: 5 # (int) The number of steps for continuous training recommendation task. 2 | train_kg_step: 5 # (int) The number of steps for continuous training knowledge related task. 3 | embedding_size: 64 # (int) The embedding size of users, items, entities, relations and preferences. 4 | use_st_gumbel: True # (bool) Whether to use gumbel softmax. 5 | L1_flag: False # (bool) Whether to use L1 distance to calculate dissimilarity, otherwise L2. 6 | margin: 1.0 # (float) The margin in margin loss. 7 | kg_weight: 1.0 # (float) The weight decay for kg model. 8 | align_weight: 1.0 # (float) The align loss weight for item embedding in rec and kg module. -------------------------------------------------------------------------------- /recbole/properties/model/LINE.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users and items. 2 | order: 2 # (int) The order of proximity of the model. 3 | second_order_loss_weight: 1.0 # (float) The weight of the second proximity loss. -------------------------------------------------------------------------------- /recbole/properties/model/LR.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 10 # (int) The embedding size of features. -------------------------------------------------------------------------------- /recbole/properties/model/LightGCN.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users and items. 2 | n_layers: 2 # (int) The number of layers in LightGCN. 3 | reg_weight: 1e-05 # (float) The L2 regularization weight. -------------------------------------------------------------------------------- /recbole/properties/model/LightSANs.yaml: -------------------------------------------------------------------------------- 1 | # k_interests (int): The number of latent interests dimension in item-to-interest aggregation. 2 | # k_interests equals to 0.1 * MAX_ITEM_LIST_LENGTH is suggested to ensure the compression effect. 3 | k_interests: 5 4 | n_layers: 2 # (int) The number of transformer layers in transformer encoder. 5 | n_heads: 2 # (int) The number of attention heads for multi-head attention layer. 6 | hidden_size: 64 # (int) The input and output hidden size. 7 | inner_size: 256 # (int) The imensionality in feed-forward layer. 8 | hidden_dropout_prob: 0.5 # (float) The probability of an element to be zeroed. 9 | attn_dropout_prob: 0.5 # (float) The probability of an attention score to be zeroed. 10 | hidden_act: 'gelu' # (str) The activation function in feed-forward layer. 11 | layer_norm_eps: 1e-12 # (float) The value added to the denominator for numerical stability. 12 | initializer_range: 0.02 # (float) The range of weights initialization. 13 | loss_type: 'CE' # (str) The type of loss function. -------------------------------------------------------------------------------- /recbole/properties/model/MCCLK.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users, items, entities and relations. 2 | reg_weight: 1e-5 # (float) The L2 regularization weight. 3 | n_hops: 2 # (int) The number of context hops in GCN layer. 4 | node_dropout_rate: 0.5 # (float) The node dropout rate in GCN layer. 5 | mess_dropout_rate: 0.1 # (float) The message dropout rate in GCN layer. 6 | lightgcn_layer: 2 # (int) The number of LightGCN layer. 7 | item_agg_layer: 1 # (int) The number of item aggregation layer. 8 | alpha: 0.2 # (float) The local-level contrastive loss weight. 9 | beta: 0.1 # (float) The contrastive loss weight. 10 | k: 10 # (int) The topk parameter used in building a k-NN item-item semantic graph. 11 | lambda_coeff: 0.5 # (float) The coefficient when updating k-NN item-item semantic graph. 12 | temperature: 0.8 # (float) The temperature parameter used in loss calculation. 13 | build_graph_separately: True # (bool) Whether user a separate GCN to build item-item graph. 14 | loss_type: 'BPR' # (str, optional) The loss type used in this model. 15 | -------------------------------------------------------------------------------- /recbole/properties/model/MKR.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users and items. 2 | kg_embedding_size: 64 # (int) The embedding size of entities, relations. 3 | low_layers_num: 1 # (int) The number of low layers. 4 | high_layers_num: 1 # (int) The number of high layers. 5 | reg_weight: 1e-6 # (float) The L2 regularization weight. 6 | use_inner_product: True # (bool) Whether to use inner product to calculate scores. 7 | kge_interval: 3 # (int) The number of steps for knowledge related task. 8 | dropout_prob: 0.0 # (float) The dropout rate. -------------------------------------------------------------------------------- /recbole/properties/model/MacridVAE.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The latent dimension of auto-encoder. 2 | dropout_prob: 0.5 # (float) The drop out probability of input. 3 | kfac: 10 # (int) Number of facets (macro concepts). 4 | nogb: False # (bool) Whether to disable Gumbel-Softmax sampling. 5 | std: 0.01 # (float) Standard deviation of the Gaussian prior. 6 | encoder_hidden_size: [600] # (list of int) The MLP hidden layer. 7 | tau: 0.1 # (float) Temperature of sigmoid/softmax, in (0,oo). 8 | anneal_cap: 0.2 # (float) The hyper parameter of the weight of KL loss. 9 | total_anneal_steps: 200000 # (int) The maximum steps of anneal update. 10 | reg_weights: [0.0, 0.0] # (list of float) L2 regularization weights. -------------------------------------------------------------------------------- /recbole/properties/model/MultiDAE.yaml: -------------------------------------------------------------------------------- 1 | mlp_hidden_size: [600] # (list of int) The MLP hidden layer. 2 | latent_dimension: 64 # (int) The latent dimension of auto-encoder. 3 | dropout_prob: 0.5 # (float) The drop out probability of input. -------------------------------------------------------------------------------- /recbole/properties/model/MultiVAE.yaml: -------------------------------------------------------------------------------- 1 | mlp_hidden_size: [600] # (list of int) The MLP hidden layer. 2 | latent_dimension: 128 # (int) The latent dimension of auto-encoder. 3 | dropout_prob: 0.5 # (float) The drop out probability of input. 4 | anneal_cap: 0.2 # (float) The hyper parameter of the weight of KL loss. 5 | total_anneal_steps: 200000 # (int) The maximum steps of anneal update. 6 | -------------------------------------------------------------------------------- /recbole/properties/model/NAIS.yaml: -------------------------------------------------------------------------------- 1 | algorithm: 'prod' # (str) The attention method. Range in ['prod', 'concat']. 2 | embedding_size: 64 # (int) The embedding size of users and items. 3 | weight_size: 64 # (int) The hidden layer size of an output attention weight. 4 | split_to: 0 # (int) Used to reduce the GPU memory usage during the evaluation. 5 | reg_weights: [1e-7, 1e-7, 1e-5] # (list of float) The L2 regularization weights. 6 | alpha: 0.0 # (float) Control the normalization effect when calculating the similarity. 7 | beta: 0.5 # (float) The smoothing exponent controlling the denominator of softmax. 8 | pretrain_path: ~ # (str or None) The path of pre-trained model for initialization. -------------------------------------------------------------------------------- /recbole/properties/model/NARM.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of items. 2 | hidden_size: 128 # (int) The number of features in the hidden state. 3 | n_layers: 1 # (int) The number of layers in GRU. 4 | dropout_probs: [0.25,0.5] # (list of float) The dropout rate for embedding and concatenation. 5 | loss_type: 'CE' # (str) The type of loss function. Range in ['BPR', 'CE']. -------------------------------------------------------------------------------- /recbole/properties/model/NCEPLRec.yaml: -------------------------------------------------------------------------------- 1 | beta: 1.0 # (float) The popularity sensitivity. 2 | rank: 450 # (int) The latent dimension of latent representations. 3 | reg_weight: 1e2 # (float) The regularization weight. -------------------------------------------------------------------------------- /recbole/properties/model/NCL.yaml: -------------------------------------------------------------------------------- 1 | # Graph Collaborative Filtering BackBone 2 | embedding_size: 64 # (int) The embedding size of users and items. 3 | n_layers: 3 # (int) The number of GNN layers. 4 | reg_weight: 1e-4 # (float) The L2 regularization weight. 5 | 6 | # Contrastive Learning with Structural Neighbors 7 | ssl_temp: 0.1 # (float) Temperature for contrastive loss. 8 | ssl_reg: 1e-7 # (float) The structure-contrastive loss weight. 9 | hyper_layers: 1 # (int) Control the contrasted range for structural-contrastive loss. 10 | alpha: 1.0 # (float) The weight to balance self-supervised loss for users and items. 11 | 12 | # Contrastive Learning with Semantic Neighbors 13 | proto_reg: 8e-8 # (float) The prototype-contrastive weight. 14 | num_clusters: 1000 # (int) Number of prototypes. 15 | m_step: 1 # (int) Number of M-steps for each E-step. 16 | warm_up_step: 20 # (int) Number of warm up steps. -------------------------------------------------------------------------------- /recbole/properties/model/NFM.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 10 # (int) The embedding size of features. 2 | mlp_hidden_size: [64, 64, 64] # (list of int) The hidden size of MLP layers. 3 | dropout_prob: 0.0 # (float) The dropout rate. 4 | -------------------------------------------------------------------------------- /recbole/properties/model/NGCF.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users and items. 2 | hidden_size_list: [64,64,64] # (list of int) The hidden size of each layer in GCN layers. 3 | node_dropout: 0.0 # (float) The dropout rate of node in each GNN layer. 4 | message_dropout: 0.1 # (float) The dropout rate of edge in each GNN layer. 5 | reg_weight: 1e-5 # (float) The L2 regularization weight. -------------------------------------------------------------------------------- /recbole/properties/model/NNCF.yaml: -------------------------------------------------------------------------------- 1 | ui_embedding_size: 64 # (int) The embedding size of user and item. 2 | neigh_embedding_size: 32 # (int) The embedding size of neighborhood information. 3 | num_conv_kernel: 128 # (int) The number of kernels in convolution layer. 4 | conv_kernel_size: 5 # (int) The size of kernel in convolution layer. 5 | pool_kernel_size: 5 # (int) The size of kernel in pooling layer. 6 | mlp_hidden_size: [128,64,32,16] # (list of int) The hidden size of each layer in MLP. 7 | neigh_num: 20 # (int) The number of neighbors we choose. 8 | dropout: 0.5 # (float) The dropout rate in MLP layers. 9 | 10 | # The method to use neighborhood information, you can choose random, knn or louvain algorithm 11 | # e.g. neigh_info_method: "knn" or neigh_info_method: "louvain" 12 | neigh_info_method: "random" 13 | 14 | resolution: 1 # (float) The parameter in louvain algorithm. -------------------------------------------------------------------------------- /recbole/properties/model/NPE.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users and items. 2 | loss_type: 'CE' # (str) The type of loss function. Range in ['BPR', 'CE']. 3 | dropout_prob: 0.3 # (float) The dropout rate. -------------------------------------------------------------------------------- /recbole/properties/model/NeuMF.yaml: -------------------------------------------------------------------------------- 1 | mf_embedding_size: 64 # (int) The MF embedding size of user and item. 2 | mlp_embedding_size: 64 # (int) The MLP embedding size of user and item. 3 | mlp_hidden_size: [128,64] # (list of int) The hidden size of each layer in MLP. 4 | dropout_prob: 0.1 # (float) The dropout rate in MLP layers. 5 | mf_train: True # (bool) Whether to train the MF part of the model. 6 | mlp_train: True # (bool) Whether to train the MLP part of the model. 7 | 8 | # Parameters of pre-trained models for initialization. 9 | use_pretrain: False # (bool) Whether to use the pre-trained parameters for MF and MLP part. 10 | mf_pretrain_path: ~ # (str or None) The path of pre-trained MF part model. 11 | mlp_pretrain_path: ~ # (str or None) The path of pre-trained MLP part model. -------------------------------------------------------------------------------- /recbole/properties/model/NextItNet.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users and items. 2 | kernel_size: 3 # (int) The width of convolutional filter. 3 | block_num: 5 # (int) The number of residual blocks. 4 | dilations: [1,4] # (list of int) Control the spacing between the kernel points. 5 | reg_weight: 1e-5 # (float) The L2 regularization weight. 6 | loss_type: 'CE' # (str) The type of loss function. Range in ['BPR', 'CE']. 7 | 8 | -------------------------------------------------------------------------------- /recbole/properties/model/PNN.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 10 # (int) The embedding size of features. 2 | mlp_hidden_size: [128, 256, 128] # (list of int) The hidden size of MLP layers. 3 | dropout_prob: 0.0 # (float) The dropout rate. 4 | use_inner: True # (bool) Whether to use the inner product in the model. 5 | use_outer: False # (bool) Whether to use the outer product in the model. 6 | reg_weight: 0.0 # (float) The L2 regularization weight. -------------------------------------------------------------------------------- /recbole/properties/model/Pop.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RUCAIBox/RecBole/7b02be5ec80a88310f2d04a27a82adfcbb5dc211/recbole/properties/model/Pop.yaml -------------------------------------------------------------------------------- /recbole/properties/model/RaCT.yaml: -------------------------------------------------------------------------------- 1 | mlp_hidden_size: [600] # (list of int) The MLP hidden layer. 2 | latent_dimension: 256 # (int) The latent dimension of auto-encoder. 3 | dropout_prob: 0.5 # (float) The drop out probability of input. 4 | anneal_cap: 0.2 # (float) The super parameter of the weight of KL loss. 5 | total_anneal_steps: 200000 # (int) The maximum steps of anneal update. 6 | critic_layers: [100,100,10] # (list of int) The layers of critic network. 7 | metrics_k: 100 # (int) The parameter of NDCG for critic network training. 8 | train_stage: 'actor_pretrain' # (str) Range in ['actor_pretrain', 'critic_pretrain', 'finetune']. 9 | pretrain_epochs: 150 # (int) The pretrain epochs of actor pre-training or critic-pretraining. 10 | save_step: 10 # (int) Save pre-trained model every pre-training epochs. 11 | pre_model_path: '' # (str) The path of pretrained model. -------------------------------------------------------------------------------- /recbole/properties/model/RecVAE.yaml: -------------------------------------------------------------------------------- 1 | hidden_dimension: 600 # (int) The hidden dimension of auto-encoder. 2 | latent_dimension: 200 # (int) The latent dimension of auto-encoder. 3 | dropout_prob: 0.5 # (float) The drop out probability of input. 4 | beta: 0.2 # (float) The default hyperparameter of the weight of KL loss. 5 | gamma: 0.005 # (float) The hyper-parameter shared across all users. 6 | mixture_weights: [0.15, 0.75, 0.1] # (list of float) The mixture weights of three composite priors. 7 | n_enc_epochs: 3 # (int) The training times of encoder per epoch. 8 | n_dec_epochs: 1 # (int) The training times of decoder per epoch. 9 | -------------------------------------------------------------------------------- /recbole/properties/model/RepeatNet.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users and items. 2 | hidden_size: 64 # (int) The number of features in the hidden state. 3 | joint_train: False # (bool) Whether the repeat_explore_loss is added to loss. 4 | dropout_prob: 0.5 # (float) The dropout rate. 5 | loss_type: 'CE' # (str) The type of loss function. Range in ['BPR', 'CE']. -------------------------------------------------------------------------------- /recbole/properties/model/RippleNet.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users, items and entities. 2 | n_hop: 2 # (int) The number of hop reasoning for knowledge base. 3 | n_memory: 16 # (int) The number of memory size of every hop. 4 | kg_weight: 0.01 # (float) The L2 regularization weight. 5 | reg_weight: 1e-7 # (float) The kg loss weight. -------------------------------------------------------------------------------- /recbole/properties/model/S3Rec.yaml: -------------------------------------------------------------------------------- 1 | n_layers: 2 # (int) The number of transformer layers in transformer encoder. 2 | n_heads: 2 # (int) The number of attention heads for multi-head attention layer. 3 | hidden_size: 64 # (int) The number of features in the hidden state. 4 | inner_size: 256 # (int) The inner hidden size in feed-forward layer. 5 | hidden_dropout_prob: 0.5 # (float) The probability of an element to be zeroed. 6 | attn_dropout_prob: 0.5 # (float) The probability of an attention score to be zeroed. 7 | hidden_act: 'gelu' # (str) The activation function in feed-forward layer. 8 | layer_norm_eps: 1e-12 # (float) A value added to the denominator for numerical stability. 9 | initializer_range: 0.02 # (float) The standard deviation for normal initialization. 10 | item_attribute: 'class' # (str) The item features used as attributes for pre-training. 11 | mask_ratio: 0.2 # (float) The probability for a item replaced by MASK token. 12 | aap_weight: 0.2 # (float) The weight for Associated Attribute Prediction loss. 13 | mip_weight: 1.0 # (float) The weight for Masked Item Prediction loss. 14 | map_weight: 1.0 # (float) The weight for Masked Attribute Prediction loss. 15 | sp_weight: 0.5 # (float) The weight for Segment Prediction loss. 16 | train_stage: 'pretrain' # (str) The training stage. Range in ['pretrain', 'finetune']. 17 | pretrain_epochs: 500 # (int) The epochs of pre-training. 18 | save_step: 50 # (int) Save pre-trained model every pre-training epochs. 19 | pre_model_path: '' # (str) The path of pretrained model. 20 | loss_type: 'CE' # (str) The type of loss function. Range in ['BPR', 'CE']. -------------------------------------------------------------------------------- /recbole/properties/model/SASRec.yaml: -------------------------------------------------------------------------------- 1 | n_layers: 2 # (int) The number of transformer layers in transformer encoder. 2 | n_heads: 2 # (int) The number of attention heads for multi-head attention layer. 3 | hidden_size: 64 # (int) The number of features in the hidden state. 4 | inner_size: 256 # (int) The inner hidden size in feed-forward layer. 5 | hidden_dropout_prob: 0.5 # (float) The probability of an element to be zeroed. 6 | attn_dropout_prob: 0.5 # (float) The probability of an attention score to be zeroed. 7 | hidden_act: 'gelu' # (str) The activation function in feed-forward layer. 8 | layer_norm_eps: 1e-12 # (float) A value added to the denominator for numerical stability. 9 | initializer_range: 0.02 # (float) The standard deviation for normal initialization. 10 | loss_type: 'CE' # (str) The type of loss function. Range in ['BPR', 'CE']. -------------------------------------------------------------------------------- /recbole/properties/model/SASRecF.yaml: -------------------------------------------------------------------------------- 1 | n_layers: 2 # (int) The number of transformer layers in transformer encoder. 2 | n_heads: 2 # (int) The number of attention heads for multi-head attention layer. 3 | hidden_size: 64 # (int) The number of features in the hidden state. 4 | inner_size: 256 # (int) The inner hidden size in feed-forward layer. 5 | hidden_dropout_prob: 0.5 # (float) The probability of an element to be zeroed. 6 | attn_dropout_prob: 0.5 # (float) The probability of an attention score to be zeroed. 7 | hidden_act: 'gelu' # (str) The activation function in feed-forward layer. 8 | layer_norm_eps: 1e-12 # (float) A value added to the denominator for numerical stability. 9 | initializer_range: 0.02 # (float) The standard deviation for normal initialization. 10 | selected_features: ['class'] # (list of str) The list of selected item features. 11 | pooling_mode: 'sum' # (str) Intra-feature pooling mode. Range in ['max', 'mean', 'sum']. 12 | loss_type: 'CE' # (str) The type of loss function. Range in ['BPR', 'CE']. -------------------------------------------------------------------------------- /recbole/properties/model/SGL.yaml: -------------------------------------------------------------------------------- 1 | type: 'ED' # (str) The type to generate views. Range in ['ED', 'ND', 'RW']. 2 | n_layers: 3 # (int) The number of layers in SGL. 3 | ssl_tau: 0.5 # (float) The temperature in softmax. 4 | reg_weight: 1e-5 # (float) The L2 regularization weight. 5 | ssl_weight: 0.05 # (float) The hyperparameter to control the strengths of SSL. 6 | drop_ratio: 0.1 # (float) The dropout ratio. 7 | embedding_size: 64 # (int) The embedding size of users and items. -------------------------------------------------------------------------------- /recbole/properties/model/SHAN.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users and items. 2 | short_item_length: 2 # (int) The last N items. 3 | loss_type: 'CE' # (str) The type of loss function. Range in ``['BPR', 'CE']``. 4 | reg_weight: [0.01,0.0001] # (list of float) The L2 regularization weights. 5 | transform: inverse_itemseq # (str) The transform operation for batch data process. -------------------------------------------------------------------------------- /recbole/properties/model/SINE.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The input and output hidden size. 2 | layer_norm_eps: 1e-12 # (float) The value added to the denominator for numerical stability. 3 | prototype_size: 50 # (int) The size of latent prototypes. 4 | interest_size: 3 # (int) The number of intentions. 5 | tau_ratio: 0.1 # (float) The tau value for temperature tuning. 6 | reg_loss_ratio: 0.5 # (float) The L2 regularization weight. 7 | loss_type: 'CE' # (str) The type of loss function. Range in ['BPR', 'CE']. -------------------------------------------------------------------------------- /recbole/properties/model/SLIMElastic.yaml: -------------------------------------------------------------------------------- 1 | # alpha and l1_ratio are both float-type values to control the balance between L1 and L2 norm. 2 | # The weight of L1-norm used in ElasticNet is equal to alpha * l1_ratio. 3 | # The weight of L2-norm used in ElasticNet is 1/2 * alpha * (1 - l1_ratio). 4 | alpha: 0.2 5 | l1_ratio: 0.02 6 | positive_only: True # (bool) Whether to add the non-negativity constraint. 7 | hide_item: True # (bool) Whether to ignore the influence of the item itself. 8 | -------------------------------------------------------------------------------- /recbole/properties/model/SRGNN.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of items. 2 | step: 1 # (int) The number of layers in GNN. 3 | loss_type: 'CE' # (str) The type of loss function. Range in ['BPR', 'CE']. -------------------------------------------------------------------------------- /recbole/properties/model/STAMP.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of items. 2 | loss_type: 'CE' # (str) The type of loss function. Range in ['BPR', 'CE']. -------------------------------------------------------------------------------- /recbole/properties/model/SimpleX.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users and items. 2 | margin: 0.5 # (float) The margin to filter negative samples. Range in [-1, 1]. 3 | negative_weight: 10 # (int) Weight to balance between positive-sample and negative-sample loss. 4 | gamma: 0.5 # (float) Weight for fusion of user' and interacted items' representations. 5 | aggregator: 'mean' # (str) The item aggregator ranging in ['mean', 'user_attention', 'self_attention']. 6 | history_len: 50 # (int) The length of the user's historical interaction items. 7 | reg_weight: 1e-05 # (float) The L2 regularization weights. 8 | dropout_prob: 0.1 # (float) Dropout probability for fusion of user' and interacted items' representations. -------------------------------------------------------------------------------- /recbole/properties/model/SpectralCF.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of users and items. 2 | n_layers: 4 # (int) The number of layers in SpectralCF. 3 | reg_weight: 1e-03 # (float) The L2 regularization weight. -------------------------------------------------------------------------------- /recbole/properties/model/TransRec.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 64 # (int) The embedding size of items. -------------------------------------------------------------------------------- /recbole/properties/model/WideDeep.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 10 # (int) The embedding size of features. 2 | mlp_hidden_size: [32, 16, 8] # (list of int) The hidden size of MLP layers. 3 | dropout_prob: 0.1 # (float) The dropout rate. -------------------------------------------------------------------------------- /recbole/properties/model/lightgbm.yaml: -------------------------------------------------------------------------------- 1 | # Dataset 2 | convert_token_to_onehot: False # (bool) Whether to convert token type features into one-hot form. 3 | token_num_threhold: 10000 # (int) The threshold of one-hot conversion. 4 | 5 | # Train 6 | lgb_params: # (dict) Booster params. 7 | boosting: gbdt 8 | num_leaves: 90 9 | min_data_in_leaf: 30 10 | max_depth: -1 11 | learning_rate: 0.1 12 | objective: binary 13 | lambda_l1: 0.1 14 | metric: ['auc', 'binary_logloss'] 15 | force_row_wise: True 16 | lgb_num_boost_round: 300 # (int) Number of boosting iterations. 17 | -------------------------------------------------------------------------------- /recbole/properties/model/xDeepFM.yaml: -------------------------------------------------------------------------------- 1 | embedding_size: 10 # (int) The embedding size of features. 2 | mlp_hidden_size: [128,128,128] # (list of int) The hidden size of MLP layers. 3 | reg_weight: 5e-4 # (float) The L2 regularization weight. 4 | dropout_prob: 0.2 # (float) The dropout rate. 5 | direct: False # (bool) Whether or not to output the current layer directly. 6 | cin_layer_size: [100,100,100] # (list of int) The size of CIN layers. -------------------------------------------------------------------------------- /recbole/properties/model/xgboost.yaml: -------------------------------------------------------------------------------- 1 | # Dataset 2 | convert_token_to_onehot: False # (bool) Whether to convert token type features into one-hot form. 3 | token_num_threhold: 10000 # (int) The threshold of one-hot conversion. 4 | 5 | # DMatrix 6 | xgb_silent: ~ # (bool or None) Whether to print messages during construction. 7 | xgb_nthread: ~ # (int or None) Number of threads when parallelization is applicable. 8 | 9 | # Train 10 | xgb_model: ~ # (file name of stored xgb model or 'Booster' instance) 11 | xgb_params: # (dict) Booster params. 12 | booster: gbtree 13 | objective: binary:logistic 14 | eval_metric: ['auc','logloss'] 15 | # gamma: 0.1 16 | max_depth: 3 17 | # lambda: 1 18 | # subsample: 0.7 19 | # colsample_bytree: 0.7 20 | # min_child_weight: 3 21 | eta: 1 22 | seed: 2020 23 | # nthread: -1 24 | xgb_num_boost_round: 100 # (int) Number of boosting iterations. 25 | lgb_early_stopping_rounds: ~ # (int or None) Activates early stopping. 26 | xgb_verbose_eval: 50 # (bool or int) Requires at least one validation data to print evaluation metrics. -------------------------------------------------------------------------------- /recbole/properties/quick_start_config/context-aware.yaml: -------------------------------------------------------------------------------- 1 | eval_args: 2 | split: {'RS':[0.8,0.1,0.1]} 3 | order: RO 4 | group_by: ~ 5 | mode: labeled 6 | train_neg_sample_args: ~ 7 | metrics: ['AUC', 'LogLoss'] 8 | valid_metric: AUC -------------------------------------------------------------------------------- /recbole/properties/quick_start_config/context-aware_ml-100k.yaml: -------------------------------------------------------------------------------- 1 | threshold: {'rating': 4} 2 | load_col: 3 | inter: ['user_id', 'item_id', 'rating', 'timestamp'] 4 | user: ['user_id', 'age', 'gender', 'occupation'] 5 | item: ['item_id', 'release_year', 'class'] -------------------------------------------------------------------------------- /recbole/properties/quick_start_config/knowledge_base.yaml: -------------------------------------------------------------------------------- 1 | load_col: 2 | inter: ['user_id', 'item_id', 'rating', 'timestamp'] 3 | kg: ['head_id', 'relation_id', 'tail_id'] 4 | link: ['item_id', 'entity_id'] 5 | 6 | # Data preprocessing for knowledge graph triples 7 | kg_reverse_r: False # (bool) Whether to reverse relations of triples for bidirectional edges. 8 | entity_kg_num_interval: "[0,inf)" # (str) Entity interval for filtering kg. 9 | relation_kg_num_interval: "[0,inf)" # (str) Relation interval for filtering kg. -------------------------------------------------------------------------------- /recbole/properties/quick_start_config/sequential.yaml: -------------------------------------------------------------------------------- 1 | eval_args: 2 | split: {'LS': 'valid_and_test'} 3 | order: TO 4 | mode: full 5 | repeatable: True 6 | -------------------------------------------------------------------------------- /recbole/properties/quick_start_config/sequential_DIN.yaml: -------------------------------------------------------------------------------- 1 | eval_args: 2 | split: {'LS': 'valid_and_test'} 3 | order: TO 4 | mode: uni100 5 | metrics: ['AUC', 'LogLoss'] 6 | valid_metric: AUC 7 | repeatable: True 8 | -------------------------------------------------------------------------------- /recbole/properties/quick_start_config/sequential_DIN_on_ml-100k.yaml: -------------------------------------------------------------------------------- 1 | load_col: 2 | inter: ['user_id', 'item_id', 'rating', 'timestamp'] 3 | user: ['user_id', 'age', 'gender', 'occupation'] 4 | item: ['item_id', 'release_year'] -------------------------------------------------------------------------------- /recbole/properties/quick_start_config/sequential_embedding_model.yaml: -------------------------------------------------------------------------------- 1 | load_col: 2 | inter: ['user_id', 'item_id', 'rating', 'timestamp'] 3 | ent: ['ent_id', 'ent_emb'] 4 | additional_feat_suffix: ent 5 | repeatable: True 6 | -------------------------------------------------------------------------------- /recbole/properties/quick_start_config/special_sequential_on_ml-100k.yaml: -------------------------------------------------------------------------------- 1 | load_col: 2 | inter: ['user_id', 'item_id', 'rating', 'timestamp'] 3 | item: ['item_id', 'release_year', 'class'] -------------------------------------------------------------------------------- /recbole/quick_start/__init__.py: -------------------------------------------------------------------------------- 1 | from recbole.quick_start.quick_start import ( 2 | run, 3 | run_recbole, 4 | objective_function, 5 | load_data_and_model, 6 | run_recboles, 7 | ) 8 | -------------------------------------------------------------------------------- /recbole/sampler/__init__.py: -------------------------------------------------------------------------------- 1 | from recbole.sampler.sampler import Sampler, KGSampler, RepeatableSampler, SeqSampler 2 | -------------------------------------------------------------------------------- /recbole/trainer/__init__.py: -------------------------------------------------------------------------------- 1 | from recbole.trainer.hyper_tuning import HyperTuning 2 | from recbole.trainer.trainer import * 3 | 4 | __all__ = ["Trainer", "KGTrainer", "KGATTrainer", "S3RecTrainer"] 5 | -------------------------------------------------------------------------------- /recbole/utils/__init__.py: -------------------------------------------------------------------------------- 1 | from recbole.utils.logger import init_logger, set_color 2 | from recbole.utils.utils import ( 3 | get_local_time, 4 | ensure_dir, 5 | get_model, 6 | get_trainer, 7 | get_environment, 8 | early_stopping, 9 | calculate_valid_score, 10 | dict2str, 11 | init_seed, 12 | get_tensorboard, 13 | get_gpu_usage, 14 | get_flops, 15 | list_to_latex, 16 | ) 17 | from recbole.utils.enum_type import * 18 | from recbole.utils.argument_list import * 19 | from recbole.utils.wandblogger import WandbLogger 20 | 21 | __all__ = [ 22 | "init_logger", 23 | "get_local_time", 24 | "ensure_dir", 25 | "get_model", 26 | "get_trainer", 27 | "early_stopping", 28 | "calculate_valid_score", 29 | "dict2str", 30 | "Enum", 31 | "ModelType", 32 | "KGDataLoaderState", 33 | "EvaluatorType", 34 | "InputType", 35 | "FeatureType", 36 | "FeatureSource", 37 | "init_seed", 38 | "general_arguments", 39 | "training_arguments", 40 | "evaluation_arguments", 41 | "dataset_arguments", 42 | "get_tensorboard", 43 | "set_color", 44 | "get_gpu_usage", 45 | "get_flops", 46 | "get_environment", 47 | "list_to_latex", 48 | "WandbLogger", 49 | ] 50 | -------------------------------------------------------------------------------- /recbole/utils/argument_list.py: -------------------------------------------------------------------------------- 1 | # @Time : 2020/10/19 2 | # @Author : Shanlei Mu 3 | # @Email : slmu@ruc.edu.cn 4 | 5 | # yapf: disable 6 | 7 | general_arguments = [ 8 | 'gpu_id', 'use_gpu', 9 | 'seed', 10 | 'reproducibility', 11 | 'state', 12 | 'data_path', 13 | 'checkpoint_dir', 14 | 'show_progress', 15 | 'config_file', 16 | 'save_dataset', 17 | 'dataset_save_path', 18 | 'save_dataloaders', 19 | 'dataloaders_save_path', 20 | 'log_wandb', 21 | ] 22 | 23 | training_arguments = [ 24 | 'epochs', 'train_batch_size', 25 | 'learner', 'learning_rate', 26 | 'train_neg_sample_args', 27 | 'eval_step', 'stopping_step', 28 | 'clip_grad_norm', 29 | 'weight_decay', 30 | 'loss_decimal_place', 31 | ] 32 | 33 | evaluation_arguments = [ 34 | 'eval_args', 'repeatable', 35 | 'metrics', 'topk', 'valid_metric', 'valid_metric_bigger', 36 | 'eval_batch_size', 37 | 'metric_decimal_place', 38 | ] 39 | 40 | dataset_arguments = [ 41 | 'field_separator', 'seq_separator', 42 | 'USER_ID_FIELD', 'ITEM_ID_FIELD', 'RATING_FIELD', 'TIME_FIELD', 43 | 'seq_len', 44 | 'LABEL_FIELD', 'threshold', 45 | 'NEG_PREFIX', 46 | 'ITEM_LIST_LENGTH_FIELD', 'LIST_SUFFIX', 'MAX_ITEM_LIST_LENGTH', 'POSITION_FIELD', 47 | 'HEAD_ENTITY_ID_FIELD', 'TAIL_ENTITY_ID_FIELD', 'RELATION_ID_FIELD', 'ENTITY_ID_FIELD', 48 | 'load_col', 'unload_col', 'unused_col', 'additional_feat_suffix', 49 | 'rm_dup_inter', 'val_interval', 'filter_inter_by_user_or_item', 50 | 'user_inter_num_interval', 'item_inter_num_interval', 51 | 'alias_of_user_id', 'alias_of_item_id', 'alias_of_entity_id', 'alias_of_relation_id', 52 | 'preload_weight', 'normalize_field', 'normalize_all', 53 | 'benchmark_filename', 54 | ] 55 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | torch>=1.10.0 2 | numpy>=1.17.2 3 | scipy>=1.6.0 4 | hyperopt==0.2.5 5 | pandas>=1.3.0 6 | tqdm>=4.48.2 7 | scikit_learn>=0.23.2 8 | pyyaml>=5.1.0 9 | colorlog>=4.7.2 10 | colorama>=0.4.4 11 | tensorboard>=2.5.0 12 | thop>=0.1.1.post2207130030 13 | ray>=1.13.0, <=2.6.3 14 | tabulate>=0.8.10 15 | plotly>=4.0.0 16 | texttable>=0.9.0 17 | psutil>=5.9.0 -------------------------------------------------------------------------------- /run_example/case_study_example.py: -------------------------------------------------------------------------------- 1 | # @Time : 2021/03/20 2 | # @Author : Yushuo Chen 3 | # @Email : chenyushuo@ruc.edu.cn 4 | 5 | 6 | """ 7 | Case study example 8 | =================== 9 | Here is the sample code for the case study in RecBole. 10 | """ 11 | 12 | 13 | import torch 14 | from recbole.utils.case_study import full_sort_topk, full_sort_scores 15 | from recbole.quick_start import load_data_and_model 16 | 17 | 18 | if __name__ == "__main__": 19 | config, model, dataset, train_data, valid_data, test_data = load_data_and_model( 20 | model_file="../saved/BPR-Aug-20-2021_03-32-13.pth", 21 | ) # Here you can replace it by your model path. 22 | 23 | # uid_series = np.array([1, 2]) # internal user id series 24 | # or you can use dataset.token2id to transfer external user token to internal user id 25 | uid_series = dataset.token2id(dataset.uid_field, ["196", "186"]) 26 | 27 | topk_score, topk_iid_list = full_sort_topk( 28 | uid_series, model, test_data, k=10, device=config["device"] 29 | ) 30 | print(topk_score) # scores of top 10 items 31 | print(topk_iid_list) # internal id of top 10 items 32 | external_item_list = dataset.id2token(dataset.iid_field, topk_iid_list.cpu()) 33 | print(external_item_list) # external tokens of top 10 items 34 | print() 35 | 36 | score = full_sort_scores(uid_series, model, test_data, device=config["device"]) 37 | print(score) # score of all items 38 | print( 39 | score[0, dataset.token2id(dataset.iid_field, ["242", "302"])] 40 | ) # score of item ['242', '302'] for user '196'. 41 | -------------------------------------------------------------------------------- /run_recbole.py: -------------------------------------------------------------------------------- 1 | # @Time : 2020/7/20 2 | # @Author : Shanlei Mu 3 | # @Email : slmu@ruc.edu.cn 4 | 5 | # UPDATE 6 | # @Time : 2022/7/8, 2020/10/3, 2020/10/1 7 | # @Author : Zhen Tian, Yupeng Hou, Zihan Lin 8 | # @Email : chenyuwuxinn@gmail.com, houyupeng@ruc.edu.cn, zhlin@ruc.edu.cn 9 | 10 | import argparse 11 | 12 | from recbole.quick_start import run 13 | 14 | if __name__ == "__main__": 15 | parser = argparse.ArgumentParser() 16 | parser.add_argument("--model", "-m", type=str, default="BPR", help="name of models") 17 | parser.add_argument( 18 | "--dataset", "-d", type=str, default="ml-100k", help="name of datasets" 19 | ) 20 | parser.add_argument("--config_files", type=str, default=None, help="config files") 21 | parser.add_argument( 22 | "--nproc", type=int, default=1, help="the number of process in this group" 23 | ) 24 | parser.add_argument( 25 | "--ip", type=str, default="localhost", help="the ip of master node" 26 | ) 27 | parser.add_argument( 28 | "--port", type=str, default="5678", help="the port of master node" 29 | ) 30 | parser.add_argument( 31 | "--world_size", type=int, default=-1, help="total number of jobs" 32 | ) 33 | parser.add_argument( 34 | "--group_offset", 35 | type=int, 36 | default=0, 37 | help="the global rank offset of this group", 38 | ) 39 | 40 | args, _ = parser.parse_known_args() 41 | 42 | config_file_list = ( 43 | args.config_files.strip().split(" ") if args.config_files else None 44 | ) 45 | 46 | run( 47 | args.model, 48 | args.dataset, 49 | config_file_list=config_file_list, 50 | nproc=args.nproc, 51 | world_size=args.world_size, 52 | ip=args.ip, 53 | port=args.port, 54 | group_offset=args.group_offset, 55 | ) 56 | -------------------------------------------------------------------------------- /run_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | python -m pytest -v tests/metrics 5 | echo "metrics tests finished" 6 | 7 | python -m pytest -v tests/config/test_config.py 8 | python -m pytest -v tests/config/test_overall.py 9 | export PYTHONPATH=. 10 | python tests/config/test_command_line.py --use_gpu=False --valid_metric=Recall@10 --metrics="['Recall']" --epochs=200 --learning_rate=0.3 11 | if [ $? -ne 0 ] 12 | then 13 | echo -e "\033[31mFailed in test_command_line.py\033[0m" 14 | fi 15 | echo "config tests finished" 16 | 17 | python -m pytest -v tests/evaluation_setting 18 | echo "evaluation_setting tests finished" 19 | 20 | python -m pytest -v tests/model/test_model_auto.py 21 | python -m pytest -v tests/model/test_model_manual.py 22 | echo "model tests finished" 23 | 24 | python -m pytest -v tests/data/test_dataset.py 25 | python -m pytest -v tests/data/test_dataloader.py 26 | echo "data tests finished" 27 | 28 | python -m pytest -v tests/hyper_tuning/test_hyper_tuning.py 29 | echo "hyper_tuning tests finished" -------------------------------------------------------------------------------- /tests/config/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | python -m unittest 5 | 6 | python test_command_line.py --use_gpu=False --valid_metric=Recall@10 --split_ratio=[0.7,0.2,0.1] \ 7 | --metrics='["Recall"]' --topk=[10] \ 8 | --epochs=200 --eval_setting='LO_RS' --learning_rate=0.3 -------------------------------------------------------------------------------- /tests/config/test_command_line.py: -------------------------------------------------------------------------------- 1 | # @Time : 2020/10/19 2 | # @Author : Shanlei Mu 3 | # @Email : slmu@ruc.edu.cn 4 | 5 | # UPDATE: 6 | # @Time : 2021/7/1 7 | # @Author : Xingyu Pan 8 | # @Email : xy_pan@foxmail.com 9 | 10 | 11 | from recbole.config import Config 12 | 13 | 14 | if __name__ == "__main__": 15 | config = Config(model="BPR", dataset="ml-100k") 16 | 17 | # command line 18 | assert config["use_gpu"] is False 19 | assert config["valid_metric"] == "Recall@10" 20 | assert config["metrics"] == ["Recall"] # bug 21 | 22 | # priority 23 | assert config["epochs"] == 200 24 | assert config["learning_rate"] == 0.3 25 | 26 | print("------------------------------------------------------------") 27 | print("OK") 28 | -------------------------------------------------------------------------------- /tests/config/test_config_example.yaml: -------------------------------------------------------------------------------- 1 | model: FM 2 | learning_rate: 0.1 3 | topk: [5, 20] 4 | eval_args: 5 | split: {'LS': 'valid_and_test'} 6 | mode: 7 | valid: uni100 8 | test: full 9 | order: TO -------------------------------------------------------------------------------- /tests/data/build_dataset/build_dataset.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token timestamp:float 2 | 1 1 1 3 | 1 2 2 4 | 1 3 3 5 | 1 4 4 6 | 1 5 5 7 | 1 6 6 8 | 1 7 7 9 | 1 8 8 10 | 1 9 9 11 | 1 10 10 12 | 1 11 11 13 | 1 12 12 14 | 1 13 13 15 | 1 14 14 16 | 1 15 15 17 | 1 16 16 18 | 1 17 17 19 | 1 18 18 20 | 1 19 19 21 | 1 20 20 22 | 2 1 1 23 | 3 1 1 24 | 3 2 2 25 | 4 1 1 26 | 4 2 2 27 | 4 3 3 28 | 5 1 1 29 | 5 2 2 30 | 5 3 3 31 | 5 4 4 32 | 5 5 5 33 | 6 1 1 34 | 6 2 2 35 | 6 3 3 36 | 6 4 4 37 | 6 5 5 38 | 6 6 6 39 | 6 7 7 40 | 6 8 8 41 | 6 9 9 42 | 7 1 1 43 | 7 2 2 44 | 7 3 3 45 | 7 4 4 46 | 7 5 5 47 | 7 6 6 48 | 7 7 7 49 | 7 8 8 50 | 7 9 9 51 | 7 10 10 52 | 8 1 1 53 | 8 2 2 54 | 8 3 3 55 | 8 4 4 56 | 8 5 5 57 | 8 6 6 58 | 8 7 7 59 | 8 8 8 60 | 8 9 9 61 | 8 10 10 62 | 8 11 11 -------------------------------------------------------------------------------- /tests/data/filter_by_field_value/filter_by_field_value.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token timestamp:float rating:float 2 | 1 1 4 2 3 | 1 1 6 0 4 | 1 1 0 0 5 | 1 1 8 3 6 | 1 1 3 3 7 | 1 1 1 0 8 | 1 1 9 3 9 | 1 1 2 1 10 | 1 1 5 2 11 | 1 1 7 4 -------------------------------------------------------------------------------- /tests/data/filter_by_inter_num/filter_by_inter_num.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token 2 | 1 1 3 | 2 1 4 | 2 2 5 | 3 3 6 | 3 4 7 | 3 5 8 | 3 6 9 | 4 3 10 | 4 4 11 | 5 5 12 | 5 6 13 | 6 5 14 | 6 6 -------------------------------------------------------------------------------- /tests/data/filter_inter_by_ui_and_inter_num/filter_inter_by_ui_and_inter_num.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token 2 | 1 1 3 | 1 2 4 | 2 1 5 | 2 2 6 | 3 3 7 | 3 4 8 | 4 3 9 | 4 4 -------------------------------------------------------------------------------- /tests/data/filter_inter_by_ui_and_inter_num/filter_inter_by_ui_and_inter_num.item: -------------------------------------------------------------------------------- 1 | item_id:token price:float 2 | 1 0 3 | 3 0 4 | 4 0 -------------------------------------------------------------------------------- /tests/data/filter_inter_by_ui_and_inter_num/filter_inter_by_ui_and_inter_num.user: -------------------------------------------------------------------------------- 1 | user_id:token age:float 2 | 1 0 3 | 3 0 4 | 4 0 -------------------------------------------------------------------------------- /tests/data/filter_inter_by_user_or_item/filter_inter_by_user_or_item.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token 2 | 1 1 3 | 2 2 -------------------------------------------------------------------------------- /tests/data/filter_inter_by_user_or_item/filter_inter_by_user_or_item.item: -------------------------------------------------------------------------------- 1 | item_id:token price:float 2 | 1 1 -------------------------------------------------------------------------------- /tests/data/filter_inter_by_user_or_item/filter_inter_by_user_or_item.user: -------------------------------------------------------------------------------- 1 | user_id:token age:float 2 | 1 1 -------------------------------------------------------------------------------- /tests/data/filter_nan_user_or_item/filter_nan_user_or_item.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token timestamp:float 2 | 1 0 3 | 1 1 4 | 2 5 | 1 1 3 -------------------------------------------------------------------------------- /tests/data/filter_nan_user_or_item/filter_nan_user_or_item.item: -------------------------------------------------------------------------------- 1 | item_id:token price:float 2 | 0 3 | 1 1 4 | 2 5 | 2 3 -------------------------------------------------------------------------------- /tests/data/filter_nan_user_or_item/filter_nan_user_or_item.user: -------------------------------------------------------------------------------- 1 | user_id:token age:float 2 | 1 0 3 | 1 4 | 2 0 -------------------------------------------------------------------------------- /tests/data/filter_value_and_filter_inter_by_ui/filter_value_and_filter_inter_by_ui.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token 2 | 1 1 3 | 1 2 4 | 2 2 5 | 2 3 6 | 3 3 -------------------------------------------------------------------------------- /tests/data/filter_value_and_filter_inter_by_ui/filter_value_and_filter_inter_by_ui.item: -------------------------------------------------------------------------------- 1 | item_id:token price:float 2 | 1 3 3 | 2 2 4 | 3 1 -------------------------------------------------------------------------------- /tests/data/filter_value_and_filter_inter_by_ui/filter_value_and_filter_inter_by_ui.user: -------------------------------------------------------------------------------- 1 | user_id:token age:float 2 | 1 1 3 | 2 2 4 | 3 3 -------------------------------------------------------------------------------- /tests/data/filter_value_and_inter_num/filter_value_and_inter_num.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token rating:float 2 | 1 1 0 3 | 1 2 0 4 | 2 1 0 5 | 2 3 0 6 | 3 2 0 7 | 3 3 0 8 | 4 4 1 9 | 4 5 0 10 | 5 4 0 11 | 5 5 0 12 | 6 6 0 13 | 6 7 0 14 | 7 6 0 15 | 7 7 0 -------------------------------------------------------------------------------- /tests/data/filter_value_and_inter_num/filter_value_and_inter_num.item: -------------------------------------------------------------------------------- 1 | item_id:token price:float 2 | 1 0 3 | 2 0 4 | 3 1 5 | 4 0 6 | 5 0 7 | 6 0 8 | 7 0 -------------------------------------------------------------------------------- /tests/data/filter_value_and_inter_num/filter_value_and_inter_num.user: -------------------------------------------------------------------------------- 1 | user_id:token age:float 2 | 1 0 3 | 2 0 4 | 3 1 5 | 4 0 6 | 5 0 7 | 6 0 8 | 7 0 -------------------------------------------------------------------------------- /tests/data/general_dataloader/general_dataloader.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token timestamp:float 2 | 1 1 1 3 | 1 2 2 4 | 1 3 3 5 | 1 4 4 6 | 1 5 5 7 | 1 6 6 8 | 1 7 7 9 | 1 8 8 10 | 1 9 9 11 | 1 10 10 12 | 1 11 11 13 | 1 12 12 14 | 1 13 13 15 | 1 14 14 16 | 1 15 15 17 | 1 16 16 18 | 1 17 17 19 | 1 18 18 20 | 1 19 19 21 | 1 20 20 22 | 1 21 21 23 | 1 22 22 24 | 1 23 23 25 | 1 24 24 26 | 1 25 25 27 | 1 26 26 28 | 1 27 27 29 | 1 28 28 30 | 1 29 29 31 | 1 30 30 32 | 1 31 31 33 | 1 32 32 34 | 1 33 33 35 | 1 34 34 36 | 1 35 35 37 | 1 36 36 38 | 1 37 37 39 | 1 38 38 40 | 1 39 39 41 | 1 40 40 42 | 1 41 41 43 | 1 42 42 44 | 1 43 43 45 | 1 44 44 46 | 1 45 45 47 | 1 46 46 48 | 1 47 47 49 | 1 48 48 50 | 1 49 49 51 | 1 50 50 -------------------------------------------------------------------------------- /tests/data/general_dataloader/general_dataloader.item: -------------------------------------------------------------------------------- 1 | item_id:token price:float 2 | 1 1 3 | 2 2 4 | 3 3 5 | 4 4 6 | 5 5 7 | 6 6 8 | 7 7 9 | 8 8 10 | 9 9 11 | 10 10 12 | 11 11 13 | 12 12 14 | 13 13 15 | 14 14 16 | 15 15 17 | 16 16 18 | 17 17 19 | 18 18 20 | 19 19 21 | 20 20 22 | 21 21 23 | 22 22 24 | 23 23 25 | 24 24 26 | 25 25 27 | 26 26 28 | 27 27 29 | 28 28 30 | 29 29 31 | 30 30 32 | 31 31 33 | 32 32 34 | 33 33 35 | 34 34 36 | 35 35 37 | 36 36 38 | 37 37 39 | 38 38 40 | 39 39 41 | 40 40 42 | 41 41 43 | 42 42 44 | 43 43 45 | 44 44 46 | 45 45 47 | 46 46 48 | 47 47 49 | 48 48 50 | 49 49 51 | 50 50 52 | 51 51 53 | 52 52 54 | 53 53 55 | 54 54 56 | 55 55 57 | 56 56 58 | 57 57 59 | 58 58 60 | 59 59 61 | 60 60 62 | 61 61 63 | 62 62 64 | 63 63 65 | 64 64 66 | 65 65 67 | 66 66 68 | 67 67 69 | 68 68 70 | 69 69 71 | 70 70 72 | 71 71 73 | 72 72 74 | 73 73 75 | 74 74 76 | 75 75 77 | 76 76 78 | 77 77 79 | 78 78 80 | 79 79 81 | 80 80 82 | 81 81 83 | 82 82 84 | 83 83 85 | 84 84 86 | 85 85 87 | 86 86 88 | 87 87 89 | 88 88 90 | 89 89 91 | 90 90 92 | 91 91 93 | 92 92 94 | 93 93 95 | 94 94 96 | 95 95 97 | 96 96 98 | 97 97 99 | 98 98 100 | 99 99 101 | 100 100 -------------------------------------------------------------------------------- /tests/data/general_full_dataloader/general_full_dataloader.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token timestamp:float 2 | 1 1 1 3 | 1 2 2 4 | 1 3 3 5 | 1 4 4 6 | 1 5 5 7 | 1 6 6 8 | 1 7 7 9 | 1 8 8 10 | 1 9 9 11 | 1 10 10 12 | 1 11 11 13 | 1 12 12 14 | 1 13 13 15 | 1 14 14 16 | 1 15 15 17 | 1 16 16 18 | 1 17 17 19 | 1 18 18 20 | 1 19 19 21 | 1 20 20 22 | 1 21 21 23 | 1 22 22 24 | 1 23 23 25 | 1 24 24 26 | 1 25 25 27 | 1 26 26 28 | 1 27 27 29 | 1 28 28 30 | 1 29 29 31 | 1 30 30 32 | 1 31 31 33 | 1 32 32 34 | 1 33 33 35 | 1 34 34 36 | 1 35 35 37 | 1 36 36 38 | 1 37 37 39 | 1 38 38 40 | 1 39 39 41 | 1 40 40 42 | 1 41 41 43 | 1 42 42 44 | 1 43 43 45 | 1 44 44 46 | 1 45 45 47 | 1 46 46 48 | 1 47 47 49 | 1 48 48 50 | 1 49 49 51 | 1 50 50 52 | 2 1 1 53 | 2 2 2 54 | 2 3 3 55 | 2 4 4 56 | 2 5 5 57 | 2 6 6 58 | 2 7 7 59 | 2 8 8 60 | 2 9 9 61 | 2 10 10 62 | 2 11 11 63 | 2 12 12 64 | 2 13 13 65 | 2 14 14 66 | 2 15 15 67 | 2 16 16 68 | 2 17 17 69 | 2 18 18 70 | 2 19 19 71 | 2 20 20 72 | 2 21 21 73 | 2 22 22 74 | 2 23 23 75 | 2 24 24 76 | 2 25 25 77 | 2 26 26 78 | 2 27 27 79 | 2 28 28 80 | 2 29 29 81 | 2 30 30 82 | 2 31 31 83 | 2 32 32 84 | 2 33 33 85 | 2 34 34 86 | 2 35 35 87 | 2 36 36 88 | 2 37 37 89 | 2 38 38 90 | 2 39 39 91 | 2 40 40 92 | 2 38 41 93 | 2 39 42 94 | 2 40 43 95 | 2 41 44 96 | 2 42 45 97 | 2 36 46 98 | 2 37 47 99 | 2 38 48 100 | 2 39 49 101 | 2 40 50 102 | 3 1 1 103 | 3 1 2 104 | 3 1 3 105 | 3 1 4 106 | 3 1 5 107 | 3 1 6 108 | 3 1 7 109 | 3 1 8 110 | 3 1 9 111 | 3 1 10 -------------------------------------------------------------------------------- /tests/data/general_full_dataloader/general_full_dataloader.item: -------------------------------------------------------------------------------- 1 | item_id:token price:float 2 | 1 1 3 | 2 2 4 | 3 3 5 | 4 4 6 | 5 5 7 | 6 6 8 | 7 7 9 | 8 8 10 | 9 9 11 | 10 10 12 | 11 11 13 | 12 12 14 | 13 13 15 | 14 14 16 | 15 15 17 | 16 16 18 | 17 17 19 | 18 18 20 | 19 19 21 | 20 20 22 | 21 21 23 | 22 22 24 | 23 23 25 | 24 24 26 | 25 25 27 | 26 26 28 | 27 27 29 | 28 28 30 | 29 29 31 | 30 30 32 | 31 31 33 | 32 32 34 | 33 33 35 | 34 34 36 | 35 35 37 | 36 36 38 | 37 37 39 | 38 38 40 | 39 39 41 | 40 40 42 | 41 41 43 | 42 42 44 | 43 43 45 | 44 44 46 | 45 45 47 | 46 46 48 | 47 47 49 | 48 48 50 | 49 49 51 | 50 50 52 | 51 51 53 | 52 52 54 | 53 53 55 | 54 54 56 | 55 55 57 | 56 56 58 | 57 57 59 | 58 58 60 | 59 59 61 | 60 60 62 | 61 61 63 | 62 62 64 | 63 63 65 | 64 64 66 | 65 65 67 | 66 66 68 | 67 67 69 | 68 68 70 | 69 69 71 | 70 70 72 | 71 71 73 | 72 72 74 | 73 73 75 | 74 74 76 | 75 75 77 | 76 76 78 | 77 77 79 | 78 78 80 | 79 79 81 | 80 80 82 | 81 81 83 | 82 82 84 | 83 83 85 | 84 84 86 | 85 85 87 | 86 86 88 | 87 87 89 | 88 88 90 | 89 89 91 | 90 90 92 | 91 91 93 | 92 92 94 | 93 93 95 | 94 94 96 | 95 95 97 | 96 96 98 | 97 97 99 | 98 98 100 | 99 99 101 | 100 100 -------------------------------------------------------------------------------- /tests/data/general_uni100_dataloader/general_uni100_dataloader.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token timestamp:float 2 | 1 1 1 3 | 1 2 2 4 | 1 3 3 5 | 1 4 4 6 | 1 5 5 7 | 1 6 6 8 | 1 7 7 9 | 1 8 8 10 | 1 9 9 11 | 1 10 10 12 | 2 1 1 13 | 2 1 2 14 | 2 1 3 15 | 2 1 4 16 | 2 1 5 17 | 2 1 6 18 | 2 1 7 19 | 2 1 8 20 | 2 1 9 21 | 2 1 10 22 | 3 1 1 23 | 3 2 2 24 | 3 3 3 25 | 3 4 4 26 | 3 5 5 27 | 3 6 6 28 | 3 7 7 29 | 3 8 8 30 | 3 9 9 31 | 3 10 10 32 | 3 11 11 33 | 3 12 12 34 | 3 13 13 35 | 3 14 14 36 | 3 15 15 37 | 3 16 16 38 | 3 17 17 39 | 3 18 18 40 | 3 19 19 41 | 3 20 20 -------------------------------------------------------------------------------- /tests/data/general_uni100_dataloader/general_uni100_dataloader.item: -------------------------------------------------------------------------------- 1 | item_id:token price:float 2 | 1 1 3 | 2 2 4 | 3 3 5 | 4 4 6 | 5 5 7 | 6 6 8 | 7 7 9 | 8 8 10 | 9 9 11 | 10 10 12 | 11 11 13 | 12 12 14 | 13 13 15 | 14 14 16 | 15 15 17 | 16 16 18 | 17 17 19 | 18 18 20 | 19 19 21 | 20 20 22 | 21 21 23 | 22 22 24 | 23 23 25 | 24 24 26 | 25 25 27 | 26 26 28 | 27 27 29 | 28 28 30 | 29 29 31 | 30 30 32 | 31 31 33 | 32 32 34 | 33 33 35 | 34 34 36 | 35 35 37 | 36 36 38 | 37 37 39 | 38 38 40 | 39 39 41 | 40 40 42 | 41 41 43 | 42 42 44 | 43 43 45 | 44 44 46 | 45 45 47 | 46 46 48 | 47 47 49 | 48 48 50 | 49 49 51 | 50 50 52 | 51 51 53 | 52 52 54 | 53 53 55 | 54 54 56 | 55 55 57 | 56 56 58 | 57 57 59 | 58 58 60 | 59 59 61 | 60 60 62 | 61 61 63 | 62 62 64 | 63 63 65 | 64 64 66 | 65 65 67 | 66 66 68 | 67 67 69 | 68 68 70 | 69 69 71 | 70 70 72 | 71 71 73 | 72 72 74 | 73 73 75 | 74 74 76 | 75 75 77 | 76 76 78 | 77 77 79 | 78 78 80 | 79 79 81 | 80 80 82 | 81 81 83 | 82 82 84 | 83 83 85 | 84 84 86 | 85 85 87 | 86 86 88 | 87 87 89 | 88 88 90 | 89 89 91 | 90 90 92 | 91 91 93 | 92 92 94 | 93 93 95 | 94 94 96 | 95 95 97 | 96 96 98 | 97 97 99 | 98 98 100 | 99 99 101 | 100 100 -------------------------------------------------------------------------------- /tests/data/kg_filter_by_triple_num/kg_filter_by_triple_num.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token 2 | ua ia 3 | ub ib 4 | uc ic 5 | ud id 6 | ue ie 7 | uf if -------------------------------------------------------------------------------- /tests/data/kg_filter_by_triple_num/kg_filter_by_triple_num.kg: -------------------------------------------------------------------------------- 1 | head_id:token tail_id:token relation_id:token 2 | eb ea ra 3 | ec eb rb 4 | ed eb rb 5 | ed ec rc 6 | ee eb rc 7 | ee ec rd 8 | ef ea rd 9 | ec ea rd -------------------------------------------------------------------------------- /tests/data/kg_filter_by_triple_num/kg_filter_by_triple_num.link: -------------------------------------------------------------------------------- 1 | item_id:token entity_id:token 2 | ia ea 3 | ib eb 4 | ic ec 5 | id ed 6 | ie ee 7 | if ef -------------------------------------------------------------------------------- /tests/data/kg_remap_id/kg_remap_id.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token 2 | ua ia 3 | ub ib 4 | uc ic 5 | ud id -------------------------------------------------------------------------------- /tests/data/kg_remap_id/kg_remap_id.kg: -------------------------------------------------------------------------------- 1 | head_id:token tail_id:token relation_id:token 2 | eb ea ra 3 | ec eb rb 4 | ed ec rc 5 | ee ed rd -------------------------------------------------------------------------------- /tests/data/kg_remap_id/kg_remap_id.link: -------------------------------------------------------------------------------- 1 | item_id:token entity_id:token 2 | ib eb 3 | ic ec 4 | id ed 5 | ie ee -------------------------------------------------------------------------------- /tests/data/kg_reverse_r/kg_reverse_r.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token 2 | ua ia 3 | ub ib 4 | uc ic 5 | ud id -------------------------------------------------------------------------------- /tests/data/kg_reverse_r/kg_reverse_r.kg: -------------------------------------------------------------------------------- 1 | head_id:token tail_id:token relation_id:token 2 | eb ea ra 3 | ec eb rb 4 | ed ec rc 5 | ee ed rd -------------------------------------------------------------------------------- /tests/data/kg_reverse_r/kg_reverse_r.link: -------------------------------------------------------------------------------- 1 | item_id:token entity_id:token 2 | ia ea 3 | ib eb 4 | ic ec 5 | id ed 6 | ie ee -------------------------------------------------------------------------------- /tests/data/normalize/normalize.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token rating:float star:float 2 | 1 1 0 4 3 | 2 2 1 2 4 | 3 3 4 0 5 | 4 4 3 1 6 | 5 5 2 3 -------------------------------------------------------------------------------- /tests/data/remap_id/remap_id.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token add_user:token add_item:token user_list:token_seq 2 | ua ia ub ie uc ue 3 | ub ib ue ic 4 | uc ic ud if ua ub uc 5 | ud id uf ia uf -------------------------------------------------------------------------------- /tests/data/remove_duplication/remove_duplication.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token timestamp:float 2 | 1 1 1 3 | 1 1 0 4 | 1 1 2 -------------------------------------------------------------------------------- /tests/data/reorder_dataset/reorder_dataset.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token timestamp:float 2 | 1 1 1 3 | 1 2 2 4 | 1 3 3 5 | 1 4 4 6 | 1 5 5 7 | 1 6 6 8 | 1 7 7 9 | 1 8 8 10 | 1 14 9 11 | 1 15 10 12 | 1 16 11 13 | 1 10 12 14 | 1 9 13 15 | 1 13 14 16 | 1 12 15 17 | 1 11 16 18 | 1 18 17 19 | 1 17 18 20 | 1 24 19 21 | 1 22 20 22 | 1 23 21 23 | 1 20 22 24 | 1 19 23 25 | 1 25 24 26 | 1 21 25 -------------------------------------------------------------------------------- /tests/data/rm_dup_and_filter_by_inter_num/rm_dup_and_filter_by_inter_num.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token 2 | 1 1 3 | 1 2 4 | 2 1 5 | 2 2 6 | 3 3 7 | 3 3 8 | 3 4 9 | 4 4 -------------------------------------------------------------------------------- /tests/data/rm_dup_and_filter_value/rm_dup_and_filter_value.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token timestamp:float rating:float 2 | 1 1 1 1 3 | 1 1 0 5 4 | 1 1 2 3 5 | 2 2 0 3 -------------------------------------------------------------------------------- /tests/data/seq_benchmark/seq_benchmark.test.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token timestamp:float item_id_list:token_seq timestamp_list:float_seq 2 | 1 7 7 1 2 3 4 5 6 1 2 3 4 5 6 3 | 1 8 8 1 2 3 4 5 6 7 1 2 3 4 5 6 7 4 | 2 8 8 4 5 6 7 4 5 6 7 5 | 3 6 6 4 5 4 5 6 | -------------------------------------------------------------------------------- /tests/data/seq_benchmark/seq_benchmark.train.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token timestamp:float item_id_list:token_seq timestamp_list:float_seq 2 | 1 2 2 1 1 3 | 1 3 3 1 2 1 2 4 | 1 4 4 1 2 3 1 2 3 5 | 4 4 4 3 3 6 | 2 5 5 4 4 7 | 2 6 6 4 5 4 5 8 | 3 5 5 4 4 9 | -------------------------------------------------------------------------------- /tests/data/seq_benchmark/seq_benchmark.valid.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token timestamp:float item_id_list:token_seq timestamp_list:float_seq 2 | 1 5 5 1 2 3 4 1 2 3 4 3 | 1 6 6 1 2 3 4 5 1 2 3 4 5 4 | 2 7 7 4 5 6 4 5 6 5 | -------------------------------------------------------------------------------- /tests/data/seq_dataset/seq_dataset.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token timestamp:float 2 | 1 1 1 3 | 1 2 2 4 | 1 3 3 5 | 1 4 4 6 | 1 5 5 7 | 1 6 6 8 | 1 7 7 9 | 1 8 8 10 | 2 4 4 11 | 2 5 5 12 | 2 6 6 13 | 2 7 7 14 | 2 8 8 15 | 3 4 4 16 | 3 5 5 17 | 3 6 6 18 | 4 3 3 19 | 4 4 4 -------------------------------------------------------------------------------- /tests/data/set_label_by_threshold/set_label_by_threshold.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token rating:float 2 | 1 1 5 3 | 2 2 3 4 | 3 3 4 5 | 4 4 2 -------------------------------------------------------------------------------- /tests/data/ui_feat_preparation_and_fill_nan/ui_feat_preparation_and_fill_nan.inter: -------------------------------------------------------------------------------- 1 | user_id:token item_id:token rating:float time_list:float_seq 2 | ua ia 0 1 2 3 3 | ub ib 1 2 4 | uc ic 2 5 | ud id 5 4 -------------------------------------------------------------------------------- /tests/data/ui_feat_preparation_and_fill_nan/ui_feat_preparation_and_fill_nan.item: -------------------------------------------------------------------------------- 1 | item_id:token price:float 2 | ia 0 3 | ib 1 4 | ic 2 5 | ie 3 -------------------------------------------------------------------------------- /tests/data/ui_feat_preparation_and_fill_nan/ui_feat_preparation_and_fill_nan.user: -------------------------------------------------------------------------------- 1 | user_id:token age:float profile:token_seq 2 | ua 0 a b c 3 | ub 1 4 | uc 2 c 5 | ue 3 c b -------------------------------------------------------------------------------- /tests/hyper_tuning/test_hyper_tuning.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # @Time : 2022/7/15 3 | # @Author : Gaowei Zhang 4 | # @Email : zgw15630559577@163.com 5 | import os 6 | import unittest 7 | from recbole.trainer import HyperTuning 8 | from recbole.quick_start import objective_function 9 | 10 | current_path = os.path.dirname(os.path.realpath(__file__)) 11 | config_file_list = [os.path.join(current_path, "test_hyper_tuning_config.yaml")] 12 | params_file = os.path.join(current_path, "test_hyper_tuning_params.yaml") 13 | 14 | 15 | def quick_test(algo): 16 | hp = HyperTuning( 17 | objective_function, 18 | algo=algo, 19 | early_stop=10, 20 | max_evals=10, 21 | params_file=params_file, 22 | fixed_config_file_list=config_file_list, 23 | ) 24 | hp.run() 25 | 26 | 27 | class TestHyperTuning(unittest.TestCase): 28 | def test_exhaustive(self): 29 | quick_test(algo="exhaustive") 30 | 31 | def test_random(self): 32 | quick_test(algo="random") 33 | 34 | def test_bayes(self): 35 | quick_test(algo="bayes") 36 | 37 | 38 | if __name__ == "__main__": 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /tests/hyper_tuning/test_hyper_tuning_config.yaml: -------------------------------------------------------------------------------- 1 | dataset: test 2 | model: BPR 3 | epochs: 1 4 | state: ERROR 5 | data_path: tests/test_data/ 6 | 7 | # Atomic File Format 8 | field_separator: "\t" 9 | seq_separator: " " 10 | 11 | # Common Features 12 | USER_ID_FIELD: user_id 13 | ITEM_ID_FIELD: item_id 14 | RATING_FIELD: rating 15 | TIME_FIELD: timestamp 16 | seq_len: ~ 17 | # Label for Point-wise DataLoader 18 | LABEL_FIELD: label 19 | # NegSample Prefix for Pair-wise DataLoader 20 | NEG_PREFIX: neg_ 21 | # Sequential Model Needed 22 | ITEM_LIST_LENGTH_FIELD: item_length 23 | LIST_SUFFIX: _list 24 | MAX_ITEM_LIST_LENGTH: 50 25 | POSITION_FIELD: position_id 26 | # Knowledge-based Model Needed 27 | HEAD_ENTITY_ID_FIELD: head_id 28 | TAIL_ENTITY_ID_FIELD: tail_id 29 | RELATION_ID_FIELD: relation_id 30 | ENTITY_ID_FIELD: entity_id 31 | 32 | # Selectively Loading 33 | load_col: 34 | inter: [user_id, item_id, rating, timestamp] 35 | user: [user_id, age, gender, occupation] 36 | item: [item_id, movie_title, release_year, class] 37 | link: [item_id, entity_id] 38 | kg: [head_id, relation_id, tail_id] 39 | 40 | unload_col: ~ 41 | 42 | # Preprocessing 43 | alias_of_user_id: ~ 44 | alias_of_item_id: ~ 45 | alias_of_entity_id: ~ 46 | alias_of_relation_id: ~ 47 | preload_weight: ~ 48 | normalize_field: ~ 49 | normalize_all: True 50 | -------------------------------------------------------------------------------- /tests/hyper_tuning/test_hyper_tuning_params.yaml: -------------------------------------------------------------------------------- 1 | learning_rate loguniform -8,0 2 | embedding_size choice [64,96,128] 3 | train_batch_size choice [1024,2048] -------------------------------------------------------------------------------- /tests/model/test_model.yaml: -------------------------------------------------------------------------------- 1 | dataset: test 2 | epochs: 1 3 | state: ERROR 4 | data_path: tests/test_data/ 5 | 6 | # Atomic File Format 7 | field_separator: "\t" 8 | seq_separator: " " 9 | 10 | # Common Features 11 | USER_ID_FIELD: user_id 12 | ITEM_ID_FIELD: item_id 13 | RATING_FIELD: rating 14 | TIME_FIELD: timestamp 15 | seq_len: ~ 16 | # Label for Point-wise DataLoader 17 | LABEL_FIELD: label 18 | # NegSample Prefix for Pair-wise DataLoader 19 | NEG_PREFIX: neg_ 20 | # Sequential Model Needed 21 | ITEM_LIST_LENGTH_FIELD: item_length 22 | LIST_SUFFIX: _list 23 | MAX_ITEM_LIST_LENGTH: 50 24 | POSITION_FIELD: position_id 25 | # Knowledge-based Model Needed 26 | HEAD_ENTITY_ID_FIELD: head_id 27 | TAIL_ENTITY_ID_FIELD: tail_id 28 | RELATION_ID_FIELD: relation_id 29 | ENTITY_ID_FIELD: entity_id 30 | 31 | # Selectively Loading 32 | load_col: 33 | inter: [user_id, item_id, rating, timestamp] 34 | user: [user_id, age, gender, occupation] 35 | item: [item_id, movie_title, release_year, class] 36 | link: [item_id, entity_id] 37 | kg: [head_id, relation_id, tail_id] 38 | 39 | unload_col: ~ 40 | 41 | # Preprocessing 42 | alias_of_user_id: ~ 43 | alias_of_item_id: ~ 44 | alias_of_entity_id: ~ 45 | alias_of_relation_id: ~ 46 | preload_weight: ~ 47 | normalize_field: ~ 48 | normalize_all: True 49 | -------------------------------------------------------------------------------- /tests/model/test_model_manual.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # @Time : 2020/11/18 3 | # @Author : Xingyu Pan 4 | # @Email : panxy@ruc.edu.cn 5 | 6 | 7 | import os 8 | import unittest 9 | 10 | from recbole.quick_start import objective_function 11 | 12 | current_path = os.path.dirname(os.path.realpath(__file__)) 13 | config_file_list = [os.path.join(current_path, "test_model.yaml")] 14 | 15 | 16 | def quick_test(config_dict): 17 | objective_function( 18 | config_dict=config_dict, config_file_list=config_file_list, saved=False 19 | ) 20 | 21 | 22 | class TestSequentialRecommender(unittest.TestCase): 23 | # def test_gru4reckg(self): 24 | # config_dict = { 25 | # 'model': 'GRU4RecKG', 26 | # } 27 | # quick_test(config_dict) 28 | 29 | def test_s3rec(self): 30 | config_dict = { 31 | "model": "S3Rec", 32 | "train_stage": "pretrain", 33 | "save_step": 1, 34 | "train_neg_sample_args": None, 35 | } 36 | quick_test(config_dict) 37 | 38 | config_dict = { 39 | "model": "S3Rec", 40 | "train_stage": "finetune", 41 | "pre_model_path": "./saved/S3Rec-test-1.pth", 42 | "train_neg_sample_args": None, 43 | } 44 | quick_test(config_dict) 45 | 46 | 47 | if __name__ == "__main__": 48 | unittest.main() 49 | --------------------------------------------------------------------------------