nextrec 0.4.6__tar.gz → 0.4.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nextrec-0.4.6 → nextrec-0.4.7}/.github/workflows/tests.yml +1 -12
- {nextrec-0.4.6 → nextrec-0.4.7}/PKG-INFO +30 -25
- {nextrec-0.4.6 → nextrec-0.4.7}/README.md +29 -24
- {nextrec-0.4.6 → nextrec-0.4.7}/README_en.md +23 -15
- nextrec-0.4.7/assets/nextrec_diagram.png +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/docs/rtd/conf.py +1 -1
- nextrec-0.4.7/nextrec/__version__.py +1 -0
- nextrec-0.4.7/nextrec/basic/callback.py +413 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/basic/model.py +274 -173
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/loss/loss_utils.py +73 -4
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/match/dssm.py +5 -4
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/match/dssm_v2.py +4 -3
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/match/mind.py +5 -4
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/match/sdm.py +5 -4
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/match/youtube_dnn.py +5 -4
- {nextrec-0.4.6 → nextrec-0.4.7}/pyproject.toml +1 -1
- nextrec-0.4.7/test/test_base_model_regularization.py +42 -0
- nextrec-0.4.6/assets/nextrec_diagram_en.png +0 -0
- nextrec-0.4.6/assets/nextrec_diagram_zh.png +0 -0
- nextrec-0.4.6/nextrec/__version__.py +0 -1
- nextrec-0.4.6/nextrec/basic/callback.py +0 -35
- {nextrec-0.4.6 → nextrec-0.4.7}/.github/workflows/publish.yml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/.gitignore +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/.readthedocs.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/CODE_OF_CONDUCT.md +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/CONTRIBUTING.md +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/LICENSE +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/MANIFEST.in +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/assets/Feature Configuration.png +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/assets/Model Parameters.png +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/assets/Training Configuration.png +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/assets/Training logs.png +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/assets/logo.png +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/assets/mmoe_tutorial.png +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/assets/test data.png +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/dataset/ctcvr_task.csv +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/dataset/ecommerce_task.csv +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/dataset/match_task.csv +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/dataset/movielens_100k.csv +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/dataset/multitask_task.csv +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/dataset/ranking_task.csv +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/docs/en/Getting started guide.md +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/docs/rtd/Makefile +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/docs/rtd/index.md +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/docs/rtd/make.bat +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/docs/rtd/modules.rst +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/docs/rtd/nextrec.basic.rst +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/docs/rtd/nextrec.data.rst +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/docs/rtd/nextrec.loss.rst +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/docs/rtd/nextrec.rst +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/docs/rtd/nextrec.utils.rst +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/docs/rtd/requirements.txt +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/docs/zh//345/277/253/351/200/237/344/270/212/346/211/213.md" +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/__init__.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/basic/__init__.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/basic/activation.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/basic/features.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/basic/layers.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/basic/loggers.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/basic/metrics.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/basic/session.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/cli.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/data/__init__.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/data/batch_utils.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/data/data_processing.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/data/data_utils.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/data/dataloader.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/data/preprocessor.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/loss/__init__.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/loss/listwise.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/loss/pairwise.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/loss/pointwise.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/generative/__init__.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/generative/hstu.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/generative/rqvae.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/generative/tiger.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/match/__init__.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/multi_task/__init__.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/multi_task/esmm.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/multi_task/mmoe.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/multi_task/ple.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/multi_task/poso.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/multi_task/share_bottom.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/ranking/__init__.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/ranking/afm.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/ranking/autoint.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/ranking/dcn.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/ranking/dcn_v2.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/ranking/deepfm.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/ranking/dien.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/ranking/din.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/ranking/fibinet.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/ranking/fm.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/ranking/masknet.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/ranking/pnn.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/ranking/widedeep.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/models/ranking/xdeepfm.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/utils/__init__.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/utils/config.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/utils/device.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/utils/distributed.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/utils/embedding.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/utils/feature.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/utils/file.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/utils/initializer.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/utils/model.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/utils/optimizer.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/utils/synthetic_data.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec/utils/tensor.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/NextRec-CLI.md +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/NextRec-CLI_zh.md +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/feature_config.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/model_configs/afm.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/model_configs/autoint.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/model_configs/dcn.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/model_configs/deepfm.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/model_configs/din.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/model_configs/esmm.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/model_configs/fibinet.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/model_configs/fm.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/model_configs/masknet.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/model_configs/mmoe.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/model_configs/ple.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/model_configs/pnn.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/model_configs/poso.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/model_configs/share_bottom.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/model_configs/widedeep.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/model_configs/xdeepfm.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/predict_config.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/nextrec_cli_preset/train_config.yaml +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/pytest.ini +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/requirements.txt +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/scripts/format_code.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/test/__init__.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/test/conftest.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/test/run_tests.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/test/test_generative_models.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/test/test_layers.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/test/test_losses.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/test/test_match_models.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/test/test_multitask_models.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/test/test_preprocessor.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/test/test_ranking_models.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/test/test_utils.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/test_requirements.txt +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/tutorials/distributed/example_distributed_training.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/tutorials/distributed/example_distributed_training_large_dataset.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/tutorials/example_match_dssm.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/tutorials/example_multitask.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/tutorials/example_ranking_din.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/tutorials/movielen_match_dssm.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/tutorials/movielen_ranking_deepfm.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/tutorials/notebooks/en/Build semantic ID with RQ-VAE.ipynb +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/tutorials/notebooks/en/Hands on dataprocessor.ipynb +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/tutorials/notebooks/en/Hands on nextrec.ipynb +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/tutorials/notebooks/zh//344/275/277/347/224/250RQ-VAE/346/236/204/345/273/272/350/257/255/344/271/211ID.ipynb" +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/tutorials/notebooks/zh//345/246/202/344/275/225/344/275/277/347/224/250DataProcessor/350/277/233/350/241/214/351/242/204/345/244/204/347/220/206.ipynb" +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/tutorials/notebooks/zh//345/277/253/351/200/237/345/205/245/351/227/250nextrec.ipynb" +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/tutorials/run_all_match_models.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/tutorials/run_all_multitask_models.py +0 -0
- {nextrec-0.4.6 → nextrec-0.4.7}/tutorials/run_all_ranking_models.py +0 -0
|
@@ -45,18 +45,7 @@ jobs:
|
|
|
45
45
|
run: |
|
|
46
46
|
python -c "import torch; print(f'PyTorch version: {torch.__version__}')"
|
|
47
47
|
python -c "import nextrec; print('NextRec imported successfully')"
|
|
48
|
-
|
|
49
|
-
- name: Run tutorial multi-task models
|
|
50
|
-
run: |
|
|
51
|
-
python tutorials/run_all_multitask_models.py
|
|
52
|
-
|
|
53
|
-
- name: Run tutorial ranking models
|
|
54
|
-
run: |
|
|
55
|
-
python tutorials/run_all_ranking_models.py
|
|
56
|
-
|
|
57
|
-
- name: Run tutorial match models
|
|
58
|
-
run: |
|
|
59
|
-
python tutorials/run_all_match_models.py
|
|
48
|
+
|
|
60
49
|
|
|
61
50
|
- name: Run match model tests
|
|
62
51
|
run: |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nextrec
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.7
|
|
4
4
|
Summary: A comprehensive recommendation library with match, ranking, and multi-task learning models
|
|
5
5
|
Project-URL: Homepage, https://github.com/zerolovesea/NextRec
|
|
6
6
|
Project-URL: Repository, https://github.com/zerolovesea/NextRec
|
|
@@ -65,9 +65,9 @@ Description-Content-Type: text/markdown
|
|
|
65
65
|

|
|
66
66
|

|
|
67
67
|

|
|
68
|
-

|
|
69
69
|
|
|
70
|
-
中文文档 | [English Version](README_en.md)
|
|
70
|
+
中文文档 | [English Version](README_en.md)
|
|
71
71
|
|
|
72
72
|
**统一、高效、可扩展的推荐系统框架**
|
|
73
73
|
|
|
@@ -80,7 +80,7 @@ Description-Content-Type: text/markdown
|
|
|
80
80
|
- [安装](#安装)
|
|
81
81
|
- [架构](#架构)
|
|
82
82
|
- [5分钟快速上手](#5分钟快速上手)
|
|
83
|
-
- [命令行工具](#命令行工具)
|
|
83
|
+
- [命令行工具 NextRec-CLI](#命令行工具)
|
|
84
84
|
- [兼容平台](#兼容平台)
|
|
85
85
|
- [支持模型](#支持模型)
|
|
86
86
|
- [贡献指南](#贡献指南)
|
|
@@ -90,35 +90,30 @@ Description-Content-Type: text/markdown
|
|
|
90
90
|
NextRec是一个基于PyTorch的现代推荐系统框架,旨在为研究工程团队提供快速的建模、训练与评估流。框架内置丰富的模型库、数据处理工具和工程化训练组件。此外提供了易上手的接口,命令行工具及教程,推荐算法学习者能以最快速度了解模型架构,复现学术论文并进行训练和部署。
|
|
91
91
|
|
|
92
92
|
## Why NextRec
|
|
93
|
-
|
|
94
|
-
- **统一的特征工程与数据流水线**:NextRec框架提供了统一的特征定义、可持久化的数据处理、并对批处理进行了优化,符合工业大数据Spark/Hive场景下,基于离线特征的模型训练推理流程。
|
|
95
93
|
- **多场景推荐能力**:覆盖排序(CTR/CVR)、召回、多任务学习、生成式召回等推荐/营销模型,持续跟进业界进展。
|
|
96
|
-
-
|
|
94
|
+
- **统一的特征工程与数据流水线**:NextRec框架提供了统一的特征定义、可持久化的数据处理、批处理优化,符合工业大数据Spark/Hive场景下,基于离线特征的模型训练推理流程。
|
|
95
|
+
- **友好的工程体验**:支持多种格式数据(`csv/parquet/pathlike`)的流式处理/分布式训练/推理与可视化指标监控,方便业务算法工程师和推荐算法学习者快速复现实验。
|
|
97
96
|
- **灵活的命令行工具**:支持通过命令行和配置文件,一键启动训练和推理进程,方便快速实验迭代和敏捷部署。
|
|
98
97
|
- **高效训练与评估**:内置多种优化器、学习率调度、早停、模型检查点与详细的日志管理,开箱即用。
|
|
99
98
|
|
|
100
99
|
## NextRec近期进展
|
|
101
100
|
|
|
102
|
-
- **12/12/2025** 在v0.4.
|
|
101
|
+
- **12/12/2025** 在v0.4.7中加入了[RQ-VAE](/nextrec/models/generative/rqvae.py)模块。配套的[数据集](/dataset/ecommerce_task.csv)和[代码](tutorials/notebooks/zh/使用RQ-VAE构建语义ID.ipynby)已经同步在仓库中
|
|
103
102
|
- **07/12/2025** 发布了NextRec CLI命令行工具,它允许用户根据配置文件进行一键训练和推理,我们提供了相关的[教程](/nextrec_cli_preset/NextRec-CLI_zh.md)和[教学代码](/nextrec_cli_preset)
|
|
104
|
-
- **03/12/2025** NextRec
|
|
103
|
+
- **03/12/2025** NextRec获得了100颗🌟!感谢大家的支持
|
|
105
104
|
- **06/12/2025** 在v0.4.1中支持了单机多卡的分布式DDP训练,并且提供了配套的[代码](tutorials/distributed)
|
|
106
105
|
- **23/11/2025** 在v0.2.2中对basemodel进行了逻辑上的大幅重构和流程统一,并且对listwise/pairwise/pointwise损失进行了统一
|
|
107
106
|
- **11/11/2025** NextRec v0.1.0发布,我们提供了10余种Ranking模型,4种多任务模型和4种召回模型,以及统一的训练/日志/指标管理系统
|
|
108
107
|
|
|
109
108
|
## 架构
|
|
110
109
|
|
|
111
|
-
NextRec
|
|
112
|
-
|
|
113
|
-

|
|
110
|
+
NextRec采用模块化工程设计,核心组件包括:统一特征驱动的BaseModel架构;独立Layer模块;支持训练推理的统一的DataLoader;命令行工具NextCLI等。
|
|
114
111
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
---
|
|
112
|
+

|
|
118
113
|
|
|
119
114
|
## 安装
|
|
120
115
|
|
|
121
|
-
开发者可以通过`pip install nextrec`快速安装NextRec的最新版本,环境要求为Python 3.10
|
|
116
|
+
开发者可以通过`pip install nextrec`快速安装NextRec的最新版本,环境要求为Python 3.10+(对于需要使用CUDA加速的开发者,建议安装对应版本的pytorch)。如果需要执行示例代码,则需要先拉取仓库:
|
|
122
117
|
|
|
123
118
|
```bash
|
|
124
119
|
git clone https://github.com/zerolovesea/NextRec.git
|
|
@@ -245,11 +240,11 @@ nextrec --mode=train --train_config=path/to/train_config.yaml
|
|
|
245
240
|
nextrec --mode=predict --predict_config=path/to/predict_config.yaml
|
|
246
241
|
```
|
|
247
242
|
|
|
248
|
-
> 截止当前版本0.4.
|
|
243
|
+
> 截止当前版本0.4.7,NextRec CLI支持单机训练,分布式训练相关功能尚在开发中。
|
|
249
244
|
|
|
250
245
|
## 兼容平台
|
|
251
246
|
|
|
252
|
-
当前最新版本为0.4.
|
|
247
|
+
当前最新版本为0.4.7,所有模型和测试代码均已在以下平台通过验证,如果开发者在使用中遇到兼容问题,请在issue区提出错误报告及系统版本:
|
|
253
248
|
|
|
254
249
|
| 平台 | 配置 |
|
|
255
250
|
|------|------|
|
|
@@ -273,7 +268,7 @@ nextrec --mode=predict --predict_config=path/to/predict_config.yaml
|
|
|
273
268
|
| [PNN](nextrec/models/ranking/pnn.py) | Product-based Neural Networks for User Response Prediction | ICDM 2016 | 已支持 |
|
|
274
269
|
| [AutoInt](nextrec/models/ranking/autoint.py) | AutoInt: Automatic Feature Interaction Learning | CIKM 2019 | 已支持 |
|
|
275
270
|
| [DCN](nextrec/models/ranking/dcn.py) | Deep & Cross Network for Ad Click Predictions | ADKDD 2017 | 已支持 |
|
|
276
|
-
| [DCN v2](nextrec/models/ranking/dcn_v2.py) | DCN V2: Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems | KDD 2021 |
|
|
271
|
+
| [DCN v2](nextrec/models/ranking/dcn_v2.py) | DCN V2: Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems | KDD 2021 | 已支持 |
|
|
277
272
|
| [DIN](nextrec/models/ranking/din.py) | Deep Interest Network for Click-Through Rate Prediction | KDD 2018 | 已支持 |
|
|
278
273
|
| [DIEN](nextrec/models/ranking/dien.py) | Deep Interest Evolution Network for Click-Through Rate Prediction | AAAI 2019 | 已支持 |
|
|
279
274
|
| [MaskNet](nextrec/models/ranking/masknet.py) | MaskNet: Introducing Feature-wise Gating Blocks for High-dimensional Sparse Recommendation Data | 2020 | 已支持 |
|
|
@@ -337,21 +332,15 @@ nextrec --mode=predict --predict_config=path/to/predict_config.yaml
|
|
|
337
332
|
- 实际行为
|
|
338
333
|
- 环境信息(Python 版本、PyTorch 版本等)
|
|
339
334
|
|
|
340
|
-
---
|
|
341
|
-
|
|
342
335
|
## 许可证
|
|
343
336
|
|
|
344
337
|
本项目采用 [Apache 2.0 许可证](./LICENSE)。
|
|
345
338
|
|
|
346
|
-
---
|
|
347
|
-
|
|
348
339
|
## 联系方式
|
|
349
340
|
|
|
350
341
|
- **GitHub Issues**: [提交问题](https://github.com/zerolovesea/NextRec/issues)
|
|
351
342
|
- **邮箱**: zyaztec@gmail.com
|
|
352
343
|
|
|
353
|
-
---
|
|
354
|
-
|
|
355
344
|
## 致谢
|
|
356
345
|
|
|
357
346
|
NextRec 的开发受到以下优秀项目的启发:
|
|
@@ -362,6 +351,22 @@ NextRec 的开发受到以下优秀项目的启发:
|
|
|
362
351
|
|
|
363
352
|
感谢开源社区的所有贡献者!
|
|
364
353
|
|
|
354
|
+
|
|
355
|
+
## 引用
|
|
356
|
+
|
|
357
|
+
如果您在研究或工作中使用了本框架,欢迎引用本项目:
|
|
358
|
+
|
|
359
|
+
```bibtex
|
|
360
|
+
@misc{nextrec,
|
|
361
|
+
title = {NextRec},
|
|
362
|
+
author = {Yang Zhou},
|
|
363
|
+
year = {2025},
|
|
364
|
+
publisher = {GitHub},
|
|
365
|
+
journal = {GitHub repository},
|
|
366
|
+
howpublished = {\url{https://github.com/zerolovesea/NextRec}},
|
|
367
|
+
note = {A unified, efficient, and extensible PyTorch-based recommendation library}
|
|
368
|
+
}
|
|
369
|
+
```
|
|
365
370
|
---
|
|
366
371
|
|
|
367
372
|
<div align="center">
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|

|
|
8
8
|

|
|
9
9
|

|
|
10
|
-

|
|
11
11
|
|
|
12
|
-
中文文档 | [English Version](README_en.md)
|
|
12
|
+
中文文档 | [English Version](README_en.md)
|
|
13
13
|
|
|
14
14
|
**统一、高效、可扩展的推荐系统框架**
|
|
15
15
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
- [安装](#安装)
|
|
23
23
|
- [架构](#架构)
|
|
24
24
|
- [5分钟快速上手](#5分钟快速上手)
|
|
25
|
-
- [命令行工具](#命令行工具)
|
|
25
|
+
- [命令行工具 NextRec-CLI](#命令行工具)
|
|
26
26
|
- [兼容平台](#兼容平台)
|
|
27
27
|
- [支持模型](#支持模型)
|
|
28
28
|
- [贡献指南](#贡献指南)
|
|
@@ -32,35 +32,30 @@
|
|
|
32
32
|
NextRec是一个基于PyTorch的现代推荐系统框架,旨在为研究工程团队提供快速的建模、训练与评估流。框架内置丰富的模型库、数据处理工具和工程化训练组件。此外提供了易上手的接口,命令行工具及教程,推荐算法学习者能以最快速度了解模型架构,复现学术论文并进行训练和部署。
|
|
33
33
|
|
|
34
34
|
## Why NextRec
|
|
35
|
-
|
|
36
|
-
- **统一的特征工程与数据流水线**:NextRec框架提供了统一的特征定义、可持久化的数据处理、并对批处理进行了优化,符合工业大数据Spark/Hive场景下,基于离线特征的模型训练推理流程。
|
|
37
35
|
- **多场景推荐能力**:覆盖排序(CTR/CVR)、召回、多任务学习、生成式召回等推荐/营销模型,持续跟进业界进展。
|
|
38
|
-
-
|
|
36
|
+
- **统一的特征工程与数据流水线**:NextRec框架提供了统一的特征定义、可持久化的数据处理、批处理优化,符合工业大数据Spark/Hive场景下,基于离线特征的模型训练推理流程。
|
|
37
|
+
- **友好的工程体验**:支持多种格式数据(`csv/parquet/pathlike`)的流式处理/分布式训练/推理与可视化指标监控,方便业务算法工程师和推荐算法学习者快速复现实验。
|
|
39
38
|
- **灵活的命令行工具**:支持通过命令行和配置文件,一键启动训练和推理进程,方便快速实验迭代和敏捷部署。
|
|
40
39
|
- **高效训练与评估**:内置多种优化器、学习率调度、早停、模型检查点与详细的日志管理,开箱即用。
|
|
41
40
|
|
|
42
41
|
## NextRec近期进展
|
|
43
42
|
|
|
44
|
-
- **12/12/2025** 在v0.4.
|
|
43
|
+
- **12/12/2025** 在v0.4.7中加入了[RQ-VAE](/nextrec/models/generative/rqvae.py)模块。配套的[数据集](/dataset/ecommerce_task.csv)和[代码](tutorials/notebooks/zh/使用RQ-VAE构建语义ID.ipynby)已经同步在仓库中
|
|
45
44
|
- **07/12/2025** 发布了NextRec CLI命令行工具,它允许用户根据配置文件进行一键训练和推理,我们提供了相关的[教程](/nextrec_cli_preset/NextRec-CLI_zh.md)和[教学代码](/nextrec_cli_preset)
|
|
46
|
-
- **03/12/2025** NextRec
|
|
45
|
+
- **03/12/2025** NextRec获得了100颗🌟!感谢大家的支持
|
|
47
46
|
- **06/12/2025** 在v0.4.1中支持了单机多卡的分布式DDP训练,并且提供了配套的[代码](tutorials/distributed)
|
|
48
47
|
- **23/11/2025** 在v0.2.2中对basemodel进行了逻辑上的大幅重构和流程统一,并且对listwise/pairwise/pointwise损失进行了统一
|
|
49
48
|
- **11/11/2025** NextRec v0.1.0发布,我们提供了10余种Ranking模型,4种多任务模型和4种召回模型,以及统一的训练/日志/指标管理系统
|
|
50
49
|
|
|
51
50
|
## 架构
|
|
52
51
|
|
|
53
|
-
NextRec
|
|
54
|
-
|
|
55
|
-

|
|
52
|
+
NextRec采用模块化工程设计,核心组件包括:统一特征驱动的BaseModel架构;独立Layer模块;支持训练推理的统一的DataLoader;命令行工具NextCLI等。
|
|
56
53
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
---
|
|
54
|
+

|
|
60
55
|
|
|
61
56
|
## 安装
|
|
62
57
|
|
|
63
|
-
开发者可以通过`pip install nextrec`快速安装NextRec的最新版本,环境要求为Python 3.10
|
|
58
|
+
开发者可以通过`pip install nextrec`快速安装NextRec的最新版本,环境要求为Python 3.10+(对于需要使用CUDA加速的开发者,建议安装对应版本的pytorch)。如果需要执行示例代码,则需要先拉取仓库:
|
|
64
59
|
|
|
65
60
|
```bash
|
|
66
61
|
git clone https://github.com/zerolovesea/NextRec.git
|
|
@@ -187,11 +182,11 @@ nextrec --mode=train --train_config=path/to/train_config.yaml
|
|
|
187
182
|
nextrec --mode=predict --predict_config=path/to/predict_config.yaml
|
|
188
183
|
```
|
|
189
184
|
|
|
190
|
-
> 截止当前版本0.4.
|
|
185
|
+
> 截止当前版本0.4.7,NextRec CLI支持单机训练,分布式训练相关功能尚在开发中。
|
|
191
186
|
|
|
192
187
|
## 兼容平台
|
|
193
188
|
|
|
194
|
-
当前最新版本为0.4.
|
|
189
|
+
当前最新版本为0.4.7,所有模型和测试代码均已在以下平台通过验证,如果开发者在使用中遇到兼容问题,请在issue区提出错误报告及系统版本:
|
|
195
190
|
|
|
196
191
|
| 平台 | 配置 |
|
|
197
192
|
|------|------|
|
|
@@ -215,7 +210,7 @@ nextrec --mode=predict --predict_config=path/to/predict_config.yaml
|
|
|
215
210
|
| [PNN](nextrec/models/ranking/pnn.py) | Product-based Neural Networks for User Response Prediction | ICDM 2016 | 已支持 |
|
|
216
211
|
| [AutoInt](nextrec/models/ranking/autoint.py) | AutoInt: Automatic Feature Interaction Learning | CIKM 2019 | 已支持 |
|
|
217
212
|
| [DCN](nextrec/models/ranking/dcn.py) | Deep & Cross Network for Ad Click Predictions | ADKDD 2017 | 已支持 |
|
|
218
|
-
| [DCN v2](nextrec/models/ranking/dcn_v2.py) | DCN V2: Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems | KDD 2021 |
|
|
213
|
+
| [DCN v2](nextrec/models/ranking/dcn_v2.py) | DCN V2: Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems | KDD 2021 | 已支持 |
|
|
219
214
|
| [DIN](nextrec/models/ranking/din.py) | Deep Interest Network for Click-Through Rate Prediction | KDD 2018 | 已支持 |
|
|
220
215
|
| [DIEN](nextrec/models/ranking/dien.py) | Deep Interest Evolution Network for Click-Through Rate Prediction | AAAI 2019 | 已支持 |
|
|
221
216
|
| [MaskNet](nextrec/models/ranking/masknet.py) | MaskNet: Introducing Feature-wise Gating Blocks for High-dimensional Sparse Recommendation Data | 2020 | 已支持 |
|
|
@@ -279,21 +274,15 @@ nextrec --mode=predict --predict_config=path/to/predict_config.yaml
|
|
|
279
274
|
- 实际行为
|
|
280
275
|
- 环境信息(Python 版本、PyTorch 版本等)
|
|
281
276
|
|
|
282
|
-
---
|
|
283
|
-
|
|
284
277
|
## 许可证
|
|
285
278
|
|
|
286
279
|
本项目采用 [Apache 2.0 许可证](./LICENSE)。
|
|
287
280
|
|
|
288
|
-
---
|
|
289
|
-
|
|
290
281
|
## 联系方式
|
|
291
282
|
|
|
292
283
|
- **GitHub Issues**: [提交问题](https://github.com/zerolovesea/NextRec/issues)
|
|
293
284
|
- **邮箱**: zyaztec@gmail.com
|
|
294
285
|
|
|
295
|
-
---
|
|
296
|
-
|
|
297
286
|
## 致谢
|
|
298
287
|
|
|
299
288
|
NextRec 的开发受到以下优秀项目的启发:
|
|
@@ -304,6 +293,22 @@ NextRec 的开发受到以下优秀项目的启发:
|
|
|
304
293
|
|
|
305
294
|
感谢开源社区的所有贡献者!
|
|
306
295
|
|
|
296
|
+
|
|
297
|
+
## 引用
|
|
298
|
+
|
|
299
|
+
如果您在研究或工作中使用了本框架,欢迎引用本项目:
|
|
300
|
+
|
|
301
|
+
```bibtex
|
|
302
|
+
@misc{nextrec,
|
|
303
|
+
title = {NextRec},
|
|
304
|
+
author = {Yang Zhou},
|
|
305
|
+
year = {2025},
|
|
306
|
+
publisher = {GitHub},
|
|
307
|
+
journal = {GitHub repository},
|
|
308
|
+
howpublished = {\url{https://github.com/zerolovesea/NextRec}},
|
|
309
|
+
note = {A unified, efficient, and extensible PyTorch-based recommendation library}
|
|
310
|
+
}
|
|
311
|
+
```
|
|
307
312
|
---
|
|
308
313
|
|
|
309
314
|
<div align="center">
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|

|
|
8
8
|

|
|
9
9
|

|
|
10
|
-

|
|
11
11
|
|
|
12
12
|
English | [中文文档](README.md)
|
|
13
13
|
|
|
@@ -34,8 +34,8 @@ NextRec is a modern recommendation framework built on PyTorch, delivering a unif
|
|
|
34
34
|
|
|
35
35
|
## Why NextRec
|
|
36
36
|
|
|
37
|
-
- **Unified feature engineering & data pipeline**: NextRec provide unified Dense/Sparse/Sequence feature definitions, DataProcessor, and batch-optimized RecDataLoader, matching offline feature training/inference in industrial big-data settings.
|
|
38
37
|
- **Multi-scenario coverage**: Ranking (CTR/CVR), retrieval, multi-task learning, and more marketing/rec models, with a continuously expanding model zoo.
|
|
38
|
+
- **Unified feature engineering & data pipeline**: NextRec provide unified Dense/Sparse/Sequence feature definitions, DataProcessor, and batch-optimized RecDataLoader, matching offline feature training/inference in industrial big-data settings.
|
|
39
39
|
- **Developer-friendly experience**: `Stream processing/distributed training/inference` for `csv/parquet/pathlike` data, plus GPU/MPS acceleration and visualization support.
|
|
40
40
|
- **Flexible CLI tooling**: Start training and inference via command line and config files for rapid experiment iteration and agile deployment.
|
|
41
41
|
- **Efficient training & evaluation**: Standardized engine with optimizers, LR schedulers, early stopping, checkpoints, and detailed logging out of the box.
|
|
@@ -51,13 +51,10 @@ NextRec is a modern recommendation framework built on PyTorch, delivering a unif
|
|
|
51
51
|
|
|
52
52
|
## Architecture
|
|
53
53
|
|
|
54
|
-
NextRec adopts a modular design
|
|
54
|
+
NextRec adopts a modular engineering design. The core components include: a unified feature-driven BaseModel architecture; independent Layer modules; a unified DataLoader supporting both training and inference; the NextCLI command-line tool, and more.
|
|
55
55
|
|
|
56
|
-

|
|
57
57
|
|
|
58
|
-
> The project borrows ideas from excellent open-source rec libraries, for example: [torch-rechub](https://github.com/datawhalechina/torch-rechub). torch-rechub remains mature in architecture and models; the author contributed a bit there—feel free to check it out.
|
|
59
|
-
|
|
60
|
-
---
|
|
61
58
|
|
|
62
59
|
## Installation
|
|
63
60
|
|
|
@@ -189,11 +186,11 @@ nextrec --mode=train --train_config=path/to/train_config.yaml
|
|
|
189
186
|
nextrec --mode=predict --predict_config=path/to/predict_config.yaml
|
|
190
187
|
```
|
|
191
188
|
|
|
192
|
-
> As of version 0.4.
|
|
189
|
+
> As of version 0.4.7, NextRec CLI supports single-machine training; distributed training features are currently under development.
|
|
193
190
|
|
|
194
191
|
## Platform Compatibility
|
|
195
192
|
|
|
196
|
-
The current version is 0.4.
|
|
193
|
+
The current version is 0.4.7. All models and test code have been validated on the following platforms. If you encounter compatibility issues, please report them in the issue tracker with your system version:
|
|
197
194
|
|
|
198
195
|
| Platform | Configuration |
|
|
199
196
|
|----------|---------------|
|
|
@@ -283,21 +280,15 @@ When submitting issues on GitHub, please include:
|
|
|
283
280
|
- Actual behavior
|
|
284
281
|
- Environment info (Python version, PyTorch version, etc.)
|
|
285
282
|
|
|
286
|
-
---
|
|
287
|
-
|
|
288
283
|
## License
|
|
289
284
|
|
|
290
285
|
This project is licensed under the [Apache 2.0 License](./LICENSE).
|
|
291
286
|
|
|
292
|
-
---
|
|
293
|
-
|
|
294
287
|
## Contact
|
|
295
288
|
|
|
296
289
|
- **GitHub Issues**: [Submit an issue](https://github.com/zerolovesea/NextRec/issues)
|
|
297
290
|
- **Email**: zyaztec@gmail.com
|
|
298
291
|
|
|
299
|
-
---
|
|
300
|
-
|
|
301
292
|
## Acknowledgements
|
|
302
293
|
|
|
303
294
|
NextRec is inspired by the following great open-source projects:
|
|
@@ -308,6 +299,23 @@ NextRec is inspired by the following great open-source projects:
|
|
|
308
299
|
|
|
309
300
|
Special thanks to all open-source contributors!
|
|
310
301
|
|
|
302
|
+
## Citation
|
|
303
|
+
|
|
304
|
+
If you use this framework in your research or work, please consider citing:
|
|
305
|
+
|
|
306
|
+
```bibtex
|
|
307
|
+
@misc{nextrec,
|
|
308
|
+
title = {NextRec},
|
|
309
|
+
author = {Yang Zhou},
|
|
310
|
+
year = {2025},
|
|
311
|
+
publisher = {GitHub},
|
|
312
|
+
journal = {GitHub repository},
|
|
313
|
+
howpublished = {\url{https://github.com/zerolovesea/NextRec}},
|
|
314
|
+
note = {A unified, efficient, and extensible PyTorch-based recommendation library}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
```
|
|
318
|
+
|
|
311
319
|
---
|
|
312
320
|
|
|
313
321
|
<div align="center">
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.7"
|