├── .github
└── workflows
│ ├── contributor.yml
│ ├── jupyter-book.yml
│ └── pypi.yml
├── .gitignore
├── CHANGELOG.md
├── CITATION
├── CONTRIBUTORS.md
├── LICENSE
├── README.md
├── data
├── README.md
├── tiny_csv
│ ├── test_sample.csv
│ ├── train_sample.csv
│ ├── userid_emb_dim8.npz
│ └── valid_sample.csv
├── tiny_mtl
│ ├── test.csv
│ └── train.csv
├── tiny_npz
│ ├── feature_map.json
│ ├── test.npz
│ ├── train.npz
│ └── valid.npz
├── tiny_parquet
│ ├── feature_map.json
│ ├── test.parquet
│ ├── train.parquet
│ └── valid.parquet
├── tiny_seq
│ ├── feature_map.json
│ ├── test.npz
│ ├── train.npz
│ └── valid.npz
└── tiny_tfrecord
│ ├── feature_map.json
│ ├── test.tfrecord
│ ├── train.tfrecord
│ └── valid.tfrecord
├── demo
├── config
│ ├── example1_config
│ │ └── dataset_config.yaml
│ ├── example2_config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── example3_config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── example4_config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── example5_config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── example6_config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ └── example7_config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
├── example1_build_dataset_to_parquet.py
├── example2_DeepFM_with_parquet_input.py
├── example3_DeepFM_with_npz_input.py
├── example4_DeepFM_with_csv_input.py
├── example5_DeepFM_with_pretrained_emb.py
├── example6_DIN_with_sequence_feature.py
└── example7_DeepFM_with_customized_preprocess.py
├── docs
├── _config.yml
├── _toc.yml
├── configurations.md
├── img
│ ├── DCN.PNG
│ ├── MMoE.jpg
│ ├── PLE.png
│ ├── ShareBottom.jpg
│ ├── logo.png
│ └── workflow.jpg
├── index.md
├── installation.md
├── logo.png
├── quickstart.md
├── tutorials
│ ├── v1.0
│ │ ├── _config.yml
│ │ ├── _toc.yml
│ │ ├── how_to_make_configurations.ipynb
│ │ ├── img
│ │ │ └── logo.png
│ │ ├── index.md
│ │ ├── install_fuxictr.ipynb
│ │ ├── run_model_with_config_file.ipynb
│ │ ├── run_model_with_h5_input.ipynb
│ │ ├── run_the_demo.ipynb
│ │ └── tune_model_via_grid_search.ipynb
│ ├── v1.1
│ │ ├── _config.yml
│ │ ├── _toc.yml
│ │ ├── how_to_make_configurations.ipynb
│ │ ├── img
│ │ │ └── logo.png
│ │ ├── index.md
│ │ ├── install_fuxictr.ipynb
│ │ ├── run_model_with_config_file.ipynb
│ │ ├── run_model_with_h5_input.ipynb
│ │ ├── run_the_demo.ipynb
│ │ └── tune_model_via_grid_search.ipynb
│ ├── v1.2
│ │ ├── _config.yml
│ │ ├── _toc.yml
│ │ ├── how_to_make_configurations.ipynb
│ │ ├── img
│ │ │ └── logo.png
│ │ ├── index.md
│ │ ├── install_fuxictr.ipynb
│ │ ├── run_model_with_config_file.ipynb
│ │ ├── run_model_with_h5_input.ipynb
│ │ ├── run_the_demo.ipynb
│ │ └── tune_model_via_grid_search.ipynb
│ └── v2.0
│ │ ├── _config.yml
│ │ ├── _toc.yml
│ │ ├── citations.bib
│ │ ├── configurations.md
│ │ ├── img
│ │ └── logo.png
│ │ ├── index.md
│ │ ├── installation.md
│ │ └── quickstart.md
└── workflow.jpg
├── experiment
├── config
│ └── DCN_tiny_parquet_tuner_config.yaml
├── enumerate_param_list.py
├── fuxictr_version.py
├── run_expid.py
└── run_param_tuner.py
├── fuxictr
├── __init__.py
├── autotuner.py
├── datasets
│ ├── __init__.py
│ ├── avazu.py
│ ├── criteo.py
│ └── kkbox.py
├── features.py
├── metrics.py
├── preprocess
│ ├── __init__.py
│ ├── build_dataset.py
│ ├── feature_processor.py
│ ├── normalizer.py
│ └── tokenizer.py
├── pytorch
│ ├── __init__.py
│ ├── dataloaders
│ │ ├── __init__.py
│ │ ├── npz_block_dataloader.py
│ │ ├── npz_dataloader.py
│ │ ├── parquet_block_dataloader.py
│ │ ├── parquet_dataloader.py
│ │ └── rank_dataloader.py
│ ├── layers
│ │ ├── __init__.py
│ │ ├── activations.py
│ │ ├── attentions
│ │ │ ├── __init__.py
│ │ │ ├── dot_product_attention.py
│ │ │ ├── squeeze_excitation.py
│ │ │ └── target_attention.py
│ │ ├── blocks
│ │ │ ├── __init__.py
│ │ │ ├── factorization_machine.py
│ │ │ ├── logistic_regression.py
│ │ │ └── mlp_block.py
│ │ ├── embeddings
│ │ │ ├── __init__.py
│ │ │ ├── feature_embedding.py
│ │ │ └── pretrained_embedding.py
│ │ ├── interactions
│ │ │ ├── __init__.py
│ │ │ ├── bilinear_interaction.py
│ │ │ ├── compressed_interaction_net.py
│ │ │ ├── cross_net.py
│ │ │ ├── holographic_interaction.py
│ │ │ ├── inner_product.py
│ │ │ └── interaction_machine.py
│ │ └── pooling.py
│ ├── models
│ │ ├── __init__.py
│ │ ├── multitask_model.py
│ │ └── rank_model.py
│ └── torch_utils.py
├── tensorflow
│ ├── __init__.py
│ ├── dataloaders
│ │ ├── __init__.py
│ │ └── tf_dataloader.py
│ ├── layers
│ │ ├── __init__.py
│ │ ├── blocks
│ │ │ ├── __init__.py
│ │ │ ├── factorization_machine.py
│ │ │ ├── linear.py
│ │ │ ├── logistic_regression.py
│ │ │ └── mlp_block.py
│ │ ├── embeddings
│ │ │ ├── __init__.py
│ │ │ └── feature_embedding.py
│ │ ├── interactions
│ │ │ ├── __init__.py
│ │ │ ├── cross_net.py
│ │ │ └── inner_product.py
│ │ └── pooling.py
│ ├── models
│ │ ├── __init__.py
│ │ └── rank_model.py
│ └── tf_utils.py
├── utils.py
└── version.py
├── model_zoo
├── AFM
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── AFM.py
│ │ └── __init__.py
├── AFN
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── AFN.py
│ │ └── __init__.py
├── AOANet
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── AOANet.py
│ │ └── __init__.py
├── APG
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── APG.py
│ │ ├── APG_DCNv2.py
│ │ ├── APG_DeepFM.py
│ │ └── __init__.py
├── AutoInt
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── AutoInt.py
│ │ └── __init__.py
├── BST
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── BST.py
│ │ └── __init__.py
├── CCPM
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── CCPM.py
│ │ └── __init__.py
├── DCN
│ ├── DCN_tf
│ │ ├── README.md
│ │ ├── config
│ │ │ ├── dataset_config.yaml
│ │ │ └── model_config.yaml
│ │ ├── fuxictr_version.py
│ │ ├── run_expid.py
│ │ └── src
│ │ │ ├── DCN.py
│ │ │ └── __init__.py
│ └── DCN_torch
│ │ ├── README.md
│ │ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ │ ├── fuxictr_version.py
│ │ ├── run_expid.py
│ │ └── src
│ │ ├── DCN.py
│ │ └── __init__.py
├── DCNv2
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── DCNv2.py
│ │ └── __init__.py
├── DESTINE
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── DESTINE.py
│ │ └── __init__.py
├── DIEN
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── DIEN.py
│ │ └── __init__.py
├── DIN
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── DIN.py
│ │ └── __init__.py
├── DLRM
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── DLRM.py
│ │ └── __init__.py
├── DMIN
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── DMIN.py
│ │ └── __init__.py
├── DMR
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── DMR.py
│ │ └── __init__.py
├── DNN
│ ├── DNN_tf
│ │ ├── README.md
│ │ ├── config
│ │ │ ├── dataset_config.yaml
│ │ │ └── model_config.yaml
│ │ ├── fuxictr_version.py
│ │ ├── run_expid.py
│ │ └── src
│ │ │ ├── DNN.py
│ │ │ └── __init__.py
│ └── DNN_torch
│ │ ├── README.md
│ │ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ │ ├── fuxictr_version.py
│ │ ├── run_expid.py
│ │ └── src
│ │ ├── DNN.py
│ │ └── __init__.py
├── DSSM
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── DSSM.py
│ │ └── __init__.py
├── DeepCrossing
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── DeepCrossing.py
│ │ └── __init__.py
├── DeepFM
│ ├── DeepFM_tf
│ │ ├── README.md
│ │ ├── config
│ │ │ ├── dataset_config.yaml
│ │ │ └── model_config.yaml
│ │ ├── fuxictr_version.py
│ │ ├── run_expid.py
│ │ └── src
│ │ │ ├── DeepFM.py
│ │ │ └── __init__.py
│ └── DeepFM_torch
│ │ ├── README.md
│ │ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ │ ├── fuxictr_version.py
│ │ ├── run_expid.py
│ │ └── src
│ │ ├── DeepFM.py
│ │ └── __init__.py
├── DeepIM
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── DeepIM.py
│ │ └── __init__.py
├── EDCN
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── EDCN.py
│ │ └── __init__.py
├── EulerNet
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── readme.md
│ ├── run_expid.py
│ └── src
│ │ ├── EulerNet.py
│ │ └── __init__.py
├── FFM
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── FFM.py
│ │ ├── FFMv2.py
│ │ └── __init__.py
├── FGCNN
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── FGCNN.py
│ │ └── __init__.py
├── FLEN
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── FLEN.py
│ │ └── __init__.py
├── FM
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── FM.py
│ │ └── __init__.py
├── FiBiNET
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── FiBiNET.py
│ │ └── __init__.py
├── FiGNN
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── FiGNN.py
│ │ └── __init__.py
├── FinalMLP
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── DualMLP.py
│ │ ├── FinalMLP.py
│ │ └── __init__.py
├── FinalNet
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── FinalNet.py
│ │ └── __init__.py
├── FmFM
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── FmFM.py
│ │ └── __init__.py
├── FwFM
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── FwFM.py
│ │ └── __init__.py
├── GDCN
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── GDCN.py
│ │ └── __init__.py
├── HFM
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── HFM.py
│ │ └── __init__.py
├── HOFM
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── HOFM.py
│ │ └── __init__.py
├── InterHAt
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── InterHAt.py
│ │ └── __init__.py
├── LR
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── LR.py
│ │ └── __init__.py
├── LongCTR
│ ├── DCNv2
│ │ ├── DCNv2.py
│ │ └── __init__.py
│ ├── DIEN
│ │ ├── DIEN.py
│ │ └── __init__.py
│ ├── DIN
│ │ ├── DIN.py
│ │ └── __init__.py
│ ├── ETA
│ │ ├── ETA.py
│ │ └── __init__.py
│ ├── FinalMLP
│ │ ├── FinalMLP.py
│ │ └── __init__.py
│ ├── MIRRN
│ │ ├── MIRRN.py
│ │ └── __init__.py
│ ├── SDIM
│ │ ├── SDIM.py
│ │ └── __init__.py
│ ├── SIM
│ │ ├── SIM.py
│ │ └── __init__.py
│ ├── TWIN
│ │ ├── TWIN.py
│ │ └── __init__.py
│ ├── TransAct
│ │ ├── TransAct.py
│ │ └── __init__.py
│ ├── __init__.py
│ ├── config
│ │ ├── dcnv2_config
│ │ │ └── model_config.yaml
│ │ ├── dien_config
│ │ │ └── model_config.yaml
│ │ ├── din_config
│ │ │ └── model_config.yaml
│ │ ├── eta_config
│ │ │ └── model_config.yaml
│ │ ├── finalmlp_config
│ │ │ └── model_config.yaml
│ │ ├── mirrn_config
│ │ │ └── model_config.yaml
│ │ ├── sdim_config
│ │ │ └── model_config.yaml
│ │ ├── sim_config
│ │ │ └── model_config.yaml
│ │ ├── transact_config
│ │ │ └── model_config.yaml
│ │ └── twin_config
│ │ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── longctr_dataloader.py
│ └── run_expid.py
├── LorentzFM
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── LorentzFM.py
│ │ └── __init__.py
├── MaskNet
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── MaskNet.py
│ │ └── __init__.py
├── NFM
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── NFM.py
│ │ └── __init__.py
├── ONN
│ ├── ONN_tf
│ │ ├── README.md
│ │ ├── config
│ │ │ ├── dataset_config.yaml
│ │ │ └── model_config.yaml
│ │ ├── fuxictr_version.py
│ │ ├── run_expid.py
│ │ └── src
│ │ │ ├── ONN.py
│ │ │ └── __init__.py
│ └── ONN_torch
│ │ ├── README.md
│ │ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ │ ├── fuxictr_version.py
│ │ ├── run_expid.py
│ │ └── src
│ │ ├── ONN.py
│ │ ├── ONNv2.py
│ │ └── __init__.py
├── PEPNet
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── PEPNet.py
│ │ ├── PPNet.py
│ │ └── __init__.py
├── PNN
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── PNN.py
│ │ └── __init__.py
├── SAM
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── SAM.py
│ │ └── __init__.py
├── TransAct
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── TransAct.py
│ │ └── __init__.py
├── WideDeep
│ ├── WideDeep_tf
│ │ ├── README.md
│ │ ├── config
│ │ │ ├── dataset_config.yaml
│ │ │ └── model_config.yaml
│ │ ├── fuxictr_version.py
│ │ ├── run_expid.py
│ │ └── src
│ │ │ ├── WideDeep.py
│ │ │ └── __init__.py
│ └── WideDeep_torch
│ │ ├── README.md
│ │ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ │ ├── fuxictr_version.py
│ │ ├── run_expid.py
│ │ └── src
│ │ ├── WideDeep.py
│ │ └── __init__.py
├── WuKong
│ ├── README.md
│ ├── config
│ │ ├── dataset_config.yaml
│ │ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ │ ├── WuKong.py
│ │ └── __init__.py
├── __init__.py
├── multitask
│ ├── MMoE
│ │ ├── README.md
│ │ ├── config
│ │ │ ├── dataset_config.yaml
│ │ │ └── model_config.yaml
│ │ ├── fuxictr_version.py
│ │ ├── run_expid.py
│ │ └── src
│ │ │ ├── MMoE.py
│ │ │ └── __init__.py
│ ├── PLE
│ │ ├── README.md
│ │ ├── config
│ │ │ ├── dataset_config.yaml
│ │ │ └── model_config.yaml
│ │ ├── fuxictr_version.py
│ │ ├── run_expid.py
│ │ └── src
│ │ │ ├── PLE.py
│ │ │ └── __init__.py
│ ├── ShareBottom
│ │ ├── README.md
│ │ ├── config
│ │ │ ├── dataset_config.yaml
│ │ │ └── model_config.yaml
│ │ ├── fuxictr_version.py
│ │ ├── run_expid.py
│ │ └── src
│ │ │ ├── ShareBottom.py
│ │ │ └── __init__.py
│ └── __init__.py
└── xDeepFM
│ ├── README.md
│ ├── config
│ ├── dataset_config.yaml
│ └── model_config.yaml
│ ├── fuxictr_version.py
│ ├── run_expid.py
│ └── src
│ ├── __init__.py
│ └── xDeepFM.py
├── requirements.txt
├── setup.py
└── tests
├── test_demo.sh
├── test_tensorflow.sh
├── test_torch.sh
└── unit_tests
└── test_torch_layers_bilinear_interaction.py
/.github/workflows/contributor.yml:
--------------------------------------------------------------------------------
1 | name: Contributor List
2 |
3 | on:
4 | pull_request:
5 | branches:
6 | - main
7 | types: [closed]
8 | workflow_dispatch:
9 |
10 | jobs:
11 | contrib-readme-job:
12 | runs-on: ubuntu-latest
13 | steps:
14 | - name: Add contributor list
15 | uses: akhilmhdh/contributors-readme-action@master
16 | with:
17 | readme_path: "CONTRIBUTORS.md"
18 | image_size: 80
19 | commit_message: "Automatically update contributors"
20 | columns_per_row: 6
21 | env:
22 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 |
--------------------------------------------------------------------------------
/.github/workflows/jupyter-book.yml:
--------------------------------------------------------------------------------
1 | name: jupyter-book
2 |
3 | # Only run this when the master branch changes
4 | on:
5 | push:
6 | branches:
7 | - main
8 |
9 | # This job installs dependencies, build the book, and pushes it to `gh-pages`
10 | jobs:
11 | deploy-book:
12 | runs-on: ubuntu-latest
13 | steps:
14 | # Install dependencies
15 | - uses: actions/checkout@v3
16 | - uses: actions/setup-python@v3
17 | with:
18 | python-version: 3.7
19 | - run: pip install jupyter-book
20 |
21 | # # Build the book
22 | # - name: Build the book
23 | # run: |
24 | # jupyter-book build ./docs/tutorials/v2.0
25 |
26 | # # Push the book's HTML to github-pages
27 | # - name: Deploy github-pages
28 | # uses: peaceiris/actions-gh-pages@v3
29 | # with:
30 | # personal_token: ${{ secrets.PERSONAL_TOKEN }}
31 | # external_repository: fuxictr/fuxictr.github.io
32 | # publish_branch: main
33 | # publish_dir: ./docs/tutorials/v2.0/_build/html
34 | # exclude_assets: '_sources'
35 | # destination_dir: tutorials/v2.0
36 |
--------------------------------------------------------------------------------
/.github/workflows/pypi.yml:
--------------------------------------------------------------------------------
1 | name: Release pypi wheels
2 |
3 | on:
4 | push:
5 | tags:
6 | - '*'
7 | workflow_dispatch:
8 |
9 | jobs:
10 | pypi-publish:
11 | name: Build package wheel and upload to pypi
12 | runs-on: ubuntu-latest
13 | # Specifying a GitHub environment is optional, but strongly encouraged
14 | environment: release
15 | permissions:
16 | # IMPORTANT: this permission is mandatory for trusted publishing
17 | id-token: write
18 | steps:
19 | - uses: actions/checkout@v4
20 | - name: Set up Python
21 | uses: actions/setup-python@v4
22 | with:
23 | python-version: 3.9
24 | - name: Build package wheel and source tarball
25 | run: |
26 | pip install wheel
27 | python setup.py sdist bdist_wheel
28 | - name: Publish package distributions to pypi
29 | uses: pypa/gh-action-pypi-publish@release/v1
30 | with:
31 | packages-dir: dist/
32 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *.pyc
5 | *$py.class
6 |
7 | # C extensions
8 | *.so
9 |
10 | # Distribution / packaging
11 | .Python
12 | build/
13 | develop-eggs/
14 | dist/
15 | downloads/
16 | eggs/
17 | .eggs/
18 | lib/
19 | lib64/
20 | parts/
21 | sdist/
22 | var/
23 | wheels/
24 | *.egg-info/
25 | .installed.cfg
26 | *.egg
27 | MANIFEST*
28 |
29 | # PyInstaller
30 | # Usually these files are written by a python script from a template
31 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
32 | *.manifest
33 | *.spec
34 |
35 | # Installer logs
36 | pip-log.txt
37 | pip-delete-this-directory.txt
38 |
39 | # Unit test / coverage reports
40 | htmlcov/
41 | .tox/
42 | .coverage
43 | .coverage.*
44 | .cache
45 | nosetests.xml
46 | coverage.xml
47 | *.cover
48 | .hypothesis/
49 | .pytest_cache/
50 |
51 | # Translations
52 | *.mo
53 | *.pot
54 |
55 | # Django stuff:
56 | *.log
57 | local_settings.py
58 | db.sqlite3
59 |
60 | # Flask stuff:
61 | instance/
62 | .webassets-cache
63 |
64 | # Scrapy stuff:
65 | .scrapy
66 |
67 | # Sphinx documentation
68 | docs/_build/
69 |
70 | # PyBuilder
71 | target/
72 |
73 | # Jupyter Notebook
74 | .ipynb_checkpoints
75 |
76 | # pyenv
77 | .python-version
78 |
79 | # celery beat schedule file
80 | celerybeat-schedule
81 |
82 | # SageMath parsed files
83 | *.sage.py
84 |
85 | # Environments
86 | .env
87 | .venv
88 | env/
89 | venv/
90 | ENV/
91 | env.bak/
92 | venv.bak/
93 |
94 | # Spyder project settings
95 | .spyderproject
96 | .spyproject
97 |
98 | # Rope project settings
99 | .ropeproject
100 |
101 | # mkdocs documentation
102 | /site
103 |
104 | # mypy
105 | .mypy_cache/
106 | _build
107 | checkpoints
108 | *.csv
109 |
--------------------------------------------------------------------------------
/CITATION:
--------------------------------------------------------------------------------
1 | @incollection{FuxiCTR,
2 | author = {Jieming Zhu and
3 | Jinyang Liu and
4 | Shuai Yang and
5 | Qi Zhang and
6 | Xiuqiang He},
7 | title = {Open Benchmarking for Click-Through Rate Prediction},
8 | booktitle = {The 30th {ACM} International Conference on Information
9 | and Knowledge Management (CIKM'21)},
10 | pages = {2759--2769},
11 | year = {2021}
12 | }
13 |
14 | @incollection{BARS,
15 | author = {Jieming Zhu and
16 | Quanyu Dai and
17 | Liangcai Su and
18 | Rong Ma and
19 | Jinyang Liu and
20 | Guohao Cai and
21 | Xi Xiao and
22 | Rui Zhang},
23 | title = {BARS: Towards Open Benchmarking for Recommender Systems},
24 | booktitle = {The 45th International ACM SIGIR Conference on Research
25 | and Development in Information Retrieval (SIGIR'22)},
26 | year = {2022}
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/data/README.md:
--------------------------------------------------------------------------------
1 | ## Datasets
2 |
3 | A list of benchmark datasets for CTR prediction https://github.com/reczoo/Datasets
4 |
--------------------------------------------------------------------------------
/data/tiny_csv/userid_emb_dim8.npz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/data/tiny_csv/userid_emb_dim8.npz
--------------------------------------------------------------------------------
/data/tiny_npz/test.npz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/data/tiny_npz/test.npz
--------------------------------------------------------------------------------
/data/tiny_npz/train.npz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/data/tiny_npz/train.npz
--------------------------------------------------------------------------------
/data/tiny_npz/valid.npz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/data/tiny_npz/valid.npz
--------------------------------------------------------------------------------
/data/tiny_parquet/test.parquet:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/data/tiny_parquet/test.parquet
--------------------------------------------------------------------------------
/data/tiny_parquet/train.parquet:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/data/tiny_parquet/train.parquet
--------------------------------------------------------------------------------
/data/tiny_parquet/valid.parquet:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/data/tiny_parquet/valid.parquet
--------------------------------------------------------------------------------
/data/tiny_seq/test.npz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/data/tiny_seq/test.npz
--------------------------------------------------------------------------------
/data/tiny_seq/train.npz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/data/tiny_seq/train.npz
--------------------------------------------------------------------------------
/data/tiny_seq/valid.npz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/data/tiny_seq/valid.npz
--------------------------------------------------------------------------------
/data/tiny_tfrecord/test.tfrecord:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/data/tiny_tfrecord/test.tfrecord
--------------------------------------------------------------------------------
/data/tiny_tfrecord/train.tfrecord:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/data/tiny_tfrecord/train.tfrecord
--------------------------------------------------------------------------------
/data/tiny_tfrecord/valid.tfrecord:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/data/tiny_tfrecord/valid.tfrecord
--------------------------------------------------------------------------------
/demo/config/example1_config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for demo only
2 | tiny_example1:
3 | data_root: ../data/
4 | data_format: csv
5 | train_data: ../data/tiny_csv/train_sample.csv
6 | valid_data: ../data/tiny_csv/valid_sample.csv
7 | test_data: ../data/tiny_csv/test_sample.csv
8 | min_categr_count: 1
9 | feature_cols:
10 | [{name: ["userid","adgroup_id","pid","cate_id","campaign_id","customer","brand","cms_segid",
11 | "cms_group_id","final_gender_code","age_level","pvalue_level","shopping_level","occupation"],
12 | active: True, dtype: str, type: categorical}]
13 | label_col: {name: clk, dtype: float}
14 |
--------------------------------------------------------------------------------
/demo/config/example2_config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for demo only
2 | tiny_parquet:
3 | data_root: ../data/
4 | data_format: parquet
5 | train_data: ../data/tiny_parquet/train.parquet
6 | valid_data: ../data/tiny_parquet/valid.parquet
7 | test_data: ../data/tiny_parquet/test.parquet
8 |
--------------------------------------------------------------------------------
/demo/config/example2_config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | DeepFM_test_parquet:
16 | model: DeepFM
17 | dataset_id: tiny_parquet
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | hidden_units: [64, 32]
23 | hidden_activations: relu
24 | net_regularizer: 0
25 | embedding_regularizer: 1.e-8
26 | learning_rate: 1.e-3
27 | batch_norm: False
28 | net_dropout: 0
29 | batch_size: 128
30 | embedding_dim: 4
31 | epochs: 1
32 | shuffle: True
33 | seed: 2023
34 | monitor: 'AUC'
35 | monitor_mode: 'max'
36 |
--------------------------------------------------------------------------------
/demo/config/example3_config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for demo only
2 | tiny_npz:
3 | data_root: ../data/
4 | data_format: npz
5 | train_data: ../data/tiny_npz/train.npz
6 | valid_data: ../data/tiny_npz/valid.npz
7 | test_data: ../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/demo/config/example3_config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | DeepFM_test_npz:
16 | model: DeepFM
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | hidden_units: [64, 32]
23 | hidden_activations: relu
24 | net_regularizer: 0
25 | embedding_regularizer: 1.e-8
26 | learning_rate: 1.e-3
27 | batch_norm: False
28 | net_dropout: 0
29 | batch_size: 128
30 | embedding_dim: 4
31 | epochs: 1
32 | shuffle: True
33 | seed: 2023
34 | monitor: 'AUC'
35 | monitor_mode: 'max'
36 |
--------------------------------------------------------------------------------
/demo/config/example4_config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for demo only
2 | tiny_example4:
3 | data_root: ../data/
4 | data_format: csv
5 | train_data: ../data/tiny_csv/train_sample.csv
6 | valid_data: ../data/tiny_csv/valid_sample.csv
7 | test_data: ../data/tiny_csv/test_sample.csv
8 | min_categr_count: 1
9 | feature_cols:
10 | [{name: ["userid","adgroup_id","pid","cate_id","campaign_id","customer","brand","cms_segid",
11 | "cms_group_id","final_gender_code","age_level","pvalue_level","shopping_level","occupation"],
12 | active: True, dtype: str, type: categorical}]
13 | label_col: {name: clk, dtype: float}
14 |
--------------------------------------------------------------------------------
/demo/config/example4_config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | DeepFM_test_csv:
16 | model: DeepFM
17 | dataset_id: tiny_example4
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | hidden_units: [64, 32]
23 | hidden_activations: relu
24 | net_regularizer: 0
25 | embedding_regularizer: 1.e-8
26 | learning_rate: 1.e-3
27 | batch_norm: False
28 | net_dropout: 0
29 | batch_size: 128
30 | embedding_dim: 4
31 | epochs: 1
32 | shuffle: True
33 | seed: 2019
34 | monitor: 'AUC'
35 | monitor_mode: 'max'
36 |
--------------------------------------------------------------------------------
/demo/config/example5_config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for demo only
2 | tiny_example5:
3 | data_root: ../data/
4 | data_format: csv
5 | train_data: ../data/tiny_csv/train_sample.csv
6 | valid_data: ../data/tiny_csv/valid_sample.csv
7 | test_data: ../data/tiny_csv/test_sample.csv
8 | min_categr_count: 1
9 | feature_cols:
10 | [{name: "userid", active: True, dtype: str, type: categorical, pretrained_emb: "../data/tiny_csv/userid_emb_dim8.npz",
11 | embedding_dim: 8, freeze_emb: True},
12 | {name: ["adgroup_id","pid","cate_id","campaign_id","customer","brand","cms_segid",
13 | "cms_group_id","final_gender_code","age_level","pvalue_level","shopping_level","occupation"],
14 | active: True, dtype: str, type: categorical}]
15 | label_col: {name: clk, dtype: float}
16 |
--------------------------------------------------------------------------------
/demo/config/example5_config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | DeepFM_test_pretrain:
16 | model: DeepFM
17 | dataset_id: tiny_example5
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | hidden_units: [64, 32]
23 | hidden_activations: relu
24 | net_regularizer: 0
25 | embedding_regularizer: 1.e-8
26 | learning_rate: 1.e-3
27 | batch_norm: False
28 | net_dropout: 0
29 | batch_size: 128
30 | embedding_dim: 8
31 | epochs: 1
32 | shuffle: True
33 | seed: 2023
34 | monitor: 'AUC'
35 | monitor_mode: 'max'
36 |
37 |
--------------------------------------------------------------------------------
/demo/config/example6_config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for demo only
2 | tiny_seq:
3 | data_root: ../data/
4 | data_format: npz
5 | train_data: ../data/tiny_seq/train.npz
6 | valid_data: ../data/tiny_seq/valid.npz
7 | test_data: ../data/tiny_seq/test.npz
8 |
--------------------------------------------------------------------------------
/demo/config/example6_config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | DIN_test:
16 | model: DIN
17 | dataset_id: tiny_seq
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | embedding_regularizer: 0
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | dnn_hidden_units: [64, 32]
28 | dnn_activations: relu
29 | attention_hidden_units: [64]
30 | attention_hidden_activations: "Dice"
31 | attention_output_activation: null
32 | attention_dropout: 0
33 | din_target_field: adgroup_id
34 | din_sequence_field: click_sequence
35 | feature_specs: [{name: click_sequence, feature_encoder: null}]
36 | net_dropout: 0
37 | batch_norm: False
38 | epochs: 1
39 | shuffle: True
40 | seed: 2019
41 | monitor: 'AUC'
42 | monitor_mode: 'max'
43 |
--------------------------------------------------------------------------------
/demo/config/example7_config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for demo only
2 | tiny_example7:
3 | data_root: ../data/
4 | data_format: csv
5 | train_data: ../data/tiny_csv/train_sample.csv
6 | valid_data: ../data/tiny_csv/valid_sample.csv
7 | test_data: ../data/tiny_csv/test_sample.csv
8 | min_categr_count: 1
9 | feature_cols:
10 | [{name: ["userid","adgroup_id","pid","cate_id","campaign_id","customer","brand","cms_segid",
11 | "cms_group_id","final_gender_code","age_level","pvalue_level","shopping_level","occupation"],
12 | active: True, dtype: str, type: categorical},
13 | {name: "weekday", active: True, dtype: str, type: categorical, preprocess: convert_weekday},
14 | {name: "hour", active: True, dtype: str, type: categorical, preprocess: convert_hour}]
15 | label_col: {name: clk, dtype: float}
16 |
--------------------------------------------------------------------------------
/demo/config/example7_config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | DeepFM_test_csv:
16 | model: DeepFM
17 | dataset_id: tiny_example7
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | hidden_units: [64, 32]
23 | hidden_activations: relu
24 | net_regularizer: 0
25 | embedding_regularizer: 1.e-8
26 | learning_rate: 1.e-3
27 | batch_norm: False
28 | net_dropout: 0
29 | batch_size: 128
30 | embedding_dim: 4
31 | epochs: 1
32 | shuffle: True
33 | seed: 2019
34 | monitor: 'AUC'
35 | monitor_mode: 'max'
36 |
--------------------------------------------------------------------------------
/docs/_toc.yml:
--------------------------------------------------------------------------------
1 | # Table of contents
2 | # Learn more at https://jupyterbook.org/customize/toc.html
3 |
4 | format: jb-book
5 | root: index
6 | parts:
7 | - caption: TUTORIALS
8 | chapters:
9 | - file: quickstart.md
10 | - file: installation.md
11 | - file: configurations.md
12 |
13 | - caption: REFERENCES
14 | chapters:
15 | - url: https://www.processon.com/view/link/63cfcfab4e30670eac4a81c7
16 | title: FuxiCTR APIs
17 |
--------------------------------------------------------------------------------
/docs/img/DCN.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/docs/img/DCN.PNG
--------------------------------------------------------------------------------
/docs/img/MMoE.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/docs/img/MMoE.jpg
--------------------------------------------------------------------------------
/docs/img/PLE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/docs/img/PLE.png
--------------------------------------------------------------------------------
/docs/img/ShareBottom.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/docs/img/ShareBottom.jpg
--------------------------------------------------------------------------------
/docs/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/docs/img/logo.png
--------------------------------------------------------------------------------
/docs/img/workflow.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/docs/img/workflow.jpg
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | # FuxiCTR Tutorials
2 |
3 | ```{tableofcontents}
4 | ```
5 |
6 | ```{note}
7 | Tutorials for FuxiCTR v2 are under construction.
8 | ```
9 |
10 | ## Previous Versions
11 |
12 | + [Tutorials v1.2](https://fuxictr.github.io/tutorials/v1.2)
13 | + [Tutorials v1.1](https://fuxictr.github.io/tutorials/v1.1)
14 | + [Tutorials v1.0](https://fuxictr.github.io/tutorials/v1.0)
15 |
16 |
--------------------------------------------------------------------------------
/docs/installation.md:
--------------------------------------------------------------------------------
1 | # Install FuxiCTR
2 |
3 | ```{note}
4 | Tutorials for FuxiCTR v2 only.
5 | ```
6 |
7 | FuxiCTR v2 has the following requirements.
8 |
9 | + pytorch 1.10+ (required only for torch models)
10 | + tensorflow 2.1+ (required only for tf models)
11 | + python 3.6+
12 | + pyyaml 5.1+
13 | + scikit-learn
14 | + pandas
15 | + numpy
16 | + h5py
17 | + tqdm
18 |
19 | We recommend to install the above enviornment with `python 3.7` through Anaconda using [Anaconda3-2020.02-Linux-x86_64.sh](https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2020.02-Linux-x86_64.sh).
20 |
21 | For pytorch, you can download the appropriate whl file according to your CUDA version from https://download.pytorch.org/whl/torch_stable.html, and install offline. For eaxmple:
22 |
23 | ```
24 | pip install torch-1.11.0%2Bcu102-cp37-cp37m-linux_x86_64.whl
25 | ```
26 |
27 | There are two ways to install FuxiCTR v2:
28 |
29 | **Solution 1**: pip install
30 |
31 | ```
32 | pip install fuxictr==2.0.0
33 | ```
34 |
35 | ```{note}
36 | All the dependent packages need to be installed accordingly.
37 | ```
38 |
39 | **Solution 2**: git clone or download the zip file: https://github.com/xue-pai/FuxiCTR/tags
40 |
41 | If you download the source code, you need to add the fuxictr folder to the system path in your code.
42 |
43 | ```python
44 | import sys
45 | sys.path.append('./YOUR_PATH_TO_FuxiCTR')
46 | ```
47 |
48 | Check if fuxictr has been installed successfully.
49 |
50 | ```python
51 | import fuxictr
52 | print(fuxictr.__version__)
53 | ```
54 |
--------------------------------------------------------------------------------
/docs/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/docs/logo.png
--------------------------------------------------------------------------------
/docs/quickstart.md:
--------------------------------------------------------------------------------
1 | # Quick Start
2 |
3 | FuxiCTR supports two types of usages as follows.
4 |
5 | 1. **To run an existing model**: Users can easily run each model in the model zoo following the commands below, which is a demo for running DCN. In addition, users can modify the dataset config and model config files to run on their own datasets or with new hyper-parameters. More details can be found in the [readme file](https://github.com/xue-pai/FuxiCTR/blob/v2.0.0/model_zoo/DCN/DCN_torch/README.md).
6 | ```
7 | cd model_zoo/DCN/DCN_torch
8 | python run_expid.py --expid DCN_test --gpu 0
9 | ```
10 |
11 | 2. **To implement a new model**: The FuxiCTR code structure is modularized, so that every part can be overwritten by users according to their needs. As the workflow shown in the following figure, the orange parts comprise the minimal user code to implement a new customized model. In case that data preprocessing or data loader is not directly applicable, one can overwrite a new one through the [core APIs](https://www.processon.com/view/link/63cfcfab4e30670eac4a81c7). Some examples can also be found in the model zoo.
12 |
13 |
14 |

15 |
16 |
--------------------------------------------------------------------------------
/docs/tutorials/v1.0/_toc.yml:
--------------------------------------------------------------------------------
1 | format: jb-book
2 | root: index
3 | parts:
4 | - caption: Tutorials
5 | chapters:
6 | - file: install_fuxictr.ipynb
7 | - file: run_the_demo.ipynb
8 | - file: run_model_with_config_file.ipynb
9 | - file: run_model_with_h5_input.ipynb
10 | - file: how_to_make_configurations.ipynb
11 | - file: tune_model_via_grid_search.ipynb
12 |
--------------------------------------------------------------------------------
/docs/tutorials/v1.0/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/docs/tutorials/v1.0/img/logo.png
--------------------------------------------------------------------------------
/docs/tutorials/v1.0/index.md:
--------------------------------------------------------------------------------
1 | # FuxiCTR v1.0 Tutorials
2 |
3 | ```{note}
4 | The tutorials are built for FuxiCTR v1.0.
5 | ```
6 |
7 | ```{tableofcontents}
8 | ```
9 |
10 |
--------------------------------------------------------------------------------
/docs/tutorials/v1.1/_toc.yml:
--------------------------------------------------------------------------------
1 | format: jb-book
2 | root: index
3 | parts:
4 | - caption: Tutorials
5 | chapters:
6 | - file: install_fuxictr.ipynb
7 | - file: run_the_demo.ipynb
8 | - file: run_model_with_config_file.ipynb
9 | - url: https://github.com/xue-pai/FuxiCTR/tree/v1.1.0/demo/preprocess_h5_demo.py
10 | title: Preprocess raw csv data to h5 data
11 | - file: run_model_with_h5_input.ipynb
12 | - file: how_to_make_configurations.ipynb
13 | - file: tune_model_via_grid_search.ipynb
14 | - url: https://github.com/xue-pai/FuxiCTR/tree/v1.1.0/demo/DeepFM_with_sequence_feature.py
15 | title: Run a model with sequence features
16 | - url: https://github.com/xue-pai/FuxiCTR/tree/v1.1.0/demo/DeepFM_with_pretrained_emb.py
17 | title: Run a model with pretrained embeddings
18 |
19 | - caption: 中文教程
20 | chapters:
21 | - url: https://zhuanlan.zhihu.com/p/437373335
22 | title: CTR模型的高效、高性能实现(一)
23 | - url: https://zhuanlan.zhihu.com/p/453385054
24 | title: CTR模型的高效、高性能实现(二)
--------------------------------------------------------------------------------
/docs/tutorials/v1.1/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/docs/tutorials/v1.1/img/logo.png
--------------------------------------------------------------------------------
/docs/tutorials/v1.1/index.md:
--------------------------------------------------------------------------------
1 | # FuxiCTR v1.1 Tutorials
2 |
3 | ```{note}
4 | The tutorials are built for FuxiCTR v1.1.
5 | ```
6 |
7 | ```{tableofcontents}
8 | ```
9 |
10 |
--------------------------------------------------------------------------------
/docs/tutorials/v1.2/_toc.yml:
--------------------------------------------------------------------------------
1 | format: jb-book
2 | root: index
3 | parts:
4 | - caption: Tutorials
5 | chapters:
6 | - file: install_fuxictr.ipynb
7 | - file: run_the_demo.ipynb
8 | - file: run_model_with_config_file.ipynb
9 | - url: https://github.com/xue-pai/FuxiCTR/tree/v1.2.0/demo/preprocess_h5_demo.py
10 | title: Preprocess raw csv data to h5 data
11 | - file: run_model_with_h5_input.ipynb
12 | - file: how_to_make_configurations.ipynb
13 | - file: tune_model_via_grid_search.ipynb
14 | - url: https://github.com/xue-pai/FuxiCTR/tree/v1.2.0/demo/DeepFM_with_sequence_feature.py
15 | title: Run a model with sequence features
16 | - url: https://github.com/xue-pai/FuxiCTR/tree/v1.2.0/demo/DeepFM_with_pretrained_emb.py
17 | title: Run a model with pretrained embeddings
18 |
19 | - caption: 中文教程
20 | chapters:
21 | - url: https://zhuanlan.zhihu.com/p/437373335
22 | title: CTR模型的高效、高性能实现(一)
23 | - url: https://zhuanlan.zhihu.com/p/453385054
24 | title: CTR模型的高效、高性能实现(二)
--------------------------------------------------------------------------------
/docs/tutorials/v1.2/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/docs/tutorials/v1.2/img/logo.png
--------------------------------------------------------------------------------
/docs/tutorials/v1.2/index.md:
--------------------------------------------------------------------------------
1 | # FuxiCTR v1.2 Tutorials
2 |
3 | ```{note}
4 | The tutorials are built for FuxiCTR v1.2.
5 | ```
6 |
7 | ```{tableofcontents}
8 | ```
9 |
--------------------------------------------------------------------------------
/docs/tutorials/v2.0/_toc.yml:
--------------------------------------------------------------------------------
1 | # Table of contents
2 | # Learn more at https://jupyterbook.org/customize/toc.html
3 |
4 | format: jb-book
5 | root: index
6 | parts:
7 | - caption: Tutorials
8 | chapters:
9 | - file: quickstart.md
10 | - file: installation.md
11 | - file: configurations.md
12 |
13 | - caption: API
14 | chapters:
15 | - url: https://www.processon.com/view/link/63cfcfab4e30670eac4a81c7
16 | title: FuxiCTR core APIs
17 |
18 | # - caption: 中文教程
19 | # chapters:
20 | # - file: todo
21 |
22 |
--------------------------------------------------------------------------------
/docs/tutorials/v2.0/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/docs/tutorials/v2.0/img/logo.png
--------------------------------------------------------------------------------
/docs/tutorials/v2.0/index.md:
--------------------------------------------------------------------------------
1 | # FuxiCTR Tutorials
2 |
3 | ```{tableofcontents}
4 | ```
5 |
6 | ```{note}
7 | Tutorials for FuxiCTR v2 are under construction.
8 | ```
9 |
10 | ## Previous Versions
11 |
12 | + [Tutorials v1.2](https://fuxictr.github.io/tutorials/v1.2)
13 | + [Tutorials v1.1](https://fuxictr.github.io/tutorials/v1.1)
14 | + [Tutorials v1.0](https://fuxictr.github.io/tutorials/v1.0)
15 |
16 |
--------------------------------------------------------------------------------
/docs/tutorials/v2.0/installation.md:
--------------------------------------------------------------------------------
1 | # Install FuxiCTR
2 |
3 | ```{note}
4 | Tutorials for FuxiCTR v2 only.
5 | ```
6 |
7 | FuxiCTR v2 has the following requirements.
8 |
9 | + pytorch 1.10+ (required only for torch models)
10 | + tensorflow 2.1+ (required only for tf models)
11 | + python 3.6+
12 | + pyyaml 5.1+
13 | + scikit-learn
14 | + pandas
15 | + numpy
16 | + h5py
17 | + tqdm
18 |
19 | We recommend to install the above enviornment with `python 3.7` through Anaconda using [Anaconda3-2020.02-Linux-x86_64.sh](https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2020.02-Linux-x86_64.sh).
20 |
21 | For pytorch, you can download the appropriate whl file according to your CUDA version from https://download.pytorch.org/whl/torch_stable.html, and install offline. For eaxmple:
22 |
23 | ```
24 | pip install torch-1.11.0%2Bcu102-cp37-cp37m-linux_x86_64.whl
25 | ```
26 |
27 | There are two ways to install FuxiCTR v2:
28 |
29 | **Solution 1**: pip install
30 |
31 | ```
32 | pip install fuxictr==2.0.0
33 | ```
34 |
35 | ```{note}
36 | All the dependent packages need to be installed accordingly.
37 | ```
38 |
39 | **Solution 2**: git clone or download the zip file: https://github.com/xue-pai/FuxiCTR/tags
40 |
41 | If you download the source code, you need to add the fuxictr folder to the system path in your code.
42 |
43 | ```python
44 | import sys
45 | sys.path.append('./YOUR_PATH_TO_FuxiCTR')
46 | ```
47 |
48 | Check if fuxictr has been installed successfully.
49 |
50 | ```python
51 | import fuxictr
52 | print(fuxictr.__version__)
53 | ```
54 |
--------------------------------------------------------------------------------
/docs/tutorials/v2.0/quickstart.md:
--------------------------------------------------------------------------------
1 | # Quick Start
2 |
3 | FuxiCTR supports two types of usages as follows.
4 |
5 | 1. **To run an existing model**: Users can easily run each model in the model zoo following the commands below, which is a demo for running DCN. In addition, users can modify the dataset config and model config files to run on their own datasets or with new hyper-parameters. More details can be found in the [readme file](https://github.com/xue-pai/FuxiCTR/blob/v2.0.0/model_zoo/DCN/DCN_torch/README.md).
6 | ```
7 | cd model_zoo/DCN/DCN_torch
8 | python run_expid.py --expid DCN_test --gpu 0
9 | ```
10 |
11 | 2. **To implement a new model**: The FuxiCTR code structure is modularized, so that every part can be overwritten by users according to their needs. As the workflow shown in the following figure, the orange parts comprise the minimal user code to implement a new customized model. In case that data preprocessing or data loader is not directly applicable, one can overwrite a new one through the [core APIs](https://www.processon.com/view/link/63cfcfab4e30670eac4a81c7). Some examples can also be found in the model zoo.
12 |
13 |
14 |

15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/docs/workflow.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/docs/workflow.jpg
--------------------------------------------------------------------------------
/experiment/config/DCN_tiny_parquet_tuner_config.yaml:
--------------------------------------------------------------------------------
1 | base_config: ../model_zoo/DCN/DCN_torch/config/
2 | base_expid: DCN_default
3 | dataset_id: tiny_parquet
4 |
5 | tiny_parquet:
6 | data_root: ../data/
7 | data_format: npz
8 | train_data: ../data/tiny_parquet/train.parquet
9 | valid_data: ../data/tiny_parquet/valid.parquet
10 | test_data: ../data/tiny_parquet/test.parquet
11 |
12 | tuner_space:
13 | model_root: './checkpoints/'
14 | embedding_dim: 16
15 | dnn_hidden_units: [[1024, 512, 256]]
16 | num_cross_layers: [5, 4]
17 | embedding_regularizer: [1.e-4, 5.e-4, 1.e-3, 5.e-3]
18 | net_dropout: [0.2, 0.1, 0]
19 | batch_norm: False
20 | learning_rate: 5.e-4
21 | batch_size: 1024
22 | seed: 20222023
23 | group_id: user_id
24 | metrics: [[gAUC, AUC, logloss]]
25 | monitor: {"gAUC": 1, "AUC": 1}
26 |
--------------------------------------------------------------------------------
/experiment/enumerate_param_list.py:
--------------------------------------------------------------------------------
1 | # =========================================================================
2 | # Copyright (C) 2024. The FuxiCTR Library. All rights reserved.
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | # =========================================================================
16 |
17 | from datetime import datetime
18 | import gc
19 | import pandas as pd
20 | import argparse
21 | import fuxictr_version
22 | from fuxictr import autotuner
23 |
24 | if __name__ == '__main__':
25 | parser = argparse.ArgumentParser()
26 | parser.add_argument('--config', type=str, required=True,
27 | default='../config/tuner_config.yaml',
28 | help='The config file for para tuning.')
29 | parser.add_argument('--exclude', type=str, default='',
30 | help='The experiment_result.csv file to exclude finished expid.')
31 | args = vars(parser.parse_args())
32 | exclude_expid = []
33 | if args['exclude'] != '':
34 | result_df = pd.read_csv(args['exclude'], header=None)
35 | expid_df = result_df.iloc[:, 2].map(lambda x: x.replace('[exp_id] ', ''))
36 | exclude_expid = expid_df.tolist()
37 | # generate parameter space combinations
38 | config_dir = autotuner.enumerate_params(args['config'], exclude_expid=exclude_expid)
39 |
40 |
--------------------------------------------------------------------------------
/experiment/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import sys
3 | sys.path.append("../")
4 | import fuxictr
5 | assert fuxictr.__version__ >= "2.3.7"
6 |
--------------------------------------------------------------------------------
/experiment/run_param_tuner.py:
--------------------------------------------------------------------------------
1 | # =========================================================================
2 | # Copyright (C) 2025. FuxiCTR Authors. All rights reserved.
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | # =========================================================================
16 |
17 |
18 | import argparse
19 | import os
20 | import fuxictr_version
21 | from fuxictr import autotuner
22 |
23 | if __name__ == '__main__':
24 | parser = argparse.ArgumentParser()
25 | parser.add_argument('--config', type=str, default='../config/tuner_config.yaml',
26 | help='The config directory or file path for para tuning.')
27 | parser.add_argument('--tag', type=str, default=None,
28 | help='Use the tag to determine which expid to run, e.g. 001 for the first expid.')
29 | parser.add_argument('--gpu', nargs='+', default=[-1], help='The list of gpu devices, -1 for cpu.')
30 | args = vars(parser.parse_args())
31 | gpu_list = args['gpu']
32 | expid_tag = args['tag']
33 |
34 | # generate parameter space combinations
35 | if os.path.isdir(args['config']):
36 | config_dir = args["config"]
37 | else:
38 | config_dir = autotuner.enumerate_params(args['config'])
39 | autotuner.grid_search(config_dir, gpu_list, expid_tag)
40 |
--------------------------------------------------------------------------------
/fuxictr/__init__.py:
--------------------------------------------------------------------------------
1 | from .version import __version__
--------------------------------------------------------------------------------
/fuxictr/datasets/__init__.py:
--------------------------------------------------------------------------------
1 | from . import criteo
2 | from . import avazu
3 | from . import kkbox
4 |
--------------------------------------------------------------------------------
/fuxictr/datasets/avazu.py:
--------------------------------------------------------------------------------
1 | # =========================================================================
2 | # Copyright (C) 2024. The FuxiCTR Library. All rights reserved.
3 | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | # =========================================================================
17 |
18 |
19 | from fuxictr.preprocess import FeatureProcessor
20 | from datetime import datetime, date
21 | import polars as pl
22 |
23 |
24 | class CustomizedFeatureProcessor(FeatureProcessor):
25 | def convert_weekday(self, col_name=None):
26 | def _convert_weekday(timestamp):
27 | dt = date(int('20' + timestamp[0:2]), int(timestamp[2:4]), int(timestamp[4:6]))
28 | return int(dt.strftime('%w'))
29 | return pl.col("hour").apply(_convert_weekday)
30 |
31 | def convert_weekend(self, col_name=None):
32 | def _convert_weekend(timestamp):
33 | dt = date(int('20' + timestamp[0:2]), int(timestamp[2:4]), int(timestamp[4:6]))
34 | return 1 if dt.strftime('%w') in ['6', '0'] else 0
35 | return pl.col("hour").apply(_convert_weekend)
36 |
37 | def convert_hour(self, col_name=None):
38 | return pl.col("hour").apply(lambda x: int(x[6:8]))
39 |
--------------------------------------------------------------------------------
/fuxictr/datasets/criteo.py:
--------------------------------------------------------------------------------
1 | # =========================================================================
2 | # Copyright (C) 2024. The FuxiCTR Library. All rights reserved.
3 | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | # =========================================================================
17 |
18 |
19 | import numpy as np
20 | from fuxictr.preprocess import FeatureProcessor
21 | import polars as pl
22 |
23 |
24 | class CustomizedFeatureProcessor(FeatureProcessor):
25 | def convert_to_bucket(self, col_name):
26 | def _convert_to_bucket(value):
27 | if value > 2:
28 | value = int(np.floor(np.log(value) ** 2))
29 | else:
30 | value = int(value)
31 | return value
32 | return pl.col(col_name).apply(_convert_to_bucket).cast(pl.Int32)
33 |
--------------------------------------------------------------------------------
/fuxictr/preprocess/__init__.py:
--------------------------------------------------------------------------------
1 | from .build_dataset import *
2 | from .feature_processor import *
--------------------------------------------------------------------------------
/fuxictr/preprocess/normalizer.py:
--------------------------------------------------------------------------------
1 | # =========================================================================
2 | # Copyright (C) 2024. The FuxiCTR Library. All rights reserved.
3 | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | # =========================================================================
17 |
18 | import numpy as np
19 | import sklearn.preprocessing as sklearn_preprocess
20 |
21 |
22 | class Normalizer(object):
23 | def __init__(self, normalizer):
24 | if not callable(normalizer):
25 | self.callable = False
26 | if normalizer in ['StandardScaler', 'MinMaxScaler']:
27 | self.normalizer = getattr(sklearn_preprocess, normalizer)()
28 | else:
29 | raise NotImplementedError('normalizer={}'.format(normalizer))
30 | else:
31 | # normalizer is a method
32 | self.normalizer = normalizer
33 | self.callable = True
34 |
35 | def fit(self, X):
36 | if not self.callable:
37 | self.normalizer.fit(X.reshape(-1, 1))
38 |
39 | def transform(self, X):
40 | if self.callable:
41 | return self.normalizer(X)
42 | else:
43 | return self.normalizer.transform(X.reshape(-1, 1)).flatten()
44 |
--------------------------------------------------------------------------------
/fuxictr/pytorch/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/fuxictr/pytorch/__init__.py
--------------------------------------------------------------------------------
/fuxictr/pytorch/dataloaders/__init__.py:
--------------------------------------------------------------------------------
1 | from .rank_dataloader import RankDataLoader
2 |
--------------------------------------------------------------------------------
/fuxictr/pytorch/layers/__init__.py:
--------------------------------------------------------------------------------
1 | from .pooling import *
2 | from .embeddings import *
3 | from .activations import *
4 | from .blocks import *
5 | from .interactions import *
6 | from .attentions import *
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/fuxictr/pytorch/layers/activations.py:
--------------------------------------------------------------------------------
1 | # =========================================================================
2 | # Copyright (C) 2024. The FuxiCTR Library. All rights reserved.
3 | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | # =========================================================================
17 |
18 |
19 | import torch
20 | from torch import nn
21 | import numpy as np
22 |
23 |
24 | class Dice(nn.Module):
25 | def __init__(self, input_dim, eps=1e-9):
26 | super(Dice, self).__init__()
27 | self.bn = nn.BatchNorm1d(input_dim, affine=False, eps=eps, momentum=0.01)
28 | self.alpha = nn.Parameter(torch.zeros(input_dim))
29 |
30 | def forward(self, X):
31 | p = torch.sigmoid(self.bn(X))
32 | output = p * X + self.alpha * (1 - p) * X
33 | return output
34 |
35 |
36 | class GELU(nn.Module):
37 | def __init__(self):
38 | super(GELU, self).__init__()
39 |
40 | def forward(self, x):
41 | return 0.5 * x * (1 + torch.tanh(np.sqrt(2 / np.pi) * ( x + 0.044715 * torch.pow(x, 3))))
42 |
--------------------------------------------------------------------------------
/fuxictr/pytorch/layers/attentions/__init__.py:
--------------------------------------------------------------------------------
1 | from .dot_product_attention import *
2 | from .squeeze_excitation import *
3 | from .target_attention import *
4 |
5 |
--------------------------------------------------------------------------------
/fuxictr/pytorch/layers/attentions/squeeze_excitation.py:
--------------------------------------------------------------------------------
1 | # =========================================================================
2 | # Copyright (C) 2024. The FuxiCTR Library. All rights reserved.
3 | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | # =========================================================================
17 |
18 |
19 | import torch
20 | from torch import nn
21 |
22 |
23 | class SqueezeExcitation(nn.Module):
24 | def __init__(self, num_fields, reduction_ratio=3, excitation_activation="ReLU"):
25 | super(SqueezeExcitation, self).__init__()
26 | reduced_size = max(1, int(num_fields / reduction_ratio))
27 | excitation = [nn.Linear(num_fields, reduced_size, bias=False),
28 | nn.ReLU(),
29 | nn.Linear(reduced_size, num_fields, bias=False)]
30 | if excitation_activation.lower() == "relu":
31 | excitation.append(nn.ReLU())
32 | elif excitation_activation.lower() == "sigmoid":
33 | excitation.append(nn.Sigmoid())
34 | else:
35 | raise NotImplementedError
36 | self.excitation = nn.Sequential(*excitation)
37 |
38 | def forward(self, feature_emb):
39 | Z = torch.mean(feature_emb, dim=-1, out=None)
40 | A = self.excitation(Z)
41 | V = feature_emb * A.unsqueeze(-1)
42 | return V
43 |
--------------------------------------------------------------------------------
/fuxictr/pytorch/layers/blocks/__init__.py:
--------------------------------------------------------------------------------
1 | from .logistic_regression import *
2 | from .factorization_machine import *
3 | from .mlp_block import *
4 |
--------------------------------------------------------------------------------
/fuxictr/pytorch/layers/blocks/factorization_machine.py:
--------------------------------------------------------------------------------
1 | # =========================================================================
2 | # Copyright (C) 2024. The FuxiCTR Library. All rights reserved.
3 | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | # =========================================================================
17 |
18 |
19 | import torch
20 | from torch import nn
21 | from .logistic_regression import LogisticRegression
22 | from ..interactions import InnerProductInteraction
23 |
24 |
25 | class FactorizationMachine(nn.Module):
26 | def __init__(self, feature_map):
27 | super(FactorizationMachine, self).__init__()
28 | self.fm_layer = InnerProductInteraction(feature_map.num_fields, output="product_sum")
29 | self.lr_layer = LogisticRegression(feature_map, use_bias=True)
30 |
31 | def forward(self, X, feature_emb):
32 | lr_out = self.lr_layer(X)
33 | fm_out = self.fm_layer(feature_emb)
34 | output = fm_out + lr_out
35 | return output
36 |
37 |
--------------------------------------------------------------------------------
/fuxictr/pytorch/layers/blocks/logistic_regression.py:
--------------------------------------------------------------------------------
1 | # =========================================================================
2 | # Copyright (C) 2024. The FuxiCTR Library. All rights reserved.
3 | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | # =========================================================================
17 |
18 |
19 | import torch
20 | from torch import nn
21 | from fuxictr.pytorch.layers import FeatureEmbedding
22 |
23 |
24 | class LogisticRegression(nn.Module):
25 | def __init__(self, feature_map, use_bias=True):
26 | super(LogisticRegression, self).__init__()
27 | self.bias = nn.Parameter(torch.zeros(1), requires_grad=True) if use_bias else None
28 | # A trick for quick one-hot encoding in LR
29 | self.embedding_layer = FeatureEmbedding(feature_map, 1, use_pretrain=False, use_sharing=False)
30 |
31 | def forward(self, X):
32 | embed_weights = self.embedding_layer(X)
33 | output = embed_weights.sum(dim=1)
34 | if self.bias is not None:
35 | output += self.bias
36 | return output
37 |
38 |
--------------------------------------------------------------------------------
/fuxictr/pytorch/layers/embeddings/__init__.py:
--------------------------------------------------------------------------------
1 | from .feature_embedding import *
2 | from .pretrained_embedding import *
3 |
--------------------------------------------------------------------------------
/fuxictr/pytorch/layers/interactions/__init__.py:
--------------------------------------------------------------------------------
1 | from .inner_product import *
2 | from .holographic_interaction import *
3 | from .cross_net import *
4 | from .compressed_interaction_net import *
5 | from .bilinear_interaction import *
6 | from .inner_product import *
7 | from .interaction_machine import *
8 |
9 |
--------------------------------------------------------------------------------
/fuxictr/pytorch/models/__init__.py:
--------------------------------------------------------------------------------
1 | from .rank_model import BaseModel
2 | from .multitask_model import MultiTaskModel
--------------------------------------------------------------------------------
/fuxictr/tensorflow/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/fuxictr/tensorflow/__init__.py
--------------------------------------------------------------------------------
/fuxictr/tensorflow/dataloaders/__init__.py:
--------------------------------------------------------------------------------
1 | from .tf_dataloader import TFRecordDataLoader
--------------------------------------------------------------------------------
/fuxictr/tensorflow/layers/__init__.py:
--------------------------------------------------------------------------------
1 | from .pooling import *
2 | from .embeddings import *
3 | from .blocks import *
4 | from .interactions import *
5 |
6 |
7 |
--------------------------------------------------------------------------------
/fuxictr/tensorflow/layers/blocks/__init__.py:
--------------------------------------------------------------------------------
1 | from .logistic_regression import *
2 | from .factorization_machine import *
3 | from .linear import *
4 | from .mlp_block import *
5 |
--------------------------------------------------------------------------------
/fuxictr/tensorflow/layers/blocks/factorization_machine.py:
--------------------------------------------------------------------------------
1 | # =========================================================================
2 | # Copyright (C) 2024. The FuxiCTR Library. All rights reserved.
3 | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | # =========================================================================
17 |
18 |
19 | import tensorflow as tf
20 | from tensorflow.keras.layers import Layer
21 | from .logistic_regression import LogisticRegression
22 | from ..interactions import InnerProductInteraction
23 |
24 |
25 | class FactorizationMachine(Layer):
26 | def __init__(self, feature_map, regularizer=None):
27 | super(FactorizationMachine, self).__init__()
28 | self.fm_layer = InnerProductInteraction(feature_map.num_fields, output="product_sum")
29 | self.lr_layer = LogisticRegression(feature_map, use_bias=True, regularizer=regularizer)
30 |
31 | def call(self, X, feature_emb):
32 | lr_out = self.lr_layer(X)
33 | fm_out = self.fm_layer(feature_emb)
34 | output = fm_out + lr_out
35 | return output
36 |
--------------------------------------------------------------------------------
/fuxictr/tensorflow/layers/blocks/linear.py:
--------------------------------------------------------------------------------
1 | # =========================================================================
2 | # Copyright (C) 2024. The FuxiCTR Library. All rights reserved.
3 | # Copyright (C) 2023. Huawei Technologies Co., Ltd. All rights reserved.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | # =========================================================================
17 |
18 |
19 | from fuxictr.tensorflow.tf_utils import get_initializer, get_regularizer
20 | from tensorflow.keras.layers import Layer, Dense
21 |
22 |
23 | class Linear(Layer):
24 | def __init__(self,
25 | output_dim,
26 | use_bias=True,
27 | initializer="glorot_normal",
28 | regularizer=None):
29 | super(Linear, self).__init__()
30 | self.linear = Dense(output_dim, use_bias=use_bias,
31 | kernel_initializer=get_initializer(initializer),
32 | kernel_regularizer=get_regularizer(regularizer),
33 | bias_regularizer=get_regularizer(regularizer))
34 |
35 | def call(self, inputs):
36 | return self.linear(inputs)
37 |
--------------------------------------------------------------------------------
/fuxictr/tensorflow/layers/blocks/logistic_regression.py:
--------------------------------------------------------------------------------
1 | # =========================================================================
2 | # Copyright (C) 2024. The FuxiCTR Library. All rights reserved.
3 | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | # =========================================================================
17 |
18 |
19 | import tensorflow as tf
20 | from tensorflow.keras.layers import Layer
21 | from fuxictr.tensorflow.layers import FeatureEmbedding
22 |
23 |
24 | class LogisticRegression(Layer):
25 | def __init__(self, feature_map, use_bias=True, regularizer=None):
26 | super(LogisticRegression, self).__init__()
27 | self.bias = tf.Variable(tf.zeros(1)) if use_bias else None
28 | self.embedding_layer = FeatureEmbedding(feature_map, 1, use_pretrain=False,
29 | use_sharing=False,
30 | embedding_regularizer=regularizer,
31 | name_prefix="lr_")
32 |
33 | def call(self, X):
34 | embed_weights = self.embedding_layer(X)
35 | output = tf.reduce_sum(embed_weights, axis=1)
36 | if self.bias is not None:
37 | output += self.bias
38 | return output
39 |
40 |
--------------------------------------------------------------------------------
/fuxictr/tensorflow/layers/embeddings/__init__.py:
--------------------------------------------------------------------------------
1 | from .feature_embedding import *
2 |
3 |
--------------------------------------------------------------------------------
/fuxictr/tensorflow/layers/interactions/__init__.py:
--------------------------------------------------------------------------------
1 | from .inner_product import *
2 | from .cross_net import *
3 |
4 |
--------------------------------------------------------------------------------
/fuxictr/tensorflow/layers/pooling.py:
--------------------------------------------------------------------------------
1 | # =========================================================================
2 | # Copyright (C) 2024. The FuxiCTR Library. All rights reserved.
3 | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | # =========================================================================
17 |
18 | import tensorflow as tf
19 | from tensorflow.keras import Model
20 |
21 |
22 | class MaskedSumPooling(Model):
23 | def __init__(self):
24 | super(MaskedSumPooling, self).__init__()
25 |
26 | def forward(self, embedding_matrix):
27 | return tf.reduce_sum(embedding_matrix, axis=1)
28 |
29 |
30 |
--------------------------------------------------------------------------------
/fuxictr/tensorflow/models/__init__.py:
--------------------------------------------------------------------------------
1 | from .rank_model import BaseModel
--------------------------------------------------------------------------------
/fuxictr/version.py:
--------------------------------------------------------------------------------
1 | __version__="2.3.8"
2 |
--------------------------------------------------------------------------------
/model_zoo/AFM/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/AFM/README.md
--------------------------------------------------------------------------------
/model_zoo/AFM/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/AFM/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | AFM_test:
16 | model: AFM
17 | dataset_id: tiny_npz
18 | loss: binary_crossentropy
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.e-3
23 | embedding_regularizer: 1.e-8
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | attention_dim: 8
28 | attention_dropout: [0, 0]
29 | use_attention: True
30 | epochs: 1
31 | shuffle: True
32 | seed: 2019
33 | monitor: 'AUC'
34 | monitor_mode: 'max'
35 |
36 | AFM_default: # This is a config template
37 | model: AFM
38 | dataset_id: TBD
39 | loss: binary_crossentropy
40 | metrics: ['logloss', 'AUC']
41 | task: binary_classification
42 | optimizer: adam
43 | learning_rate: 1.e-3
44 | embedding_regularizer: 0
45 | net_regularizer: 0
46 | batch_size: 10000
47 | embedding_dim: 40
48 | attention_dim: 40
49 | attention_dropout: [0, 0]
50 | embedding_dropout: 0
51 | use_attention: True
52 | epochs: 100
53 | shuffle: True
54 | seed: 2019
55 | monitor: {'AUC': 1, 'logloss': -1}
56 | monitor_mode: 'max'
57 |
58 |
--------------------------------------------------------------------------------
/model_zoo/AFM/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/AFM/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .AFM import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/AFN/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/AFN/README.md
--------------------------------------------------------------------------------
/model_zoo/AFN/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/AFN/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | AFN_test:
16 | model: AFN
17 | dataset_id: tiny_npz
18 | loss: binary_crossentropy
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.e-3
23 | embedding_regularizer: 1.e-8
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | logarithmic_neurons: 8
28 | afn_hidden_units: [32, 16]
29 | afn_activations: relu
30 | afn_dropout: 0
31 | ensemble_dnn: True
32 | dnn_hidden_units: [32, 16]
33 | dnn_activations: relu
34 | dnn_dropout: 0
35 | batch_norm: False
36 | epochs: 1
37 | shuffle: True
38 | seed: 2019
39 | monitor: 'AUC'
40 | monitor_mode: 'max'
41 |
42 | AFN_default: # This is a config template
43 | model: AFN
44 | dataset_id: TBD
45 | loss: binary_crossentropy
46 | metrics: ['logloss', 'AUC']
47 | task: binary_classification
48 | optimizer: adam
49 | learning_rate: 1.e-3
50 | embedding_regularizer: 0
51 | net_regularizer: 0
52 | batch_size: 10000
53 | embedding_dim: 20
54 | logarithmic_neurons: 1200
55 | afn_hidden_units: [400, 400, 400]
56 | afn_activations: relu
57 | afn_dropout: 0
58 | ensemble_dnn: False
59 | dnn_hidden_units: [400, 400, 400]
60 | dnn_activations: relu
61 | dnn_dropout: 0
62 | batch_norm: False
63 | epochs: 100
64 | shuffle: True
65 | seed: 2019
66 | monitor: {'AUC': 1, 'logloss': -1}
67 | monitor_mode: 'max'
68 |
69 |
--------------------------------------------------------------------------------
/model_zoo/AFN/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/AFN/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .AFN import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/AOANet/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/AOANet/README.md
--------------------------------------------------------------------------------
/model_zoo/AOANet/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/AOANet/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | AOANet_test:
16 | model: AOANet
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.e-3
23 | embedding_regularizer: 0
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | dnn_hidden_units: [64, 64, 64]
28 | dnn_hidden_activations: "ReLU"
29 | num_interaction_layers: 3
30 | num_subspaces: 4
31 | batch_norm: False
32 | net_dropout: 0
33 | epochs: 1
34 | shuffle: True
35 | seed: 2022
36 | monitor: 'AUC'
37 | monitor_mode: 'max'
38 |
39 | AOANet_default: # This is a config template
40 | model: AOANet
41 | dataset_id: TBD # TBD is a place holder for assigning dataset_id
42 | loss: 'binary_crossentropy'
43 | metrics: ['logloss', 'AUC']
44 | task: binary_classification
45 | optimizer: adam
46 | learning_rate: 1.e-3
47 | embedding_regularizer: 0
48 | net_regularizer: 0
49 | batch_size: 4096
50 | embedding_dim: 40
51 | dnn_hidden_units: [64, 64, 64]
52 | dnn_hidden_activations: "ReLU"
53 | num_interaction_layers: 3
54 | num_subspaces: 4
55 | batch_norm: False
56 | net_dropout: 0
57 | epochs: 100
58 | shuffle: True
59 | seed: 2022
60 | monitor: 'AUC'
61 | monitor_mode: 'max'
62 |
63 |
--------------------------------------------------------------------------------
/model_zoo/AOANet/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/AOANet/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .AOANet import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/APG/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/APG/README.md
--------------------------------------------------------------------------------
/model_zoo/APG/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/APG/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/APG/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .APG_DCNv2 import *
2 | from .APG_DeepFM import *
3 |
--------------------------------------------------------------------------------
/model_zoo/AutoInt/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/AutoInt/README.md
--------------------------------------------------------------------------------
/model_zoo/AutoInt/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/AutoInt/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | AutoInt_test:
16 | model: AutoInt
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.e-3
23 | embedding_regularizer: 1.e-8
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | dnn_hidden_units: [64, 32]
28 | dnn_activations: relu
29 | net_dropout: 0
30 | num_heads: 2
31 | attention_layers: 3
32 | attention_dim: 8
33 | use_residual: True
34 | batch_norm: False
35 | layer_norm: False
36 | use_scale: False
37 | use_wide: False
38 | epochs: 1
39 | shuffle: True
40 | seed: 2019
41 | monitor: 'AUC'
42 | monitor_mode: 'max'
43 |
44 | AutoInt_default:
45 | model: AutoInt
46 | dataset_id: TBD
47 | loss: 'binary_crossentropy'
48 | metrics: ['logloss', 'AUC']
49 | task: binary_classification
50 | optimizer: adam
51 | learning_rate: 1.e-3
52 | embedding_regularizer: 0
53 | net_regularizer: 0
54 | batch_size: 10000
55 | embedding_dim: 40
56 | dnn_hidden_units: [400, 400]
57 | dnn_activations: relu
58 | net_dropout: 0
59 | num_heads: 2
60 | attention_layers: 3
61 | attention_dim: 40
62 | use_residual: True
63 | batch_norm: False
64 | layer_norm: False
65 | use_scale: False
66 | use_wide: False
67 | epochs: 100
68 | shuffle: True
69 | seed: 2019
70 | monitor: {'AUC': 1, 'logloss': -1}
71 | monitor_mode: 'max'
72 |
73 |
--------------------------------------------------------------------------------
/model_zoo/AutoInt/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/AutoInt/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .AutoInt import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/BST/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/BST/README.md
--------------------------------------------------------------------------------
/model_zoo/BST/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_seq:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_seq/train.npz
6 | valid_data: ../../data/tiny_seq/valid.npz
7 | test_data: ../../data/tiny_seq/test.npz
8 |
9 |
10 |
--------------------------------------------------------------------------------
/model_zoo/BST/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/BST/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .BST import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/CCPM/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/CCPM/README.md
--------------------------------------------------------------------------------
/model_zoo/CCPM/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/CCPM/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | CCPM_test:
16 | model: CCPM
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.e-3
23 | embedding_regularizer: 1.e-8
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | channels: [3, 3]
28 | kernel_heights: [3, 3]
29 | activation: Tanh
30 | epochs: 1
31 | shuffle: True
32 | seed: 2019
33 | monitor: 'AUC'
34 | monitor_mode: 'max'
35 |
36 | CCPM_default: # This is a config template
37 | model: CCPM
38 | dataset_id: TBD
39 | loss: 'binary_crossentropy'
40 | metrics: ['logloss', 'AUC']
41 | task: binary_classification
42 | optimizer: adam
43 | learning_rate: 1.e-3
44 | embedding_regularizer: 0
45 | net_regularizer: 0
46 | batch_size: 10000
47 | embedding_dim: 40
48 | channels: [3, 3]
49 | kernel_heights: [3, 3]
50 | activation: Tanh
51 | epochs: 100
52 | shuffle: True
53 | seed: 2019
54 | monitor: {'AUC': 1, 'logloss': -1}
55 | monitor_mode: 'max'
56 |
57 |
--------------------------------------------------------------------------------
/model_zoo/CCPM/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/CCPM/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .CCPM import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/DCN/DCN_tf/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/DCN/DCN_tf/README.md
--------------------------------------------------------------------------------
/model_zoo/DCN/DCN_tf/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_tfrecord:
3 | data_root: ../../../data/
4 | data_format: tfrecord
5 | train_data: ../../../data/tiny_tfrecord/train.tfrecord
6 | valid_data: ../../../data/tiny_tfrecord/valid.tfrecord
7 | test_data: ../../../data/tiny_tfrecord/test.tfrecord
8 |
9 |
--------------------------------------------------------------------------------
/model_zoo/DCN/DCN_tf/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | DCN_test:
16 | model: DCN
17 | dataset_id: tiny_tfrecord
18 | loss: 'binary_crossentropy'
19 | metrics: ['AUC', 'logloss']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | embedding_regularizer: 1.e-8
24 | net_regularizer: 0
25 | batch_size: 8
26 | embedding_dim: 4
27 | dnn_hidden_units: [64, 32]
28 | dnn_activations: relu
29 | crossing_layers: 3
30 | net_dropout: 0
31 | batch_norm: False
32 | epochs: 1
33 | shuffle: True
34 | seed: 2019
35 | monitor: 'AUC'
36 | monitor_mode: 'max'
37 |
38 | DCN_default: # This is a config template
39 | model: DCN
40 | dataset_id: TBD
41 | loss: 'binary_crossentropy'
42 | metrics: ['AUC', 'logloss']
43 | task: binary_classification
44 | optimizer: adam
45 | learning_rate: 1.0e-3
46 | embedding_regularizer: 0
47 | net_regularizer: 0
48 | batch_size: 10000
49 | embedding_dim: 40
50 | dnn_hidden_units: [500, 500, 500]
51 | dnn_activations: relu
52 | num_cross_layers: 3
53 | net_dropout: 0
54 | batch_norm: False
55 | epochs: 100
56 | shuffle: True
57 | seed: 2019
58 | monitor: {'AUC': 1, 'logloss': -1}
59 | monitor_mode: 'max'
60 |
61 |
62 |
--------------------------------------------------------------------------------
/model_zoo/DCN/DCN_tf/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.0.0"
4 |
--------------------------------------------------------------------------------
/model_zoo/DCN/DCN_tf/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .DCN import *
2 |
--------------------------------------------------------------------------------
/model_zoo/DCN/DCN_torch/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../../data/
4 | data_format: npz
5 | train_data: ../../../data/tiny_npz/train.npz
6 | valid_data: ../../../data/tiny_npz/valid.npz
7 | test_data: ../../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/DCN/DCN_torch/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | DCN_test:
16 | model: DCN
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | embedding_regularizer: 1.e-8
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | dnn_hidden_units: [64, 32]
28 | dnn_activations: relu
29 | crossing_layers: 3
30 | net_dropout: 0
31 | batch_norm: False
32 | epochs: 1
33 | shuffle: True
34 | seed: 2019
35 | monitor: 'AUC'
36 | monitor_mode: 'max'
37 |
38 | DCN_default: # This is a config template
39 | model: DCN
40 | dataset_id: TBD
41 | loss: 'binary_crossentropy'
42 | metrics: ['logloss', 'AUC']
43 | task: binary_classification
44 | optimizer: adam
45 | learning_rate: 1.0e-3
46 | embedding_regularizer: 0
47 | net_regularizer: 0
48 | batch_size: 10000
49 | embedding_dim: 32
50 | dnn_hidden_units: [1024, 512, 256]
51 | dnn_activations: relu
52 | num_cross_layers: 3
53 | net_dropout: 0
54 | batch_norm: False
55 | epochs: 100
56 | shuffle: True
57 | seed: 20222023
58 | monitor: {'AUC': 1, 'logloss': -1}
59 | monitor_mode: 'max'
60 |
61 |
--------------------------------------------------------------------------------
/model_zoo/DCN/DCN_torch/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/DCN/DCN_torch/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .DCN import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/DCNv2/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/DCNv2/README.md
--------------------------------------------------------------------------------
/model_zoo/DCNv2/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/DCNv2/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/DCNv2/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .DCNv2 import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/DESTINE/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/DESTINE/README.md
--------------------------------------------------------------------------------
/model_zoo/DESTINE/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/DESTINE/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/DESTINE/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .DESTINE import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/DIEN/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/DIEN/README.md
--------------------------------------------------------------------------------
/model_zoo/DIEN/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_seq:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_seq/train.npz
6 | valid_data: ../../data/tiny_seq/valid.npz
7 | test_data: ../../data/tiny_seq/test.npz
8 |
9 |
10 |
--------------------------------------------------------------------------------
/model_zoo/DIEN/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/DIEN/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .DIEN import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/DIN/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/DIN/README.md
--------------------------------------------------------------------------------
/model_zoo/DIN/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_seq:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_seq/train.npz
6 | valid_data: ../../data/tiny_seq/valid.npz
7 | test_data: ../../data/tiny_seq/test.npz
8 |
9 |
10 |
--------------------------------------------------------------------------------
/model_zoo/DIN/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/DIN/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .DIN import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/DLRM/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/DLRM/README.md
--------------------------------------------------------------------------------
/model_zoo/DLRM/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/DLRM/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | DLRM_test:
16 | model: DLRM
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.e-3
23 | embedding_regularizer: 0
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | top_mlp_units: [64, 64, 64]
28 | bottom_mlp_units: [64, 64, 64]
29 | top_mlp_activations: ReLU
30 | bottom_mlp_activations: ReLU
31 | top_mlp_dropout: 0
32 | bottom_mlp_dropout: 0
33 | interaction_op: dot
34 | batch_norm: False
35 | epochs: 1
36 | shuffle: True
37 | seed: 2022
38 | monitor: 'AUC'
39 | monitor_mode: 'max'
40 |
41 | DLRM_default: # This is a config template
42 | model: DLRM
43 | dataset_id: TBD
44 | loss: 'binary_crossentropy'
45 | metrics: ['logloss', 'AUC']
46 | task: binary_classification
47 | optimizer: adam
48 | learning_rate: 1.e-3
49 | embedding_regularizer: 0
50 | net_regularizer: 0
51 | batch_size: 4096
52 | embedding_dim: 40
53 | top_mlp_units: [64, 64, 64]
54 | bottom_mlp_units: [64, 64, 64]
55 | top_mlp_activations: ReLU
56 | bottom_mlp_activations: ReLU
57 | top_mlp_dropout: 0
58 | bottom_mlp_dropout: 0
59 | interaction_op: dot
60 | batch_norm: False
61 | epochs: 100
62 | shuffle: True
63 | seed: 2022
64 | monitor: 'AUC'
65 | monitor_mode: 'max'
66 |
67 |
--------------------------------------------------------------------------------
/model_zoo/DLRM/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/DLRM/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .DLRM import *
2 |
--------------------------------------------------------------------------------
/model_zoo/DMIN/README.md:
--------------------------------------------------------------------------------
1 | ## DMIN
2 |
3 | Zhibo Xiao, Luwei Yang, Wen Jiang, Yi Wei, Yi Hu, Hao Wang. Deep Multi-Interest Network for Click-through Rate Prediction, in CIKM 2020.
4 |
5 |
6 |
--------------------------------------------------------------------------------
/model_zoo/DMIN/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_seq:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_seq/train.npz
6 | valid_data: ../../data/tiny_seq/valid.npz
7 | test_data: ../../data/tiny_seq/test.npz
8 |
9 |
10 |
--------------------------------------------------------------------------------
/model_zoo/DMIN/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/DMIN/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .DMIN import *
2 |
--------------------------------------------------------------------------------
/model_zoo/DMR/README.md:
--------------------------------------------------------------------------------
1 | ## DMR
2 |
3 | Ze Lyu, Yu Dong, Chengfu Huo, Weijun Ren. Deep Match to Rank Model for Personalized Click-Through Rate Prediction, in AAAI 2020.
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/DMR/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_seq:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_seq/train.npz
6 | valid_data: ../../data/tiny_seq/valid.npz
7 | test_data: ../../data/tiny_seq/test.npz
8 |
9 |
10 |
--------------------------------------------------------------------------------
/model_zoo/DMR/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/DMR/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .DMR import *
2 |
--------------------------------------------------------------------------------
/model_zoo/DNN/DNN_tf/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/DNN/DNN_tf/README.md
--------------------------------------------------------------------------------
/model_zoo/DNN/DNN_tf/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_tfrecord:
3 | data_root: ../../../data/
4 | data_format: tfrecord
5 | train_data: ../../../data/tiny_tfrecord/train.tfrecord
6 | valid_data: ../../../data/tiny_tfrecord/valid.tfrecord
7 | test_data: ../../../data/tiny_tfrecord/test.tfrecord
8 |
9 |
--------------------------------------------------------------------------------
/model_zoo/DNN/DNN_tf/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | DNN_test:
16 | model: DNN
17 | dataset_id: tiny_tfrecord
18 | loss: 'binary_crossentropy'
19 | metrics: ['AUC', 'logloss']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.e-3
23 | embedding_regularizer: 1.e-8
24 | net_regularizer: 0
25 | batch_size: 8
26 | embedding_dim: 4
27 | hidden_units: [64, 32]
28 | hidden_activations: relu
29 | net_dropout: 0
30 | batch_norm: False
31 | epochs: 1
32 | shuffle: True
33 | seed: 2019
34 | monitor: 'AUC'
35 | monitor_mode: 'max'
36 |
37 | DNN_default: # This is a config template
38 | model: DCN
39 | dataset_id: TBD
40 | loss: 'binary_crossentropy'
41 | metrics: ['AUC', 'logloss']
42 | task: binary_classification
43 | optimizer: adam
44 | learning_rate: 1.e-3
45 | embedding_regularizer: 0
46 | net_regularizer: 0
47 | batch_size: 10000
48 | embedding_dim: 40
49 | hidden_units: [500, 500, 500]
50 | hidden_activations: relu
51 | net_dropout: 0
52 | batch_norm: False
53 | epochs: 100
54 | shuffle: True
55 | seed: 2019
56 | monitor: {'AUC': 1, 'logloss': -1}
57 | monitor_mode: 'max'
58 |
59 |
60 |
--------------------------------------------------------------------------------
/model_zoo/DNN/DNN_tf/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.0.0"
4 |
--------------------------------------------------------------------------------
/model_zoo/DNN/DNN_tf/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .DNN import DNN
2 |
--------------------------------------------------------------------------------
/model_zoo/DNN/DNN_torch/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/DNN/DNN_torch/README.md
--------------------------------------------------------------------------------
/model_zoo/DNN/DNN_torch/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../../data/
4 | data_format: npz
5 | train_data: ../../../data/tiny_npz/train.npz
6 | valid_data: ../../../data/tiny_npz/valid.npz
7 | test_data: ../../../data/tiny_npz/test.npz
8 |
9 |
--------------------------------------------------------------------------------
/model_zoo/DNN/DNN_torch/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | DNN_test:
16 | model: DNN
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.e-3
23 | embedding_regularizer: 1.e-8
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | hidden_units: [64, 32]
28 | hidden_activations: relu
29 | net_dropout: 0
30 | batch_norm: False
31 | epochs: 1
32 | shuffle: True
33 | seed: 2019
34 | monitor: 'AUC'
35 | monitor_mode: 'max'
36 |
37 | DNN_default: # This is a config template
38 | model: DNN
39 | dataset_id: TBD
40 | loss: 'binary_crossentropy'
41 | metrics: ['logloss', 'AUC']
42 | task: binary_classification
43 | optimizer: adam
44 | learning_rate: 1.e-3
45 | embedding_regularizer: 0
46 | net_regularizer: 0
47 | batch_size: 10000
48 | embedding_dim: 40
49 | hidden_units: [500, 500, 500]
50 | hidden_activations: relu
51 | net_dropout: 0
52 | batch_norm: False
53 | epochs: 100
54 | shuffle: True
55 | seed: 2019
56 | monitor: {'AUC': 1, 'logloss': -1}
57 | monitor_mode: 'max'
58 |
59 |
--------------------------------------------------------------------------------
/model_zoo/DNN/DNN_torch/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/DNN/DNN_torch/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .DNN import DNN
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/DSSM/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/DSSM/README.md
--------------------------------------------------------------------------------
/model_zoo/DSSM/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/DSSM/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | DSSM_test:
16 | model: DSSM
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.e-3
23 | embedding_regularizer: 0
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | user_tower_units: [64, 64, 64]
28 | item_tower_units: [64, 64, 64]
29 | user_tower_activations: "ReLU"
30 | item_tower_activations: "ReLU"
31 | user_tower_dropout: 0
32 | item_tower_dropout: 0
33 | batch_norm: False
34 | epochs: 1
35 | shuffle: True
36 | seed: 2022
37 | monitor: 'AUC'
38 | monitor_mode: 'max'
39 |
40 | DSSM_default: # This is a config template
41 | model: DSSM
42 | dataset_id: TBD
43 | loss: 'binary_crossentropy'
44 | metrics: ['logloss', 'AUC']
45 | task: binary_classification
46 | optimizer: adam
47 | learning_rate: 1.e-3
48 | embedding_regularizer: 0
49 | net_regularizer: 0
50 | batch_size: 4096
51 | embedding_dim: 40
52 | user_tower_units: [64, 64, 64]
53 | item_tower_units: [64, 64, 64]
54 | user_tower_activations: "ReLU"
55 | item_tower_activations: "ReLU"
56 | user_tower_dropout: 0
57 | item_tower_dropout: 0
58 | batch_norm: False
59 | epochs: 100
60 | shuffle: True
61 | seed: 2022
62 | monitor: 'AUC'
63 | monitor_mode: 'max'
64 |
65 |
--------------------------------------------------------------------------------
/model_zoo/DSSM/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/DSSM/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .DSSM import *
2 |
--------------------------------------------------------------------------------
/model_zoo/DeepCrossing/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/DeepCrossing/README.md
--------------------------------------------------------------------------------
/model_zoo/DeepCrossing/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/DeepCrossing/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | DeepCrossing_test:
16 | model: DeepCrossing
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | embedding_regularizer: 1.e-8
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | residual_blocks: [64, 64, 64]
28 | dnn_activations: relu
29 | net_dropout: 0
30 | batch_norm: False
31 | use_residual: True
32 | epochs: 1
33 | shuffle: True
34 | seed: 2019
35 | monitor: 'AUC'
36 | monitor_mode: 'max'
37 |
38 | DeepCrossing_default: # This is a config template
39 | model: DeepCrossing
40 | dataset_id: TBD
41 | loss: 'binary_crossentropy'
42 | metrics: ['logloss', 'AUC']
43 | task: binary_classification
44 | optimizer: adam
45 | learning_rate: 1.0e-3
46 | embedding_regularizer: 0
47 | net_regularizer: 0
48 | batch_size: 10000
49 | embedding_dim: 40
50 | residual_blocks: [500, 500, 500]
51 | dnn_activations: relu
52 | net_dropout: 0
53 | batch_norm: False
54 | use_residual: True
55 | epochs: 100
56 | shuffle: True
57 | seed: 2019
58 | monitor: {'AUC': 1, 'logloss': -1}
59 | monitor_mode: 'max'
60 |
61 |
--------------------------------------------------------------------------------
/model_zoo/DeepCrossing/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/DeepCrossing/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .DeepCrossing import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/DeepFM/DeepFM_tf/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/DeepFM/DeepFM_tf/README.md
--------------------------------------------------------------------------------
/model_zoo/DeepFM/DeepFM_tf/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_tfrecord:
3 | data_root: ../../../data/
4 | data_format: tfrecord
5 | train_data: ../../../data/tiny_tfrecord/train.tfrecord
6 | valid_data: ../../../data/tiny_tfrecord/valid.tfrecord
7 | test_data: ../../../data/tiny_tfrecord/test.tfrecord
8 |
9 |
--------------------------------------------------------------------------------
/model_zoo/DeepFM/DeepFM_tf/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | DeepFM_test:
16 | model: DeepFM
17 | dataset_id: tiny_tfrecord
18 | loss: 'binary_crossentropy'
19 | metrics: ['AUC', 'logloss']
20 | task: binary_classification
21 | optimizer: adam
22 | hidden_units: [64, 32]
23 | hidden_activations: relu
24 | net_regularizer: 0
25 | embedding_regularizer: 1.e-8
26 | learning_rate: 1.e-3
27 | batch_norm: False
28 | net_dropout: 0
29 | batch_size: 8
30 | embedding_dim: 4
31 | epochs: 1
32 | shuffle: True
33 | seed: 2019
34 | monitor: {'AUC': 1, 'logloss': -1}
35 | monitor_mode: 'max'
36 |
37 | DeepFM_default: # This is a config template
38 | model: DeepFM
39 | dataset_id: TBD
40 | loss: 'binary_crossentropy'
41 | metrics: ['AUC', 'logloss']
42 | task: binary_classification
43 | optimizer: adam
44 | hidden_units: [300, 300, 300]
45 | hidden_activations: relu
46 | net_regularizer: 0
47 | embedding_regularizer: 0
48 | learning_rate: 1.e-3
49 | batch_norm: False
50 | net_dropout: 0
51 | batch_size: 10000
52 | embedding_dim: 40
53 | epochs: 100
54 | shuffle: True
55 | seed: 2019
56 | monitor: {'AUC': 1, 'logloss': -1}
57 | monitor_mode: 'max'
58 |
59 |
--------------------------------------------------------------------------------
/model_zoo/DeepFM/DeepFM_tf/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.0.0"
4 |
--------------------------------------------------------------------------------
/model_zoo/DeepFM/DeepFM_tf/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .DeepFM import *
2 |
--------------------------------------------------------------------------------
/model_zoo/DeepFM/DeepFM_torch/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/DeepFM/DeepFM_torch/README.md
--------------------------------------------------------------------------------
/model_zoo/DeepFM/DeepFM_torch/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/DeepFM/DeepFM_torch/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/DeepFM/DeepFM_torch/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .DeepFM import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/DeepIM/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/DeepIM/README.md
--------------------------------------------------------------------------------
/model_zoo/DeepIM/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/DeepIM/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | DeepIM_test:
16 | model: DeepIM
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | im_order: 2
23 | im_batch_norm: False
24 | hidden_units: [64, 32]
25 | hidden_activations: relu
26 | net_regularizer: 0
27 | embedding_regularizer: 0
28 | learning_rate: 1.e-3
29 | net_batch_norm: False
30 | net_dropout: 0
31 | batch_size: 128
32 | embedding_dim: 4
33 | epochs: 1
34 | shuffle: True
35 | seed: 2019
36 | monitor: 'AUC'
37 | monitor_mode: 'max'
38 |
39 | DeepIM_default: # This is a config template
40 | model: DeepIM
41 | dataset_id: TBD
42 | loss: 'binary_crossentropy'
43 | metrics: ['logloss', 'AUC']
44 | task: binary_classification
45 | optimizer: adam
46 | im_order: 2
47 | im_batch_norm: False
48 | hidden_units: [300, 300, 300]
49 | hidden_activations: relu
50 | net_regularizer: 0
51 | embedding_regularizer: 0
52 | learning_rate: 1.e-3
53 | net_batch_norm: False
54 | net_dropout: 0
55 | batch_size: 10000
56 | embedding_dim: 40
57 | epochs: 100
58 | shuffle: True
59 | seed: 2019
60 | monitor: {'AUC': 1, 'logloss': -1}
61 | monitor_mode: 'max'
62 |
63 |
--------------------------------------------------------------------------------
/model_zoo/DeepIM/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/DeepIM/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .DeepIM import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/EDCN/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/EDCN/README.md
--------------------------------------------------------------------------------
/model_zoo/EDCN/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/EDCN/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | EDCN_test:
16 | model: EDCN
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.e-3
23 | embedding_regularizer: 0
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | num_cross_layers: 2
28 | hidden_activations: ReLU
29 | bridge_type: "hadamard_product"
30 | temperature: 1
31 | batch_norm: False
32 | net_dropout: 0
33 | epochs: 1
34 | shuffle: True
35 | seed: 2022
36 | monitor: 'AUC'
37 | monitor_mode: 'max'
38 |
39 | EDCN_default: # This is a config template
40 | model: EDCN
41 | dataset_id: TBD
42 | loss: 'binary_crossentropy'
43 | metrics: ['logloss', 'AUC']
44 | task: binary_classification
45 | optimizer: adam
46 | learning_rate: 1.e-3
47 | embedding_regularizer: 0
48 | net_regularizer: 0
49 | batch_size: 4096
50 | embedding_dim: 40
51 | num_cross_layers: 3
52 | hidden_activations: ReLU
53 | bridge_type: "hadamard_product"
54 | temperature: 1
55 | batch_norm: False
56 | net_dropout: 0
57 | epochs: 100
58 | shuffle: True
59 | seed: 2022
60 | monitor: 'AUC'
61 | monitor_mode: 'max'
62 |
63 |
--------------------------------------------------------------------------------
/model_zoo/EDCN/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/EDCN/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .EDCN import *
2 |
--------------------------------------------------------------------------------
/model_zoo/EulerNet/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
--------------------------------------------------------------------------------
/model_zoo/EulerNet/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | EulerNet_default: # This is a config template
16 | model: EulerNet
17 | dataset_id: TBD
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | shape: [20]
23 | net_ex_dropout: 0.0
24 | net_im_dropout: 0.0
25 | layer_norm: true
26 | learning_rate: 1.0e-3
27 | embedding_regularizer: 0
28 | net_regularizer: 0
29 | batch_size: 10000
30 | embedding_dim: 10
31 | epochs: 100
32 | shuffle: True
33 | seed: 2021
34 | monitor: {'AUC': 1, 'logloss': -1}
35 | monitor_mode: 'max'
36 |
37 | EulerNet_test:
38 | model: EulerNet
39 | dataset_id: tiny_npz
40 | loss: 'binary_crossentropy'
41 | metrics: ['logloss', 'AUC']
42 | task: binary_classification
43 | optimizer: adam
44 | shape: [52]
45 | net_ex_dropout: 0.1
46 | net_im_dropout: 0.1
47 | layer_norm: true
48 | learning_rate: 1.0e-3
49 | embedding_regularizer: 0
50 | net_regularizer: 0
51 | batch_size: 10000
52 | embedding_dim: 10
53 | epochs: 1
54 | shuffle: True
55 | seed: 2021
56 | monitor: {'AUC': 1, 'logloss': -1}
57 | monitor_mode: 'max'
58 |
--------------------------------------------------------------------------------
/model_zoo/EulerNet/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/EulerNet/readme.md:
--------------------------------------------------------------------------------
1 | ## Tuning
2 | The detailed tuning config files are provided in this repo: https://github.com/Ethan-TZ/EulerNet/tree/main/%23Code4FuxiCTR%23.
3 |
4 | ## Cite
5 |
6 | If you find EulerNet useful for your research or development, please cite the following papers: [EulerNet](https://dl.acm.org/doi/10.1145/3539618.3591681).
7 |
8 | ```bibtex
9 | @inproceedings{tian2023eulernet,
10 | title = {EulerNet: Adaptive Feature Interaction Learning via Euler's Formula for CTR Prediction},
11 | author = {Tian, Zhen and Bai, Ting and Zhao, Wayne Xin and Wen, Ji-Rong and Cao, Zhao},
12 | booktitle = {Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval},
13 | pages = {1376–1385},
14 | year = {2023},
15 | }
16 | ```
17 |
--------------------------------------------------------------------------------
/model_zoo/EulerNet/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .EulerNet import *
--------------------------------------------------------------------------------
/model_zoo/FFM/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/FFM/README.md
--------------------------------------------------------------------------------
/model_zoo/FFM/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/FFM/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/FFM/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .FFM import *
2 | from .FFMv2 import *
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/model_zoo/FGCNN/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/FGCNN/README.md
--------------------------------------------------------------------------------
/model_zoo/FGCNN/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/FGCNN/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/FGCNN/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .FGCNN import *
2 |
--------------------------------------------------------------------------------
/model_zoo/FLEN/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/FLEN/README.md
--------------------------------------------------------------------------------
/model_zoo/FLEN/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/FLEN/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | FLEN_test:
16 | model: FLEN
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | embedding_regularizer: 0
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | dnn_hidden_units: [64, 32]
28 | dnn_activations: relu
29 | net_dropout: 0
30 | batch_norm: False
31 | epochs: 1
32 | shuffle: True
33 | seed: 2019
34 | monitor: 'AUC'
35 | monitor_mode: 'max'
36 |
37 | FLEN_default: # This is a config template
38 | model: FLEN
39 | dataset_id: TBD
40 | loss: 'binary_crossentropy'
41 | metrics: ['logloss', 'AUC']
42 | task: binary_classification
43 | optimizer: adam
44 | learning_rate: 1.0e-3
45 | embedding_regularizer: 0
46 | net_regularizer: 0
47 | batch_size: 10000
48 | embedding_dim: 40
49 | dnn_hidden_units: [500, 500, 500]
50 | dnn_activations: relu
51 | net_dropout: 0
52 | batch_norm: False
53 | epochs: 100
54 | shuffle: True
55 | seed: 2019
56 | monitor: {'AUC': 1, 'logloss': -1}
57 | monitor_mode: 'max'
58 |
59 |
60 |
--------------------------------------------------------------------------------
/model_zoo/FLEN/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/FLEN/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .FLEN import *
2 |
--------------------------------------------------------------------------------
/model_zoo/FM/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/FM/README.md
--------------------------------------------------------------------------------
/model_zoo/FM/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/FM/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | FM_test:
16 | model: FM
17 | dataset_id: tiny_npz
18 | loss: binary_crossentropy
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | regularizer: 1.e-8
24 | batch_size: 128
25 | embedding_dim: 4
26 | epochs: 1
27 | shuffle: True
28 | seed: 2019
29 | monitor: 'AUC'
30 | monitor_mode: 'max'
31 |
32 | FM_default: # This is a config template
33 | model: FM
34 | dataset_id: TBD
35 | loss: binary_crossentropy
36 | metrics: ['logloss', 'AUC']
37 | task: binary_classification
38 | optimizer: adam
39 | learning_rate: 1.0e-3
40 | regularizer: 0
41 | batch_size: 10000
42 | embedding_dim: 10
43 | epochs: 100
44 | shuffle: True
45 | seed: 2019
46 | monitor: {'AUC': 1, 'logloss': -1}
47 | monitor_mode: 'max'
48 |
--------------------------------------------------------------------------------
/model_zoo/FM/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/FM/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .FM import FM
--------------------------------------------------------------------------------
/model_zoo/FiBiNET/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/FiBiNET/README.md
--------------------------------------------------------------------------------
/model_zoo/FiBiNET/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/FiBiNET/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | FiBiNET_test:
16 | model: FiBiNET
17 | dataset_id: tiny_npz
18 | loss: binary_crossentropy
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | embedding_regularizer: 1.e-8
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | hidden_units: [64, 32]
28 | hidden_activations: relu
29 | bilinear_type: field_interaction
30 | reduction_ratio: 3
31 | net_dropout: 0
32 | batch_norm: False
33 | epochs: 1
34 | shuffle: True
35 | seed: 2019
36 | monitor: 'AUC'
37 | monitor_mode: 'max'
38 |
39 | FiBiNET_default: # This is a config template
40 | model: FiBiNET
41 | dataset_id: TBD
42 | loss: binary_crossentropy
43 | metrics: ['logloss', 'AUC']
44 | task: binary_classification
45 | optimizer: adam
46 | learning_rate: 1.0e-3
47 | embedding_regularizer: 0
48 | net_regularizer: 0
49 | batch_size: 10000
50 | embedding_dim: 40
51 | hidden_units: [500, 500, 500]
52 | hidden_activations: relu
53 | bilinear_type: field_interaction
54 | reduction_ratio: 3
55 | net_dropout: 0
56 | batch_norm: False
57 | epochs: 100
58 | shuffle: True
59 | seed: 2019
60 | monitor: {'AUC': 1, 'logloss': -1}
61 | monitor_mode: 'max'
62 |
--------------------------------------------------------------------------------
/model_zoo/FiBiNET/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/FiBiNET/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .FiBiNET import *
2 |
--------------------------------------------------------------------------------
/model_zoo/FiGNN/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/FiGNN/README.md
--------------------------------------------------------------------------------
/model_zoo/FiGNN/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/FiGNN/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | FiGNN_test:
16 | model: FiGNN
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.e-3
23 | embedding_regularizer: 1.e-8
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | gnn_layers: 2
28 | use_residual: True
29 | use_gru: True
30 | reuse_graph_layer: False
31 | epochs: 1
32 | shuffle: True
33 | seed: 2019
34 | monitor: 'AUC'
35 | monitor_mode: 'max'
36 |
37 | FiGNN_default: # This is a config template
38 | model: FiGNN
39 | dataset_id: TBD
40 | loss: 'binary_crossentropy'
41 | metrics: ['logloss', 'AUC']
42 | task: binary_classification
43 | optimizer: adam
44 | learning_rate: 1.e-3
45 | embedding_regularizer: 0
46 | net_regularizer: 0
47 | batch_size: 10000
48 | embedding_dim: 40
49 | gnn_layers: 3
50 | use_residual: True
51 | use_gru: True
52 | reuse_graph_layer: False
53 | epochs: 100
54 | shuffle: True
55 | seed: 2019
56 | monitor: {'AUC': 1, 'logloss': -1}
57 | monitor_mode: 'max'
58 |
--------------------------------------------------------------------------------
/model_zoo/FiGNN/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/FiGNN/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .FiGNN import *
2 |
--------------------------------------------------------------------------------
/model_zoo/FinalMLP/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/FinalMLP/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/FinalMLP/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .DualMLP import *
2 | from .FinalMLP import *
--------------------------------------------------------------------------------
/model_zoo/FinalNet/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/FinalNet/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/FinalNet/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .FinalNet import *
--------------------------------------------------------------------------------
/model_zoo/FmFM/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/FmFM/README.md
--------------------------------------------------------------------------------
/model_zoo/FmFM/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/FmFM/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | FmFM_test:
16 | model: FmFM
17 | dataset_id: tiny_npz
18 | loss: binary_crossentropy
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | regularizer: 0
24 | field_interaction_type: matrixed
25 | batch_size: 128
26 | embedding_dim: 4
27 | epochs: 1
28 | shuffle: True
29 | seed: 2019
30 | monitor: 'AUC'
31 | monitor_mode: 'max'
32 |
33 | FmFM_default: # This is a config template
34 | model: FmFM
35 | dataset_id: TBD
36 | loss: binary_crossentropy
37 | metrics: ['logloss', 'AUC']
38 | task: binary_classification
39 | optimizer: adam
40 | learning_rate: 1.0e-3
41 | regularizer: 0
42 | field_interaction_type: matrixed
43 | batch_size: 10000
44 | embedding_dim: 10
45 | epochs: 100
46 | shuffle: True
47 | seed: 2019
48 | monitor: {'AUC': 1, 'logloss': -1}
49 | monitor_mode: 'max'
50 |
--------------------------------------------------------------------------------
/model_zoo/FmFM/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/FmFM/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .FmFM import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/FwFM/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/FwFM/README.md
--------------------------------------------------------------------------------
/model_zoo/FwFM/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/FwFM/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | FwFM_test:
16 | model: FwFM
17 | dataset_id: tiny_npz
18 | loss: binary_crossentropy
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | regularizer: 1.e-8
24 | batch_size: 128
25 | embedding_dim: 4
26 | epochs: 1
27 | shuffle: True
28 | seed: 2019
29 | monitor: 'AUC'
30 | monitor_mode: 'max'
31 |
32 | FwFM_default: # This is a config template
33 | model: FwFM
34 | dataset_id: TBD
35 | loss: binary_crossentropy
36 | metrics: ['logloss', 'AUC']
37 | task: binary_classification
38 | optimizer: adam
39 | learning_rate: 1.0e-3
40 | regularizer: 0
41 | linear_type: FiLV
42 | batch_size: 10000
43 | embedding_dim: 40
44 | epochs: 100
45 | shuffle: True
46 | seed: 2019
47 | monitor: {'AUC': 1, 'logloss': -1}
48 | monitor_mode: 'max'
49 |
--------------------------------------------------------------------------------
/model_zoo/FwFM/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/FwFM/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .FwFM import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/GDCN/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
9 |
--------------------------------------------------------------------------------
/model_zoo/GDCN/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/GDCN/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .GDCN import GDCNP, GDCN
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/HFM/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/HFM/README.md
--------------------------------------------------------------------------------
/model_zoo/HFM/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/HFM/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | HFM_test:
16 | model: HFM
17 | dataset_id: tiny_npz
18 | loss: binary_crossentropy
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | interaction_type: circular_convolution
24 | use_dnn: False
25 | hidden_units: [64, 32]
26 | hidden_activations: relu
27 | embedding_regularizer: 1.e-8
28 | net_regularizer: 0
29 | net_dropout: 0
30 | batch_norm: False
31 | batch_size: 128
32 | embedding_dim: 4
33 | epochs: 1
34 | shuffle: True
35 | seed: 2019
36 | monitor: 'AUC'
37 | monitor_mode: 'max'
38 |
39 | HFM_default: # This is a config template
40 | model: HFM
41 | dataset_id: TBD
42 | loss: binary_crossentropy
43 | metrics: ['logloss', 'AUC']
44 | task: binary_classification
45 | optimizer: adam
46 | learning_rate: 1.0e-3
47 | interaction_type: circular_convolution
48 | use_dnn: False
49 | hidden_units: [64, 64, 64]
50 | hidden_activations: relu
51 | embedding_regularizer: 0
52 | net_regularizer: 0
53 | net_dropout: 0
54 | batch_norm: False
55 | batch_size: 10000
56 | embedding_dim: 40
57 | epochs: 100
58 | shuffle: True
59 | seed: 2019
60 | monitor: {'AUC': 1, 'logloss': -1}
61 | monitor_mode: 'max'
62 |
--------------------------------------------------------------------------------
/model_zoo/HFM/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/HFM/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .HFM import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/HOFM/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/HOFM/README.md
--------------------------------------------------------------------------------
/model_zoo/HOFM/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/HOFM/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | HOFM_test:
16 | model: HOFM
17 | dataset_id: tiny_npz
18 | loss: binary_crossentropy
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | regularizer: 1.e-8
24 | order: 3
25 | batch_size: 128
26 | embedding_dim: 4
27 | reuse_embedding: False
28 | epochs: 1
29 | shuffle: True
30 | seed: 2019
31 | monitor: 'AUC'
32 | monitor_mode: 'max'
33 |
34 | HOFM_default: # This is a config template
35 | model: HOFM
36 | dataset_id: TBD
37 | loss: binary_crossentropy
38 | metrics: ['logloss', 'AUC']
39 | task: binary_classification
40 | optimizer: adam
41 | learning_rate: 1.0e-3
42 | regularizer: 0
43 | order: 4
44 | batch_size: 10000
45 | embedding_dim: 10
46 | reuse_embedding: False
47 | epochs: 100
48 | shuffle: True
49 | seed: 2019
50 | monitor: {'AUC': 1, 'logloss': -1}
51 | monitor_mode: 'max'
52 |
--------------------------------------------------------------------------------
/model_zoo/HOFM/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/HOFM/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .HOFM import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/InterHAt/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/InterHAt/README.md
--------------------------------------------------------------------------------
/model_zoo/InterHAt/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/InterHAt/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | InterHAt_test:
16 | model: InterHAt
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | embedding_regularizer: 0
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | hidden_dim: null
28 | order: 3
29 | num_heads: 1
30 | attention_dim: 8
31 | hidden_units: [64, 32]
32 | hidden_activations: relu
33 | net_dropout: 0
34 | batch_norm: False
35 | layer_norm: True
36 | use_residual: True
37 | epochs: 1
38 | shuffle: True
39 | seed: 2019
40 | monitor: 'AUC'
41 | monitor_mode: 'max'
42 |
43 | InterHAt_default: # This is a config template
44 | model: InterHAt
45 | dataset_id: TBD
46 | loss: 'binary_crossentropy'
47 | metrics: ['logloss', 'AUC']
48 | task: binary_classification
49 | optimizer: adam
50 | learning_rate: 1.0e-3
51 | embedding_regularizer: 0
52 | net_regularizer: 0
53 | batch_size: 10000
54 | embedding_dim: 40
55 | hidden_dim: null
56 | order: 3
57 | num_heads: 1
58 | attention_dim: 40
59 | hidden_units: [64]
60 | hidden_activations: relu
61 | net_dropout: 0
62 | batch_norm: False
63 | layer_norm: True
64 | use_residual: True
65 | epochs: 100
66 | shuffle: True
67 | seed: 2019
68 | monitor: {'AUC': 1, 'logloss': -1}
69 | monitor_mode: 'max'
70 |
--------------------------------------------------------------------------------
/model_zoo/InterHAt/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/InterHAt/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .InterHAt import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/LR/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/LR/README.md
--------------------------------------------------------------------------------
/model_zoo/LR/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/LR/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | LR_test:
16 | model: LR
17 | dataset_id: tiny_npz
18 | loss: binary_crossentropy
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | regularizer: 1.e-8
24 | batch_size: 128
25 | epochs: 1
26 | shuffle: True
27 | seed: 2019
28 | monitor: 'AUC'
29 | monitor_mode: 'max'
30 |
31 | LR_default: # This is a config template
32 | model: LR
33 | dataset_id: TBD
34 | loss: binary_crossentropy
35 | metrics: ['logloss', 'AUC']
36 | task: binary_classification
37 | optimizer: adam
38 | learning_rate: 1.0e-3
39 | regularizer: 0
40 | batch_size: 10000
41 | epochs: 100
42 | shuffle: True
43 | seed: 2019
44 | monitor: {'AUC': 1, 'logloss': -1}
45 | monitor_mode: 'max'
46 |
--------------------------------------------------------------------------------
/model_zoo/LR/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/LR/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .LR import LR
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/DCNv2/__init__.py:
--------------------------------------------------------------------------------
1 | from .DCNv2 import DCNv2
2 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/DIEN/__init__.py:
--------------------------------------------------------------------------------
1 | from .DIEN import DIEN
2 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/DIN/__init__.py:
--------------------------------------------------------------------------------
1 | from .DIN import DIN
2 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/ETA/__init__.py:
--------------------------------------------------------------------------------
1 | from .ETA import ETA
2 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/FinalMLP/__init__.py:
--------------------------------------------------------------------------------
1 | from .FinalMLP import FinalMLP
2 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/MIRRN/__init__.py:
--------------------------------------------------------------------------------
1 | from .MIRRN import MIRRN
2 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/SDIM/__init__.py:
--------------------------------------------------------------------------------
1 | from .SDIM import SDIM
2 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/SIM/__init__.py:
--------------------------------------------------------------------------------
1 | from .SIM import SIM
2 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/TWIN/__init__.py:
--------------------------------------------------------------------------------
1 | from .TWIN import TWIN
2 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/TransAct/__init__.py:
--------------------------------------------------------------------------------
1 | from .TransAct import TransAct
2 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/__init__.py:
--------------------------------------------------------------------------------
1 | from .DIN import DIN
2 | from .DCNv2 import DCNv2
3 | from .DIEN import DIEN
4 | from .FinalMLP import FinalMLP
5 | from .ETA import ETA
6 | from .MIRRN import MIRRN
7 | from .TransAct import TransAct
8 | from .SIM import SIM
9 | from .SDIM import SDIM
10 | from .TWIN import TWIN
11 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/config/dcnv2_config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 4
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | DCNv2_default: # This is a config template
16 | model: DCNv2
17 | dataset_id: TBD
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | model_structure: parallel
23 | use_low_rank_mixture: False
24 | low_rank: 32
25 | num_experts: 4
26 | learning_rate: 1.0e-3
27 | embedding_regularizer: 0
28 | net_regularizer: 0
29 | batch_size: 10000
30 | embedding_dim: 40
31 | stacked_dnn_hidden_units: [500, 500, 500]
32 | parallel_dnn_hidden_units: [500, 500, 500]
33 | dnn_activations: relu
34 | num_cross_layers: 3
35 | net_dropout: 0
36 | batch_norm: False
37 | epochs: 100
38 | shuffle: True
39 | seed: 2019
40 | monitor: {'AUC': 1, 'logloss': -1}
41 | monitor_mode: 'max'
42 | max_len: 50
43 | accumulation_steps: 1
44 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/config/dien_config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | DIEN_default: # This is a config template
16 | model: DIEN
17 | dataset_id: TBD
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | embedding_regularizer: 0
24 | net_regularizer: 0
25 | batch_size: 10000
26 | embedding_dim: 16
27 | dnn_hidden_units: [1024, 512, 256]
28 | dnn_activations: Dice
29 | net_dropout: 0
30 | gru_type: AUGRU
31 | enable_sum_pooling: False
32 | attention_type: bilinear_attention
33 | attention_hidden_units: [80, 40]
34 | attention_activation: "ReLU"
35 | attention_dropout: 0
36 | use_attention_softmax: True
37 | aux_hidden_units: [100, 50]
38 | aux_activation: "ReLU"
39 | aux_loss_alpha: 0
40 | batch_norm: True
41 | epochs: 100
42 | shuffle: True
43 | seed: 20222023
44 | monitor: {'AUC': 1, 'logloss': -1}
45 | monitor_mode: 'max'
46 | max_len: 50
47 | accumulation_steps: 1
48 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/config/din_config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 4
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | DIN_default: # This is a config template
16 | model: DIN
17 | dataset_id: TBD
18 | loss: 'binary_crossentropy'
19 | metrics: [AUC, logloss]
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | embedding_regularizer: 0
24 | net_regularizer: 0
25 | batch_size: 8192
26 | embedding_dim: 64
27 | dnn_hidden_units: [500, 500, 500]
28 | dnn_activations: relu
29 | attention_hidden_units: [64]
30 | attention_hidden_activations: "Dice"
31 | attention_output_activation: null
32 | attention_dropout: 0
33 | din_use_softmax: False
34 | net_dropout: 0
35 | batch_norm: False
36 | epochs: 100
37 | shuffle: True
38 | seed: 2019
39 | monitor: {'AUC': 1, 'logloss': -1}
40 | monitor_mode: 'max'
41 | max_len: 50
42 | accumulation_steps: 1
43 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/config/eta_config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | ETA_default: # This is a config template
16 | model: ETA
17 | dataset_id: TBD
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | embedding_regularizer: 0
24 | net_regularizer: 0
25 | batch_size: 8192
26 | embedding_dim: 4
27 | dnn_hidden_units: [64, 32]
28 | dnn_activations: relu
29 | attention_dim: 64
30 | num_heads: 2
31 | use_scale: True
32 | attention_dropout: 0
33 | reuse_hash: True
34 | hash_bits: 32
35 | topk: 50
36 | short_seq_len: 50
37 | net_dropout: 0
38 | batch_norm: False
39 | epochs: 100
40 | shuffle: True
41 | seed: 20222023
42 | monitor: 'AUC'
43 | monitor_mode: 'max'
44 | max_len: 50
45 | accumulation_steps: 1
46 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/config/finalmlp_config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | FinalMLP_default: # This is a config template
16 | model: FinalMLP
17 | dataset_id: TBD
18 | loss: binary_crossentropy
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.e-3
23 | embedding_regularizer: 0
24 | net_regularizer: 0
25 | mlp1_hidden_units: [1024, 512]
26 | mlp1_hidden_activations: relu
27 | mlp1_dropout: 0
28 | mlp1_batch_norm: False
29 | mlp2_hidden_units: [1024, 512, 256]
30 | mlp2_hidden_activations: relu
31 | mlp2_dropout: 0
32 | mlp2_batch_norm: False
33 | use_fs: True
34 | fs_hidden_units: [1024, 512]
35 | fs1_context: []
36 | fs2_context: []
37 | num_heads: 2
38 | batch_size: 10000
39 | embedding_dim: 16
40 | epochs: 100
41 | shuffle: True
42 | seed: 20222023
43 | monitor: {'AUC': 1, 'logloss': -1}
44 | monitor_mode: 'max'
45 | max_len: 50
46 | accumulation_steps: 1
47 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/config/mirrn_config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 4
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | MIRRN_default: # This is a config template
16 | model: MIRRN
17 | dataset_id: TBD
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | embedding_regularizer: 0
24 | net_regularizer: 0
25 | batch_size: 256
26 | embedding_dim: 16
27 | # dnn
28 | batch_norm: False
29 | dnn_hidden_units: [200, 80]
30 | dnn_activations: relu
31 | net_dropout: 0
32 | # target attention
33 | attention_dim: 32
34 | num_heads: 4
35 | use_scale: True
36 | attention_dropout: 0.1
37 | short_seq_len: 50
38 | # eta
39 | reuse_hash: True
40 | hash_bits: 32
41 | topk: 4
42 | # training
43 | epochs: 1
44 | shuffle: True
45 | seed: 2024
46 | monitor: 'AUC'
47 | monitor_mode: 'max'
48 | max_len: 50
49 | accumulation_steps: 1
50 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/config/sdim_config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | SDIM_default: # This is a config template
16 | model: SDIM
17 | dataset_id: TBD
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | embedding_regularizer: 0
24 | net_regularizer: 0
25 | batch_size: 10000
26 | embedding_dim: 32
27 | dnn_hidden_units: [64, 32]
28 | dnn_activations: relu
29 | attention_dim: 64
30 | use_qkvo: True
31 | num_heads: 2
32 | use_scale: True
33 | attention_dropout: 0
34 | reuse_hash: True
35 | num_hashes: 2
36 | hash_bits: 4
37 | net_dropout: 0
38 | batch_norm: False
39 | l2_norm: False
40 | epochs: 100
41 | shuffle: True
42 | seed: 20222023
43 | monitor: 'AUC'
44 | monitor_mode: 'max'
45 | short_seq_len: 50
46 | max_len: 50
47 | accumulation_steps: 1
48 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/config/sim_config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | SIM_default: # This is a config template
16 | model: SIM
17 | dataset_id: TBD
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | embedding_regularizer: 0
24 | net_regularizer: 0
25 | batch_size: 8192
26 | embedding_dim: 4
27 | dnn_hidden_units: [64, 32]
28 | dnn_activations: relu
29 | attention_dim: 64
30 | num_heads: 2
31 | gsu_type: "soft"
32 | alpha: 1
33 | beta: 1
34 | attention_dropout: 0
35 | topk: 50
36 | short_seq_len: 50
37 | net_dropout: 0
38 | batch_norm: False
39 | epochs: 100
40 | shuffle: True
41 | seed: 20222023
42 | monitor: 'AUC'
43 | monitor_mode: 'max'
44 | max_len: 50
45 | accumulation_steps: 1
46 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/config/transact_config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | TransAct_default: # This is a config template
16 | model: TransAct
17 | dataset_id: TBD
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | embedding_regularizer: 0
24 | net_regularizer: 0
25 | batch_size: 10000
26 | embedding_dim: 64
27 | hidden_activations: relu
28 | dcn_cross_layers: 3
29 | dcn_hidden_units: [1024, 512, 256]
30 | mlp_hidden_units: []
31 | num_heads: 1
32 | transformer_layers: 1
33 | transformer_dropout: 0
34 | dim_feedforward: 512
35 | net_dropout: 0
36 | first_k_cols: 1
37 | use_time_window_mask: False
38 | time_window_ms: 86400000
39 | concat_max_pool: True
40 | batch_norm: False
41 | epochs: 100
42 | shuffle: True
43 | seed: 20242025
44 | monitor: {'AUC': 1, 'logloss': -1}
45 | monitor_mode: 'max'
46 | max_len: 50
47 | accumulation_steps: 1
48 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/config/twin_config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | TWIN_default: # This is a config template
16 | model: TWIN
17 | dataset_id: TBD
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | embedding_regularizer: 0
24 | net_regularizer: 0
25 | batch_size: 8192
26 | embedding_dim: 4
27 | dnn_hidden_units: [64, 32]
28 | dnn_activations: relu
29 | attention_dim: 64
30 | num_heads: 2
31 | attention_dropout: 0
32 | topk: 50
33 | Kc_cross_features: 0
34 | short_seq_len: 50
35 | net_dropout: 0
36 | batch_norm: False
37 | epochs: 100
38 | shuffle: True
39 | seed: 20222023
40 | monitor: 'AUC'
41 | monitor_mode: 'max'
42 | max_len: 50
43 | accumulation_steps: 1
44 |
--------------------------------------------------------------------------------
/model_zoo/LongCTR/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | import fuxictr
2 | assert fuxictr.__version__ == "2.3.2"
3 |
--------------------------------------------------------------------------------
/model_zoo/LorentzFM/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/LorentzFM/README.md
--------------------------------------------------------------------------------
/model_zoo/LorentzFM/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/LorentzFM/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | LorentzFM_test:
16 | model: LorentzFM
17 | dataset_id: tiny_npz
18 | loss: binary_crossentropy
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | regularizer: 1.e-8
24 | batch_size: 128
25 | embedding_dim: 4
26 | epochs: 1
27 | shuffle: True
28 | seed: 2019
29 | monitor: 'AUC'
30 | monitor_mode: 'max'
31 |
32 | LorentzFM_default: # This is a config template
33 | model: LorentzFM
34 | dataset_id: TBD
35 | loss: binary_crossentropy
36 | metrics: ['logloss', 'AUC']
37 | task: binary_classification
38 | optimizer: adam
39 | learning_rate: 1.0e-3
40 | regularizer: 0
41 | batch_size: 10000
42 | embedding_dim: 40
43 | epochs: 100
44 | shuffle: True
45 | seed: 2019
46 | monitor: {'AUC': 1, 'logloss': -1}
47 | monitor_mode: 'max'
48 |
--------------------------------------------------------------------------------
/model_zoo/LorentzFM/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/LorentzFM/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .LorentzFM import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/MaskNet/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/MaskNet/README.md
--------------------------------------------------------------------------------
/model_zoo/MaskNet/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/MaskNet/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | MaskNet_test:
16 | model: MaskNet
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.e-3
23 | embedding_regularizer: 0
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | dnn_hidden_units: [64, 32]
28 | dnn_hidden_activations: relu
29 | model_type: SerialMaskNet
30 | parallel_num_blocks: 1
31 | parallel_block_dim: 64
32 | reduction_ratio: 1
33 | emb_layernorm: True
34 | net_layernorm: True
35 | net_dropout: 0
36 | epochs: 1
37 | shuffle: True
38 | seed: 2021
39 | monitor: 'AUC'
40 | monitor_mode: 'max'
41 |
42 | MaskNet_default: # This is a config template
43 | model: MaskNet
44 | dataset_id: TBD
45 | loss: 'binary_crossentropy'
46 | metrics: ['logloss', 'AUC']
47 | task: binary_classification
48 | optimizer: adam
49 | learning_rate: 1.e-3
50 | embedding_regularizer: 0
51 | net_regularizer: 0
52 | batch_size: 4096
53 | embedding_dim: 40
54 | dnn_hidden_units: [400, 400, 400]
55 | dnn_hidden_activations: relu
56 | model_type: SerialMaskNet
57 | parallel_num_blocks: 1
58 | parallel_block_dim: 64
59 | reduction_ratio: 1
60 | emb_layernorm: True
61 | net_layernorm: True
62 | net_dropout: 0
63 | epochs: 100
64 | shuffle: True
65 | seed: 2021
66 | monitor: 'AUC'
67 | monitor_mode: 'max'
68 |
--------------------------------------------------------------------------------
/model_zoo/MaskNet/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/MaskNet/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .MaskNet import *
2 |
3 |
--------------------------------------------------------------------------------
/model_zoo/NFM/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/NFM/README.md
--------------------------------------------------------------------------------
/model_zoo/NFM/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/NFM/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | NFM_test:
16 | model: NFM
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.e-3
23 | embedding_regularizer: 1.e-8
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | hidden_units: [64, 32]
28 | hidden_activations: relu
29 | net_dropout: 0
30 | batch_norm: False
31 | epochs: 1
32 | shuffle: True
33 | seed: 2019
34 | monitor: 'AUC'
35 | monitor_mode: 'max'
36 |
37 | NFM_default: # This is a config template
38 | model: NFM
39 | dataset_id: TBD
40 | loss: 'binary_crossentropy'
41 | metrics: ['logloss', 'AUC']
42 | task: binary_classification
43 | optimizer: adam
44 | learning_rate: 1.e-3
45 | embedding_regularizer: 0
46 | net_regularizer: 0
47 | batch_size: 10000
48 | embedding_dim: 40
49 | hidden_units: [500, 500, 500]
50 | hidden_activations: relu
51 | net_dropout: 0
52 | batch_norm: False
53 | epochs: 100
54 | shuffle: True
55 | seed: 2019
56 | monitor: {'AUC': 1, 'logloss': -1}
57 | monitor_mode: 'max'
58 |
--------------------------------------------------------------------------------
/model_zoo/NFM/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/NFM/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .NFM import *
2 |
3 |
--------------------------------------------------------------------------------
/model_zoo/ONN/ONN_tf/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/ONN/ONN_tf/README.md
--------------------------------------------------------------------------------
/model_zoo/ONN/ONN_tf/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_tfrecord:
3 | data_root: ../../../data/
4 | data_format: tfrecord
5 | train_data: ../../../data/tiny_tfrecord/train.tfrecord
6 | valid_data: ../../../data/tiny_tfrecord/valid.tfrecord
7 | test_data: ../../../data/tiny_tfrecord/test.tfrecord
8 |
9 |
--------------------------------------------------------------------------------
/model_zoo/ONN/ONN_tf/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | ONN_test:
16 | model: ONN
17 | dataset_id: tiny_tfrecord
18 | loss: binary_crossentropy
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.e-3
23 | embedding_regularizer: 1.e-8
24 | net_regularizer: 0
25 | hidden_units: [64, 32]
26 | hidden_activations: relu
27 | net_dropout: 0
28 | batch_norm: False
29 | batch_size: 128
30 | embedding_dim: 4
31 | epochs: 1
32 | shuffle: True
33 | seed: 2019
34 | monitor: 'AUC'
35 | monitor_mode: 'max'
36 |
37 | ONN_default: # This is a config template
38 | model: ONN
39 | dataset_id: TBD
40 | loss: binary_crossentropy
41 | metrics: ['logloss', 'AUC']
42 | task: binary_classification
43 | optimizer: adam
44 | learning_rate: 1.e-3
45 | embedding_regularizer: 0
46 | net_regularizer: 0
47 | hidden_units: [64, 64, 64]
48 | hidden_activations: relu
49 | net_dropout: 0
50 | batch_norm: False
51 | batch_size: 10000
52 | embedding_dim: 2
53 | epochs: 100
54 | shuffle: True
55 | seed: 2019
56 | monitor: {'AUC': 1, 'logloss': -1}
57 | monitor_mode: 'max'
58 |
59 |
--------------------------------------------------------------------------------
/model_zoo/ONN/ONN_tf/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.0.0"
4 |
--------------------------------------------------------------------------------
/model_zoo/ONN/ONN_tf/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .ONN import ONN
2 |
--------------------------------------------------------------------------------
/model_zoo/ONN/ONN_torch/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/ONN/ONN_torch/README.md
--------------------------------------------------------------------------------
/model_zoo/ONN/ONN_torch/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../../data/
4 | data_format: npz
5 | train_data: ../../../data/tiny_npz/train.npz
6 | valid_data: ../../../data/tiny_npz/valid.npz
7 | test_data: ../../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/ONN/ONN_torch/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/ONN/ONN_torch/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .ONN import *
2 | from .ONNv2 import *
3 |
--------------------------------------------------------------------------------
/model_zoo/PEPNet/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/PEPNet/README.md
--------------------------------------------------------------------------------
/model_zoo/PEPNet/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/PEPNet/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 |
14 | PPNet_test:
15 | model: PPNet
16 | dataset_id: tiny_npz
17 | loss: 'binary_crossentropy'
18 | metrics: ['logloss', 'AUC']
19 | task: binary_classification
20 | optimizer: adam
21 | learning_rate: 1.e-3
22 | embedding_regularizer: 0
23 | net_regularizer: 0
24 | batch_size: 128
25 | embedding_dim: 4
26 | gate_emb_dim: 4
27 | gate_priors: ["userid", "adgroup_id", "pid"]
28 | gate_hidden_dim: 64
29 | hidden_units: [64, 64, 64]
30 | hidden_activations: ReLU
31 | net_dropout: 0
32 | batch_norm: False
33 | epochs: 1
34 | shuffle: True
35 | seed: 20222023
36 | monitor: 'AUC'
37 | monitor_mode: 'max'
38 |
39 | PPNet_default: # This is a config template
40 | model: PPNet
41 | dataset_id: TBD
42 | loss: 'binary_crossentropy'
43 | metrics: ['logloss', 'AUC']
44 | task: binary_classification
45 | optimizer: adam
46 | learning_rate: 1.e-3
47 | embedding_regularizer: 0
48 | net_regularizer: 0
49 | batch_size: 10000
50 | embedding_dim: 16
51 | gate_emb_dim: 16
52 | gate_priors: ["userid", "adgroup_id", "pid"]
53 | gate_hidden_dim: 64
54 | hidden_units: [64, 64, 64]
55 | hidden_activations: ReLU
56 | net_dropout: 0
57 | batch_norm: False
58 | epochs: 100
59 | shuffle: True
60 | seed: 20222023
61 | monitor: 'AUC'
62 | monitor_mode: 'max'
63 |
64 |
--------------------------------------------------------------------------------
/model_zoo/PEPNet/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/PEPNet/src/PEPNet.py:
--------------------------------------------------------------------------------
1 | # Todo
--------------------------------------------------------------------------------
/model_zoo/PEPNet/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .PPNet import *
2 | from .PEPNet import *
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/PNN/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/PNN/README.md
--------------------------------------------------------------------------------
/model_zoo/PNN/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/PNN/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | PNN_test:
16 | model: PNN
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.e-3
23 | embedding_regularizer: 1.e-8
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | hidden_units: [64, 32]
28 | hidden_activations: relu
29 | net_dropout: 0
30 | batch_norm: False
31 | epochs: 1
32 | shuffle: True
33 | seed: 2019
34 | monitor: 'AUC'
35 | monitor_mode: 'max'
36 |
37 | PNN_default: # This is a config template
38 | model: PNN
39 | dataset_id: TBD
40 | loss: 'binary_crossentropy'
41 | metrics: ['logloss', 'AUC']
42 | task: binary_classification
43 | optimizer: adam
44 | hidden_units: [300, 300, 300]
45 | hidden_activations: relu
46 | embedding_regularizer: 0
47 | net_regularizer: 0
48 | learning_rate: 1.e-3
49 | net_dropout: 0
50 | batch_norm: False
51 | batch_size: 10000
52 | embedding_dim: 40
53 | epochs: 100
54 | shuffle: True
55 | seed: 2019
56 | monitor: {'AUC': 1, 'logloss': -1}
57 | monitor_mode: 'max'
--------------------------------------------------------------------------------
/model_zoo/PNN/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/PNN/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .PNN import *
2 |
3 |
--------------------------------------------------------------------------------
/model_zoo/SAM/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/SAM/README.md
--------------------------------------------------------------------------------
/model_zoo/SAM/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/SAM/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | SAM_test:
16 | model: SAM
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.e-3
23 | embedding_regularizer: 0
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | interaction_type: "SAM2E"
28 | aggregation: "concat"
29 | num_interaction_layers: 2
30 | use_residual: False
31 | net_dropout: 0
32 | epochs: 1
33 | shuffle: True
34 | seed: 2022
35 | monitor: 'AUC'
36 | monitor_mode: 'max'
37 |
38 | SAM_default: # This is a config template
39 | model: SAM
40 | dataset_id: TBD
41 | loss: 'binary_crossentropy'
42 | metrics: ['logloss', 'AUC']
43 | task: binary_classification
44 | optimizer: adam
45 | learning_rate: 1.e-3
46 | embedding_regularizer: 0
47 | net_regularizer: 0
48 | batch_size: 4096
49 | embedding_dim: 40
50 | interaction_type: "SAM2E"
51 | aggregation: "concat"
52 | num_interaction_layers: 3
53 | use_residual: False
54 | net_dropout: 0
55 | epochs: 100
56 | shuffle: True
57 | seed: 2022
58 | monitor: 'AUC'
59 | monitor_mode: 'max'
--------------------------------------------------------------------------------
/model_zoo/SAM/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/SAM/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .SAM import *
2 |
3 |
--------------------------------------------------------------------------------
/model_zoo/TransAct/README.md:
--------------------------------------------------------------------------------
1 | # TransAct
2 |
3 | > Xue Xia, Pong Eksombatchai, Nikil Pancha, Dhruvil Deven Badani, Po-Wei Wang, Neng Gu, Saurabh Vishwas Joshi, Nazanin Farahpour, Zhiyuan Zhang, Andrew Zhai. [TransAct: Transformer-based Realtime User Action Model for Recommendation at Pinterest](https://arxiv.org/abs/2306.00248), in KDD 2023.
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/TransAct/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_seq:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_seq/train.npz
6 | valid_data: ../../data/tiny_seq/valid.npz
7 | test_data: ../../data/tiny_seq/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/TransAct/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/TransAct/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .TransAct import *
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/model_zoo/WideDeep/WideDeep_tf/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/WideDeep/WideDeep_tf/README.md
--------------------------------------------------------------------------------
/model_zoo/WideDeep/WideDeep_tf/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_tfrecord:
3 | data_root: ../../../data/
4 | data_format: tfrecord
5 | train_data: ../../../data/tiny_tfrecord/train.tfrecord
6 | valid_data: ../../../data/tiny_tfrecord/valid.tfrecord
7 | test_data: ../../../data/tiny_tfrecord/test.tfrecord
8 |
9 |
--------------------------------------------------------------------------------
/model_zoo/WideDeep/WideDeep_tf/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | WideDeep_test:
16 | model: WideDeep
17 | dataset_id: tiny_tfrecord
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | wide_learning_rate: 1.e-4
22 | deep_learning_rate: 1.e-3
23 | deep_optimizer: adam
24 | hidden_units: [64, 32]
25 | hidden_activations: relu
26 | net_regularizer: 0
27 | embedding_regularizer: 0
28 | batch_norm: False
29 | net_dropout: 0
30 | batch_size: 8
31 | embedding_dim: 4
32 | epochs: 1
33 | shuffle: True
34 | seed: 2019
35 | monitor: 'AUC'
36 | monitor_mode: 'max'
37 |
38 | WideDeep_default: # This is a config template
39 | model: WideDeep
40 | dataset_id: TBD
41 | loss: 'binary_crossentropy'
42 | metrics: ['logloss', 'AUC']
43 | task: binary_classification
44 | deep_optimizer: adam
45 | wide_learning_rate: 1.e-4
46 | deep_learning_rate: 1.e-3
47 | hidden_units: [300, 300, 300]
48 | hidden_activations: relu
49 | net_regularizer: 0
50 | embedding_regularizer: 0
51 | batch_norm: False
52 | net_dropout: 0
53 | batch_size: 10000
54 | embedding_dim: 40
55 | epochs: 100
56 | shuffle: True
57 | seed: 2019
58 | monitor: {'AUC': 1, 'logloss': -1}
59 | monitor_mode: 'max'
60 |
61 |
62 |
--------------------------------------------------------------------------------
/model_zoo/WideDeep/WideDeep_tf/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.0.0"
4 |
--------------------------------------------------------------------------------
/model_zoo/WideDeep/WideDeep_tf/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .WideDeep import WideDeep
2 |
--------------------------------------------------------------------------------
/model_zoo/WideDeep/WideDeep_torch/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/WideDeep/WideDeep_torch/README.md
--------------------------------------------------------------------------------
/model_zoo/WideDeep/WideDeep_torch/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../../data/
4 | data_format: npz
5 | train_data: ../../../data/tiny_npz/train.npz
6 | valid_data: ../../../data/tiny_npz/valid.npz
7 | test_data: ../../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/WideDeep/WideDeep_torch/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | WideDeep_test:
16 | model: WideDeep
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.e-3
23 | hidden_units: [64, 32]
24 | hidden_activations: relu
25 | net_regularizer: 0
26 | embedding_regularizer: 0
27 | batch_norm: False
28 | net_dropout: 0
29 | batch_size: 8
30 | embedding_dim: 4
31 | epochs: 1
32 | shuffle: True
33 | seed: 2019
34 | monitor: 'AUC'
35 | monitor_mode: 'max'
36 |
37 | WideDeep_default: # This is a config template
38 | model: WideDeep
39 | dataset_id: TBD
40 | loss: 'binary_crossentropy'
41 | metrics: ['logloss', 'AUC']
42 | task: binary_classification
43 | optimizer: adam
44 | learning_rate: 1.e-3
45 | hidden_units: [300, 300, 300]
46 | hidden_activations: relu
47 | net_regularizer: 0
48 | embedding_regularizer: 0
49 | batch_norm: False
50 | net_dropout: 0
51 | batch_size: 10000
52 | embedding_dim: 40
53 | epochs: 100
54 | shuffle: True
55 | seed: 2019
56 | monitor: {'AUC': 1, 'logloss': -1}
57 | monitor_mode: 'max'
--------------------------------------------------------------------------------
/model_zoo/WideDeep/WideDeep_torch/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/WideDeep/WideDeep_torch/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .WideDeep import *
2 |
3 |
--------------------------------------------------------------------------------
/model_zoo/WuKong/README.md:
--------------------------------------------------------------------------------
1 | # WuKong
2 |
3 | > Buyun Zhang, Liang Luo, Yuxin Chen, Jade Nie, Xi Liu, Daifeng Guo, Yanli Zhao, Shen Li, Yuchen Hao, Yantao Yao, Guna Lakshminarayanan, Ellie Dingqiao Wen, Jongsoo Park, Maxim Naumov, Wenlin Chen. [Wukong: Towards a Scaling Law for Large-Scale Recommendation](https://arxiv.org/abs/2403.02545), in Arxiv 2024.
--------------------------------------------------------------------------------
/model_zoo/WuKong/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
--------------------------------------------------------------------------------
/model_zoo/WuKong/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | WuKong_default: # This is a config template
16 | model: WuKong
17 | dataset_id: TBD
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.0e-3
23 | embedding_regularizer: 0
24 | net_regularizer: 0
25 | batch_size: 10000
26 | embedding_dim: 64
27 | num_layers: 8
28 | compression_dim: 40
29 | fmb_units: [200,200]
30 | fmb_dim: 40
31 | project_dim: 8
32 | dropout_rate: 0.2
33 | hidden_activations: relu
34 | mlp_hidden_units: [32,32]
35 | epochs: 100
36 | shuffle: True
37 | seed: 2024
38 | monitor: {'AUC': 1, 'logloss': -1}
39 | monitor_mode: 'max'
40 |
41 | WuKong_test:
42 | model: WuKong
43 | dataset_id: tiny_npz
44 | loss: 'binary_crossentropy'
45 | metrics: ['logloss', 'AUC']
46 | task: binary_classification
47 | optimizer: adam
48 | learning_rate: 1.0e-3
49 | embedding_regularizer: 0
50 | net_regularizer: 0
51 | batch_size: 2048
52 | embedding_dim: 64
53 | num_layers: 4
54 | compression_dim: 32
55 | fmb_units: [128,128,128]
56 | fmb_dim: 32
57 | project_dim: 24
58 | dropout_rate: 0.2
59 | hidden_activations: relu
60 | mlp_hidden_units: [64]
61 | epochs: 1
62 | shuffle: True
63 | seed: 2024
64 | monitor: 'AUC'
65 | monitor_mode: 'max'
66 |
--------------------------------------------------------------------------------
/model_zoo/WuKong/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/WuKong/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .WuKong import *
--------------------------------------------------------------------------------
/model_zoo/__init__.py:
--------------------------------------------------------------------------------
1 | from .AFM.src import AFM
2 | from .AFN.src import AFN
3 | from .AOANet.src import AOANet
4 | from .AutoInt.src import AutoInt
5 | from .BST.src import BST
6 | from .CCPM.src import CCPM
7 | from .DCN.DCN_torch.src import DCN
8 | from .DCNv2.src import DCNv2
9 | from .DeepCrossing.src import DeepCrossing
10 | from .DeepFM.DeepFM_torch.src import DeepFM
11 | from .DeepIM.src import DeepIM
12 | from .DESTINE.src import DESTINE
13 | from .DIEN.src import DIEN
14 | from .DIN.src import DIN
15 | from .DLRM.src import DLRM
16 | from .DMIN.src import DMIN
17 | from .DMR.src import DMR
18 | from .DNN.DNN_torch.src import DNN
19 | from .DSSM.src import DSSM
20 | from .EDCN.src import EDCN
21 | from .FFM.src import FFM, FFMv2
22 | from .FGCNN.src import FGCNN
23 | from .FiBiNET.src import FiBiNET
24 | from .FiGNN.src import FiGNN
25 | from .FinalMLP.src import FinalMLP
26 | from .FinalNet.src import FinalNet
27 | from .FLEN.src import FLEN
28 | from .FM.src import FM
29 | from .FmFM.src import FmFM
30 | from .FwFM.src import FwFM
31 | from .HFM.src import HFM
32 | from .HOFM.src import HOFM
33 | from .InterHAt.src import InterHAt
34 | from .LorentzFM.src import LorentzFM
35 | from .LR.src import LR
36 | from .MaskNet.src import MaskNet
37 | from .NFM.src import NFM
38 | from .ONN.ONN_torch.src import ONN, ONNv2
39 | from .PNN.src import PNN
40 | from .SAM.src import SAM
41 | from .WideDeep.WideDeep_torch.src import WideDeep
42 | from .xDeepFM.src import xDeepFM
43 | from .PEPNet.src import PPNet
44 | from .TransAct.src import TransAct
45 | from .multitask import ShareBottom, MMoE, PLE
46 | from .EulerNet.src import EulerNet
47 | from .WuKong.src import WuKong
48 | from .GDCN.src import GDCN
49 |
--------------------------------------------------------------------------------
/model_zoo/multitask/MMoE/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | tiny_mtl:
2 | data_root: ../../../data/
3 | data_format: csv
4 | train_data: ../../../data/tiny_mtl/train.csv
5 | valid_data: ../../../data/tiny_mtl/test.csv
6 | test_data: ../../../data/tiny_mtl/test.csv
7 | min_categr_count: 1
8 | feature_cols:
9 | [ { name: [ categorical_1,categorical_2,categorical_3,categorical_4,categorical_5,categorical_6,
10 | categorical_7,categorical_8,categorical_9,categorical_10,categorical_11,categorical_12,
11 | categorical_13,categorical_14,categorical_15,categorical_16 ],
12 | active: True, dtype: str, type: categorical },
13 | { name: [ numerical_1,numerical_2,numerical_3,numerical_4,numerical_5,numerical_6,numerical_7,numerical_8,
14 | numerical_9,numerical_10,numerical_11,numerical_12,numerical_13,numerical_14,numerical_15,numerical_16,
15 | numerical_17,numerical_18,numerical_19,numerical_20,numerical_21,numerical_22,numerical_23,numerical_24,
16 | numerical_25,numerical_26,numerical_27,numerical_28,numerical_29,numerical_30,numerical_31,numerical_32,
17 | numerical_33,numerical_34,numerical_35,numerical_36,numerical_37,numerical_38,numerical_39,numerical_40,
18 | numerical_41,numerical_42,numerical_43,numerical_44,numerical_45,numerical_46,numerical_47,numerical_48,
19 | numerical_49,numerical_50,numerical_51,numerical_52,numerical_53,numerical_54,numerical_55,numerical_56,
20 | numerical_57,numerical_58,numerical_59,numerical_60,numerical_61,numerical_62,numerical_63 ],
21 | active: True, dtype: float, type: numeric } ]
22 | label_col: [ { name: click, dtype: float },
23 | { name: conversion, dtype: float } ]
--------------------------------------------------------------------------------
/model_zoo/multitask/MMoE/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/multitask/MMoE/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .MMoE import *
--------------------------------------------------------------------------------
/model_zoo/multitask/PLE/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | tiny_mtl:
2 | data_root: ../../../data/
3 | data_format: csv
4 | train_data: ../../../data/tiny_mtl/train.csv
5 | valid_data: ../../../data/tiny_mtl/test.csv
6 | test_data: ../../../data/tiny_mtl/test.csv
7 | min_categr_count: 1
8 | feature_cols:
9 | [ { name: [ categorical_1,categorical_2,categorical_3,categorical_4,categorical_5,categorical_6,
10 | categorical_7,categorical_8,categorical_9,categorical_10,categorical_11,categorical_12,
11 | categorical_13,categorical_14,categorical_15,categorical_16 ],
12 | active: True, dtype: str, type: categorical },
13 | { name: [ numerical_1,numerical_2,numerical_3,numerical_4,numerical_5,numerical_6,numerical_7,numerical_8,
14 | numerical_9,numerical_10,numerical_11,numerical_12,numerical_13,numerical_14,numerical_15,numerical_16,
15 | numerical_17,numerical_18,numerical_19,numerical_20,numerical_21,numerical_22,numerical_23,numerical_24,
16 | numerical_25,numerical_26,numerical_27,numerical_28,numerical_29,numerical_30,numerical_31,numerical_32,
17 | numerical_33,numerical_34,numerical_35,numerical_36,numerical_37,numerical_38,numerical_39,numerical_40,
18 | numerical_41,numerical_42,numerical_43,numerical_44,numerical_45,numerical_46,numerical_47,numerical_48,
19 | numerical_49,numerical_50,numerical_51,numerical_52,numerical_53,numerical_54,numerical_55,numerical_56,
20 | numerical_57,numerical_58,numerical_59,numerical_60,numerical_61,numerical_62,numerical_63 ],
21 | active: True, dtype: float, type: numeric } ]
22 | label_col: [ { name: click, dtype: float },
23 | { name: conversion, dtype: float } ]
--------------------------------------------------------------------------------
/model_zoo/multitask/PLE/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/multitask/PLE/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .PLE import *
--------------------------------------------------------------------------------
/model_zoo/multitask/ShareBottom/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | tiny_mtl:
2 | data_root: ../../../data/
3 | data_format: csv
4 | train_data: ../../../data/tiny_mtl/train.csv
5 | valid_data: ../../../data/tiny_mtl/test.csv
6 | test_data: ../../../data/tiny_mtl/test.csv
7 | min_categr_count: 1
8 | feature_cols:
9 | [ { name: [ categorical_1,categorical_2,categorical_3,categorical_4,categorical_5,categorical_6,
10 | categorical_7,categorical_8,categorical_9,categorical_10,categorical_11,categorical_12,
11 | categorical_13,categorical_14,categorical_15,categorical_16 ],
12 | active: True, dtype: str, type: categorical },
13 | { name: [ numerical_1,numerical_2,numerical_3,numerical_4,numerical_5,numerical_6,numerical_7,numerical_8,
14 | numerical_9,numerical_10,numerical_11,numerical_12,numerical_13,numerical_14,numerical_15,numerical_16,
15 | numerical_17,numerical_18,numerical_19,numerical_20,numerical_21,numerical_22,numerical_23,numerical_24,
16 | numerical_25,numerical_26,numerical_27,numerical_28,numerical_29,numerical_30,numerical_31,numerical_32,
17 | numerical_33,numerical_34,numerical_35,numerical_36,numerical_37,numerical_38,numerical_39,numerical_40,
18 | numerical_41,numerical_42,numerical_43,numerical_44,numerical_45,numerical_46,numerical_47,numerical_48,
19 | numerical_49,numerical_50,numerical_51,numerical_52,numerical_53,numerical_54,numerical_55,numerical_56,
20 | numerical_57,numerical_58,numerical_59,numerical_60,numerical_61,numerical_62,numerical_63 ],
21 | active: True, dtype: float, type: numeric } ]
22 | label_col: [ { name: click, dtype: float },
23 | { name: conversion, dtype: float } ]
--------------------------------------------------------------------------------
/model_zoo/multitask/ShareBottom/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | ### Base: This base setting will be inherited by all the expid configs.
2 | Base:
3 | model_root: './checkpoints/'
4 | num_workers: 3
5 | verbose: 1
6 | early_stop_patience: 2
7 | pickle_feature_encoder: True
8 | save_best_only: True
9 | eval_steps: null
10 | debug_mode: False
11 | group_id: null
12 | use_features: null
13 | feature_specs: null
14 | feature_config: null
15 |
16 | ### ModelName_default: This is a config template for hyper-tuning use
17 | ShareBottom_default:
18 | model: ShareBottom
19 | dataset_id: TBD
20 | loss: ['binary_crossentropy', 'binary_crossentropy']
21 | metrics: ['logloss', 'AUC']
22 | task: ['binary_classification', 'binary_classification']
23 | num_tasks: 2
24 | optimizer: adam
25 | learning_rate: 1.e-3
26 | bottom_hidden_units: [512, 256, 128]
27 | tower_hidden_units: [128, 64]
28 | hidden_activations: relu
29 | net_regularizer: 0
30 | embedding_regularizer: 1.e-6
31 | batch_norm: False
32 | net_dropout: 0
33 | batch_size: 128
34 | embedding_dim: 64
35 | epochs: 100
36 | shuffle: True
37 | seed: 2023
38 | monitor: 'AUC'
39 | monitor_mode: 'max'
40 |
41 | ### ModelName_test: This is a config for test only
42 | ShareBottom_test:
43 | model: ShareBottom
44 | dataset_id: tiny_mtl
45 | loss: ['binary_crossentropy', 'binary_crossentropy']
46 | metrics: ['logloss', 'AUC']
47 | task: ['binary_classification', 'binary_classification']
48 | num_tasks: 2
49 | optimizer: adam
50 | learning_rate: 1.e-3
51 | bottom_hidden_units: [512, 256, 128]
52 | tower_hidden_units: [128, 64]
53 | hidden_activations: relu
54 | net_regularizer: 0
55 | embedding_regularizer: 1.e-6
56 | batch_norm: False
57 | net_dropout: 0
58 | batch_size: 128
59 | embedding_dim: 64
60 | epochs: 1
61 | shuffle: True
62 | seed: 2023
63 | monitor: 'AUC'
64 | monitor_mode: 'max'
65 |
--------------------------------------------------------------------------------
/model_zoo/multitask/ShareBottom/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/multitask/ShareBottom/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .ShareBottom import ShareBottom
2 |
--------------------------------------------------------------------------------
/model_zoo/multitask/__init__.py:
--------------------------------------------------------------------------------
1 | from .MMoE.src import MMoE
2 | from .ShareBottom.src import ShareBottom
3 | from .PLE.src import PLE
4 |
--------------------------------------------------------------------------------
/model_zoo/xDeepFM/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reczoo/FuxiCTR/5c0c3084f93104f04f1f6186829ae00621eb0e35/model_zoo/xDeepFM/README.md
--------------------------------------------------------------------------------
/model_zoo/xDeepFM/config/dataset_config.yaml:
--------------------------------------------------------------------------------
1 | ### Tiny data for tests only
2 | tiny_npz:
3 | data_root: ../../data/
4 | data_format: npz
5 | train_data: ../../data/tiny_npz/train.npz
6 | valid_data: ../../data/tiny_npz/valid.npz
7 | test_data: ../../data/tiny_npz/test.npz
8 |
--------------------------------------------------------------------------------
/model_zoo/xDeepFM/config/model_config.yaml:
--------------------------------------------------------------------------------
1 | Base:
2 | model_root: './checkpoints/'
3 | num_workers: 3
4 | verbose: 1
5 | early_stop_patience: 2
6 | pickle_feature_encoder: True
7 | save_best_only: True
8 | eval_steps: null
9 | debug_mode: False
10 | group_id: null
11 | use_features: null
12 | feature_specs: null
13 | feature_config: null
14 |
15 | xDeepFM_test:
16 | model: xDeepFM
17 | dataset_id: tiny_npz
18 | loss: 'binary_crossentropy'
19 | metrics: ['logloss', 'AUC']
20 | task: binary_classification
21 | optimizer: adam
22 | learning_rate: 1.e-3
23 | embedding_regularizer: 1.e-8
24 | net_regularizer: 0
25 | batch_size: 128
26 | embedding_dim: 4
27 | dnn_hidden_units: [64, 32]
28 | cin_layer_units: [10, 10]
29 | hidden_activations: relu
30 | net_dropout: 0
31 | batch_norm: False
32 | epochs: 1
33 | shuffle: True
34 | seed: 2019
35 | monitor: 'AUC'
36 | monitor_mode: 'max'
37 |
38 | xDeepFM_default: # This is a config template
39 | model: xDeepFM
40 | dataset_id: TBD
41 | loss: 'binary_crossentropy'
42 | metrics: ['logloss', 'AUC']
43 | task: binary_classification
44 | optimizer: adam
45 | learning_rate: 1.0e-3
46 | embedding_regularizer: 0
47 | net_regularizer: 0
48 | batch_size: 10000
49 | embedding_dim: 40
50 | dnn_hidden_units: [500, 500, 500]
51 | cin_hidden_units: [32, 32, 32]
52 | hidden_activations: relu
53 | net_dropout: 0
54 | batch_norm: False
55 | epochs: 100
56 | shuffle: True
57 | seed: 2019
58 | monitor: {'AUC': 1, 'logloss': -1}
59 | monitor_mode: 'max'
--------------------------------------------------------------------------------
/model_zoo/xDeepFM/fuxictr_version.py:
--------------------------------------------------------------------------------
1 | # pip install -U fuxictr
2 | import fuxictr
3 | assert fuxictr.__version__ >= "2.3.7"
4 |
--------------------------------------------------------------------------------
/model_zoo/xDeepFM/src/__init__.py:
--------------------------------------------------------------------------------
1 | from .xDeepFM import *
2 |
3 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | keras_preprocessing
2 | pandas
3 | PyYAML
4 | scikit-learn
5 | numpy
6 | h5py
7 | tqdm
8 | pyarrow
9 | polars<=1.0.0
10 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | import setuptools
2 |
3 | with open("README.md", "r", encoding="utf-8") as fd:
4 | long_description = fd.read()
5 |
6 | setuptools.setup(
7 | name="fuxictr",
8 | version="2.3.8",
9 | author="RECZOO",
10 | author_email="reczoo@users.noreply.github.com",
11 | description="A configurable, tunable, and reproducible library for CTR prediction",
12 | long_description=long_description,
13 | long_description_content_type="text/markdown",
14 | url="https://github.com/reczoo/FuxiCTR",
15 | download_url='https://github.com/reczoo/FuxiCTR/tags',
16 | packages=setuptools.find_packages(
17 | exclude=["model_zoo", "tests", "data", "docs", "demo"]),
18 | include_package_data=True,
19 | python_requires=">=3.6",
20 | install_requires=["keras_preprocessing", "pandas", "PyYAML>=5.1", "scikit-learn",
21 | "numpy", "h5py", "tqdm", "pyarrow", "polars"],
22 | classifiers=(
23 | "License :: OSI Approved :: Apache Software License",
24 | "Operating System :: OS Independent",
25 | 'Intended Audience :: Developers',
26 | 'Intended Audience :: Education',
27 | 'Intended Audience :: Science/Research',
28 | 'Programming Language :: Python :: 3',
29 | 'Topic :: Scientific/Engineering',
30 | 'Topic :: Scientific/Engineering :: Artificial Intelligence',
31 | 'Topic :: Software Development',
32 | 'Topic :: Software Development :: Libraries',
33 | 'Topic :: Software Development :: Libraries :: Python Modules',
34 | ),
35 | license="Apache-2.0 License",
36 | keywords=['ctr prediction', 'recommender systems',
37 | 'ctr', 'cvr', 'pytorch'],
38 | )
39 |
--------------------------------------------------------------------------------
/tests/test_demo.sh:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | cd "$(pwd)/../demo"
3 |
4 | echo "=== Testing example1 ===" && python example1_build_dataset_to_parquet.py && \
5 | echo "=== Testing example2 ===" && python example2_DeepFM_with_parquet_input.py && \
6 | echo "=== Testing example3 ===" && python example3_DeepFM_with_npz_input.py && \
7 | echo "=== Testing example4 ===" && python example4_DeepFM_with_csv_input.py && \
8 | echo "=== Testing example5 ===" && python example5_DeepFM_with_pretrained_emb.py && \
9 | echo "=== Testing example6 ===" && python example6_DIN_with_sequence_feature.py && \
10 | echo "=== Testing example7 ===" && python example7_DeepFM_with_customized_preprocess.py && \
11 |
12 | echo "All tests done."
13 |
--------------------------------------------------------------------------------
/tests/test_tensorflow.sh:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | home="$(pwd)/../model_zoo"
3 |
4 | echo "=== Testing DNN_tf ===" && cd $home/DNN/DNN_tf && python run_expid.py --expid DNN_test && \
5 | echo "=== Testing DCN_tf ===" && cd $home/DCN/DCN_tf && python run_expid.py --expid DCN_test && \
6 | echo "=== Testing WideDeep_tf ===" && cd $home/WideDeep/WideDeep_tf && python run_expid.py --expid WideDeep_test && \
7 |
8 | echo "All tests done."
9 |
--------------------------------------------------------------------------------