nextrec 0.4.15__tar.gz → 0.4.16__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.15 → nextrec-0.4.16}/PKG-INFO +5 -5
- {nextrec-0.4.15 → nextrec-0.4.16}/README.md +4 -4
- {nextrec-0.4.15 → nextrec-0.4.16}/README_en.md +4 -4
- {nextrec-0.4.15 → nextrec-0.4.16}/docs/rtd/conf.py +1 -1
- nextrec-0.4.16/nextrec/__version__.py +1 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/basic/metrics.py +2 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/basic/model.py +8 -5
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/utils/config.py +12 -3
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/utils/console.py +66 -25
- {nextrec-0.4.15 → nextrec-0.4.16}/pyproject.toml +1 -1
- nextrec-0.4.15/nextrec/__version__.py +0 -1
- {nextrec-0.4.15 → nextrec-0.4.16}/.github/workflows/publish.yml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/.github/workflows/tests.yml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/.gitignore +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/.readthedocs.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/CODE_OF_CONDUCT.md +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/CONTRIBUTING.md +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/LICENSE +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/MANIFEST.in +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/assets/Feature Configuration.png +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/assets/Model Parameters.png +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/assets/Training Configuration.png +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/assets/Training logs.png +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/assets/logo.png +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/assets/mmoe_tutorial.png +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/assets/nextrec_diagram.png +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/assets/test data.png +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/dataset/ctcvr_task.csv +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/dataset/ecommerce_task.csv +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/dataset/match_task.csv +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/dataset/movielens_100k.csv +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/dataset/multitask_task.csv +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/dataset/ranking_task.csv +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/docs/en/Getting started guide.md +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/docs/rtd/Makefile +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/docs/rtd/index.md +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/docs/rtd/make.bat +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/docs/rtd/modules.rst +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/docs/rtd/nextrec.basic.rst +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/docs/rtd/nextrec.data.rst +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/docs/rtd/nextrec.loss.rst +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/docs/rtd/nextrec.rst +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/docs/rtd/nextrec.utils.rst +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/docs/rtd/requirements.txt +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/docs/zh//345/277/253/351/200/237/344/270/212/346/211/213.md" +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/__init__.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/basic/__init__.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/basic/activation.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/basic/callback.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/basic/features.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/basic/layers.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/basic/loggers.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/basic/session.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/cli.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/data/__init__.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/data/batch_utils.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/data/data_processing.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/data/data_utils.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/data/dataloader.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/data/preprocessor.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/loss/__init__.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/loss/grad_norm.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/loss/listwise.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/loss/loss_utils.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/loss/pairwise.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/loss/pointwise.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/generative/__init__.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/generative/tiger.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/multi_task/__init__.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/multi_task/esmm.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/multi_task/mmoe.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/multi_task/ple.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/multi_task/poso.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/multi_task/share_bottom.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/ranking/__init__.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/ranking/afm.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/ranking/autoint.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/ranking/dcn.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/ranking/dcn_v2.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/ranking/deepfm.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/ranking/dien.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/ranking/din.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/ranking/eulernet.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/ranking/ffm.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/ranking/fibinet.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/ranking/fm.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/ranking/lr.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/ranking/masknet.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/ranking/pnn.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/ranking/widedeep.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/ranking/xdeepfm.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/representation/__init__.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/representation/autorec.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/representation/bpr.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/representation/cl4srec.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/representation/lightgcn.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/representation/mf.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/representation/rqvae.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/representation/s3rec.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/retrieval/__init__.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/retrieval/dssm.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/retrieval/dssm_v2.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/retrieval/mind.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/retrieval/sdm.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/retrieval/youtube_dnn.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/sequential/hstu.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/models/sequential/sasrec.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/utils/__init__.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/utils/data.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/utils/embedding.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/utils/feature.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/utils/model.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec/utils/torch_utils.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/NextRec-CLI.md +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/NextRec-CLI_zh.md +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/feature_config.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/model_configs/afm.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/model_configs/autoint.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/model_configs/dcn.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/model_configs/deepfm.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/model_configs/din.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/model_configs/esmm.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/model_configs/fibinet.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/model_configs/fm.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/model_configs/masknet.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/model_configs/mmoe.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/model_configs/ple.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/model_configs/pnn.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/model_configs/poso.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/model_configs/share_bottom.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/model_configs/widedeep.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/model_configs/xdeepfm.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/predict_config.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/predict_config_template.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/train_config.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/nextrec_cli_preset/train_config_template.yaml +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/pytest.ini +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/requirements.txt +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/scripts/format_code.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/test/__init__.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/test/conftest.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/test/helpers.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/test/run_tests.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/test/test_base_model_regularization.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/test/test_generative_models.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/test/test_layers.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/test/test_losses.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/test/test_match_models.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/test/test_multitask_models.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/test/test_preprocessor.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/test/test_ranking_models.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/test/test_utils_console.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/test/test_utils_data.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/test/test_utils_embedding.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/test_requirements.txt +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/tutorials/distributed/example_distributed_training.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/tutorials/distributed/example_distributed_training_large_dataset.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/tutorials/example_multitask.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/tutorials/example_ranking_din.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/tutorials/movielen_match_dssm.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/tutorials/movielen_ranking_deepfm.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/tutorials/notebooks/en/Build semantic ID with RQ-VAE.ipynb +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/tutorials/notebooks/en/Hands on dataprocessor.ipynb +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/tutorials/notebooks/en/Hands on nextrec.ipynb +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/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.15 → nextrec-0.4.16}/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.15 → nextrec-0.4.16}/tutorials/notebooks/zh//345/277/253/351/200/237/345/205/245/351/227/250nextrec.ipynb" +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/tutorials/run_all_match_models.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/tutorials/run_all_multitask_models.py +0 -0
- {nextrec-0.4.15 → nextrec-0.4.16}/tutorials/run_all_ranking_models.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nextrec
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.16
|
|
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
|
|
@@ -68,7 +68,7 @@ Description-Content-Type: text/markdown
|
|
|
68
68
|

|
|
69
69
|
|
|
70
70
|

|
|
71
|
-

|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
中文文档 | [English Version](README_en.md)
|
|
@@ -102,7 +102,7 @@ NextRec是一个基于PyTorch的现代推荐系统框架,旨在为研究工程
|
|
|
102
102
|
|
|
103
103
|
## NextRec近期进展
|
|
104
104
|
|
|
105
|
-
- **21/12/2025** 在v0.4.
|
|
105
|
+
- **21/12/2025** 在v0.4.16中加入了对[GradNorm](/nextrec/loss/grad_norm.py)的支持,通过compile的`loss_weight='grad_norm'`进行配置
|
|
106
106
|
- **12/12/2025** 在v0.4.9中加入了[RQ-VAE](/nextrec/models/representation/rqvae.py)模块。配套的[数据集](/dataset/ecommerce_task.csv)和[代码](tutorials/notebooks/zh/使用RQ-VAE构建语义ID.ipynb)已经同步在仓库中
|
|
107
107
|
- **07/12/2025** 发布了NextRec CLI命令行工具,它允许用户根据配置文件进行一键训练和推理,我们提供了相关的[教程](/nextrec_cli_preset/NextRec-CLI_zh.md)和[教学代码](/nextrec_cli_preset)
|
|
108
108
|
- **03/12/2025** NextRec获得了100颗🌟!感谢大家的支持
|
|
@@ -244,11 +244,11 @@ nextrec --mode=train --train_config=path/to/train_config.yaml
|
|
|
244
244
|
nextrec --mode=predict --predict_config=path/to/predict_config.yaml
|
|
245
245
|
```
|
|
246
246
|
|
|
247
|
-
> 截止当前版本0.4.
|
|
247
|
+
> 截止当前版本0.4.16,NextRec CLI支持单机训练,分布式训练相关功能尚在开发中。
|
|
248
248
|
|
|
249
249
|
## 兼容平台
|
|
250
250
|
|
|
251
|
-
当前最新版本为0.4.
|
|
251
|
+
当前最新版本为0.4.16,所有模型和测试代码均已在以下平台通过验证,如果开发者在使用中遇到兼容问题,请在issue区提出错误报告及系统版本:
|
|
252
252
|
|
|
253
253
|
| 平台 | 配置 |
|
|
254
254
|
|------|------|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|

|
|
10
10
|
|
|
11
11
|

|
|
12
|
-

|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
中文文档 | [English Version](README_en.md)
|
|
@@ -43,7 +43,7 @@ NextRec是一个基于PyTorch的现代推荐系统框架,旨在为研究工程
|
|
|
43
43
|
|
|
44
44
|
## NextRec近期进展
|
|
45
45
|
|
|
46
|
-
- **21/12/2025** 在v0.4.
|
|
46
|
+
- **21/12/2025** 在v0.4.16中加入了对[GradNorm](/nextrec/loss/grad_norm.py)的支持,通过compile的`loss_weight='grad_norm'`进行配置
|
|
47
47
|
- **12/12/2025** 在v0.4.9中加入了[RQ-VAE](/nextrec/models/representation/rqvae.py)模块。配套的[数据集](/dataset/ecommerce_task.csv)和[代码](tutorials/notebooks/zh/使用RQ-VAE构建语义ID.ipynb)已经同步在仓库中
|
|
48
48
|
- **07/12/2025** 发布了NextRec CLI命令行工具,它允许用户根据配置文件进行一键训练和推理,我们提供了相关的[教程](/nextrec_cli_preset/NextRec-CLI_zh.md)和[教学代码](/nextrec_cli_preset)
|
|
49
49
|
- **03/12/2025** NextRec获得了100颗🌟!感谢大家的支持
|
|
@@ -185,11 +185,11 @@ nextrec --mode=train --train_config=path/to/train_config.yaml
|
|
|
185
185
|
nextrec --mode=predict --predict_config=path/to/predict_config.yaml
|
|
186
186
|
```
|
|
187
187
|
|
|
188
|
-
> 截止当前版本0.4.
|
|
188
|
+
> 截止当前版本0.4.16,NextRec CLI支持单机训练,分布式训练相关功能尚在开发中。
|
|
189
189
|
|
|
190
190
|
## 兼容平台
|
|
191
191
|
|
|
192
|
-
当前最新版本为0.4.
|
|
192
|
+
当前最新版本为0.4.16,所有模型和测试代码均已在以下平台通过验证,如果开发者在使用中遇到兼容问题,请在issue区提出错误报告及系统版本:
|
|
193
193
|
|
|
194
194
|
| 平台 | 配置 |
|
|
195
195
|
|------|------|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|

|
|
10
10
|
|
|
11
11
|

|
|
12
|
-

|
|
13
13
|
|
|
14
14
|
English | [中文文档](README.md)
|
|
15
15
|
|
|
@@ -44,7 +44,7 @@ NextRec is a modern recommendation framework built on PyTorch, delivering a unif
|
|
|
44
44
|
|
|
45
45
|
## NextRec Progress
|
|
46
46
|
|
|
47
|
-
- **21/12/2025** Added support for [GradNorm](/nextrec/loss/grad_norm.py) in v0.4.
|
|
47
|
+
- **21/12/2025** Added support for [GradNorm](/nextrec/loss/grad_norm.py) in v0.4.16, configurable via `loss_weight='grad_norm'` in the compile method
|
|
48
48
|
- **12/12/2025** Added [RQ-VAE](/nextrec/models/representation/rqvae.py), a common module for generative retrieval in v0.4.9. Paired [dataset](/dataset/ecommerce_task.csv) and [notebook code](tutorials/notebooks/en/Build%20semantic%20ID%20with%20RQ-VAE.ipynb) are available.
|
|
49
49
|
- **07/12/2025** Released the NextRec CLI tool to run training/inference from configs. See the [guide](/nextrec_cli_preset/NextRec-CLI.md) and [reference code](/nextrec_cli_preset).
|
|
50
50
|
- **03/12/2025** NextRec reached 100 ⭐—thanks for the support!
|
|
@@ -188,11 +188,11 @@ nextrec --mode=train --train_config=path/to/train_config.yaml
|
|
|
188
188
|
nextrec --mode=predict --predict_config=path/to/predict_config.yaml
|
|
189
189
|
```
|
|
190
190
|
|
|
191
|
-
> As of version 0.4.
|
|
191
|
+
> As of version 0.4.16, NextRec CLI supports single-machine training; distributed training features are currently under development.
|
|
192
192
|
|
|
193
193
|
## Platform Compatibility
|
|
194
194
|
|
|
195
|
-
The current version is 0.4.
|
|
195
|
+
The current version is 0.4.16. 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:
|
|
196
196
|
|
|
197
197
|
| Platform | Configuration |
|
|
198
198
|
|----------|---------------|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.16"
|
|
@@ -77,6 +77,8 @@ def check_user_id(*metric_sources: Any) -> bool:
|
|
|
77
77
|
|
|
78
78
|
def compute_ks(y_true: np.ndarray, y_pred: np.ndarray) -> float:
|
|
79
79
|
"""Compute Kolmogorov-Smirnov statistic."""
|
|
80
|
+
y_true = np.asarray(y_true).reshape(-1)
|
|
81
|
+
y_pred = np.asarray(y_pred).reshape(-1)
|
|
80
82
|
sorted_indices = np.argsort(y_pred)[::-1]
|
|
81
83
|
y_true_sorted = y_true[sorted_indices]
|
|
82
84
|
|
|
@@ -481,7 +481,7 @@ class BaseModel(FeatureSet, nn.Module):
|
|
|
481
481
|
"[BaseModel-compile Error] loss_weights list must have exactly one element for single-task setup."
|
|
482
482
|
)
|
|
483
483
|
loss_weights = loss_weights[0]
|
|
484
|
-
self.loss_weights = [float(loss_weights)]
|
|
484
|
+
self.loss_weights = [float(loss_weights)] # type: ignore
|
|
485
485
|
else:
|
|
486
486
|
if isinstance(loss_weights, (int, float)):
|
|
487
487
|
weights = [float(loss_weights)] * self.nums_task
|
|
@@ -591,8 +591,8 @@ class BaseModel(FeatureSet, nn.Module):
|
|
|
591
591
|
|
|
592
592
|
def fit(
|
|
593
593
|
self,
|
|
594
|
-
train_data
|
|
595
|
-
valid_data
|
|
594
|
+
train_data=None,
|
|
595
|
+
valid_data=None,
|
|
596
596
|
metrics: (
|
|
597
597
|
list[str] | dict[str, list[str]] | None
|
|
598
598
|
) = None, # ['auc', 'logloss'] or {'target1': ['auc', 'logloss'], 'target2': ['mse']}
|
|
@@ -1583,8 +1583,11 @@ class BaseModel(FeatureSet, nn.Module):
|
|
|
1583
1583
|
else:
|
|
1584
1584
|
data_loader = data
|
|
1585
1585
|
|
|
1586
|
-
if hasattr(data_loader,
|
|
1587
|
-
if
|
|
1586
|
+
if hasattr(data_loader, "num_workers") and data_loader.num_workers > 0:
|
|
1587
|
+
if (
|
|
1588
|
+
hasattr(data_loader.dataset, "__class__")
|
|
1589
|
+
and "Streaming" in data_loader.dataset.__class__.__name__
|
|
1590
|
+
):
|
|
1588
1591
|
logging.warning(
|
|
1589
1592
|
f"[Predict Streaming Warning] Detected DataLoader with num_workers={data_loader.num_workers} "
|
|
1590
1593
|
"and streaming dataset. This may cause data duplication! "
|
|
@@ -28,7 +28,9 @@ if TYPE_CHECKING:
|
|
|
28
28
|
from nextrec.data.preprocessor import DataProcessor
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
def resolve_path(
|
|
31
|
+
def resolve_path(
|
|
32
|
+
path_str: str | Path | None = None, base_dir: Path | None = None
|
|
33
|
+
) -> Path:
|
|
32
34
|
if path_str is None:
|
|
33
35
|
return Path.cwd()
|
|
34
36
|
path = Path(path_str).expanduser()
|
|
@@ -36,9 +38,16 @@ def resolve_path(path_str: str | Path | None = None, base_dir: Path | None = Non
|
|
|
36
38
|
return path
|
|
37
39
|
# Prefer resolving relative to current working directory when the path (or its parent)
|
|
38
40
|
# already exists there; otherwise fall back to the config file's directory.
|
|
39
|
-
candidates = (
|
|
41
|
+
candidates = (
|
|
42
|
+
(Path.cwd() / path).resolve(),
|
|
43
|
+
((base_dir or Path.cwd()) / path).resolve(),
|
|
44
|
+
)
|
|
40
45
|
return next(
|
|
41
|
-
(
|
|
46
|
+
(
|
|
47
|
+
candidate
|
|
48
|
+
for candidate in candidates
|
|
49
|
+
if candidate.exists() or candidate.parent.exists()
|
|
50
|
+
),
|
|
42
51
|
candidates[0],
|
|
43
52
|
)
|
|
44
53
|
|
|
@@ -16,8 +16,9 @@ import numbers
|
|
|
16
16
|
import os
|
|
17
17
|
import platform
|
|
18
18
|
import sys
|
|
19
|
+
import time
|
|
19
20
|
from datetime import datetime, timedelta
|
|
20
|
-
from typing import Any, Callable,
|
|
21
|
+
from typing import Any, Callable, Mapping, TypeVar
|
|
21
22
|
|
|
22
23
|
import numpy as np
|
|
23
24
|
from rich import box
|
|
@@ -128,45 +129,85 @@ class BlackMofNCompleteColumn(MofNCompleteColumn):
|
|
|
128
129
|
)
|
|
129
130
|
|
|
130
131
|
|
|
131
|
-
def progress(
|
|
132
|
-
iterable: Iterable[T],
|
|
133
|
-
*,
|
|
134
|
-
description: str | None = None,
|
|
135
|
-
total: int | None = None,
|
|
136
|
-
disable: bool = False,
|
|
137
|
-
) -> Iterable[T]:
|
|
132
|
+
def progress(iterable, *, description=None, total=None, disable=False):
|
|
138
133
|
if disable:
|
|
139
|
-
|
|
140
|
-
yield item
|
|
134
|
+
yield from iterable
|
|
141
135
|
return
|
|
136
|
+
|
|
142
137
|
resolved_total = total
|
|
143
138
|
if resolved_total is None:
|
|
144
139
|
try:
|
|
145
|
-
resolved_total = len(iterable)
|
|
140
|
+
resolved_total = len(iterable)
|
|
146
141
|
except TypeError:
|
|
147
142
|
resolved_total = None
|
|
148
143
|
|
|
144
|
+
stream = sys.stderr
|
|
145
|
+
|
|
146
|
+
if not stream.isatty():
|
|
147
|
+
start_time = time.monotonic()
|
|
148
|
+
last_tick = start_time
|
|
149
|
+
min_interval_seconds = 10.0
|
|
150
|
+
max_interval_seconds = 300.0
|
|
151
|
+
target_steps = (
|
|
152
|
+
max(1, resolved_total // 20) if resolved_total is not None else 500
|
|
153
|
+
)
|
|
154
|
+
interval_seconds = min_interval_seconds
|
|
155
|
+
completed = 0
|
|
156
|
+
|
|
157
|
+
def emit(now: float):
|
|
158
|
+
elapsed = max(0.0, now - start_time)
|
|
159
|
+
speed = completed / elapsed if elapsed > 0 else 0.0
|
|
160
|
+
if resolved_total is not None and speed > 0:
|
|
161
|
+
remaining = max(0.0, resolved_total - completed)
|
|
162
|
+
eta_seconds = remaining / speed
|
|
163
|
+
eta_text = str(timedelta(seconds=int(eta_seconds)))
|
|
164
|
+
else:
|
|
165
|
+
eta_text = "--:--:--"
|
|
166
|
+
total_text = str(resolved_total) if resolved_total is not None else "?"
|
|
167
|
+
stream.write(
|
|
168
|
+
f"{description or 'Working'}: {completed}/{total_text} "
|
|
169
|
+
f"elapsed={timedelta(seconds=int(elapsed))} "
|
|
170
|
+
f"speed={speed:.2f}/s ETA={eta_text}\n"
|
|
171
|
+
)
|
|
172
|
+
stream.flush()
|
|
173
|
+
return speed
|
|
174
|
+
|
|
175
|
+
for item in iterable:
|
|
176
|
+
yield item
|
|
177
|
+
completed += 1
|
|
178
|
+
now = time.monotonic()
|
|
179
|
+
if now - last_tick >= interval_seconds:
|
|
180
|
+
speed = emit(now)
|
|
181
|
+
last_tick = now
|
|
182
|
+
if speed > 0:
|
|
183
|
+
interval_seconds = min(
|
|
184
|
+
max_interval_seconds,
|
|
185
|
+
max(min_interval_seconds, target_steps / speed),
|
|
186
|
+
)
|
|
187
|
+
end_now = time.monotonic()
|
|
188
|
+
if end_now - last_tick >= 1e-6:
|
|
189
|
+
emit(end_now)
|
|
190
|
+
return
|
|
191
|
+
|
|
192
|
+
# TTY: rich
|
|
193
|
+
console = Console(file=stream, force_terminal=True)
|
|
149
194
|
progress_bar = Progress(
|
|
150
|
-
SpinnerColumn(
|
|
151
|
-
TextColumn("{task.description}"
|
|
152
|
-
BarColumn(
|
|
153
|
-
|
|
154
|
-
),
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
BlackTimeElapsedColumn(),
|
|
158
|
-
BlackTimeRemainingColumn(),
|
|
195
|
+
SpinnerColumn(),
|
|
196
|
+
TextColumn("{task.description}"),
|
|
197
|
+
BarColumn(bar_width=36),
|
|
198
|
+
TaskProgressColumn(),
|
|
199
|
+
MofNCompleteColumn(),
|
|
200
|
+
TimeElapsedColumn(),
|
|
201
|
+
TimeRemainingColumn(),
|
|
159
202
|
refresh_per_second=12,
|
|
203
|
+
console=console,
|
|
160
204
|
)
|
|
161
205
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
try:
|
|
206
|
+
with progress_bar:
|
|
207
|
+
task_id = progress_bar.add_task(description or "Working", total=resolved_total)
|
|
165
208
|
for item in iterable:
|
|
166
209
|
yield item
|
|
167
210
|
progress_bar.advance(task_id, 1)
|
|
168
|
-
finally:
|
|
169
|
-
progress_bar.stop()
|
|
170
211
|
|
|
171
212
|
|
|
172
213
|
def group_metrics_by_task(
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.4.15"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nextrec-0.4.15 → nextrec-0.4.16}/docs/zh//345/277/253/351/200/237/344/270/212/346/211/213.md"
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nextrec-0.4.15 → nextrec-0.4.16}/tutorials/notebooks/en/Build semantic ID with RQ-VAE.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|