nextrec 0.4.13__tar.gz → 0.4.14__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.14/.github/workflows/publish.yml +107 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/PKG-INFO +6 -5
- {nextrec-0.4.13 → nextrec-0.4.14}/README.md +5 -4
- {nextrec-0.4.13 → nextrec-0.4.14}/README_en.md +5 -4
- {nextrec-0.4.13 → nextrec-0.4.14}/docs/rtd/conf.py +1 -1
- nextrec-0.4.14/nextrec/__version__.py +1 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/basic/model.py +12 -6
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/data/dataloader.py +1 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/utils/config.py +8 -8
- {nextrec-0.4.13 → nextrec-0.4.14}/pyproject.toml +1 -1
- nextrec-0.4.13/.github/workflows/publish.yml +0 -65
- nextrec-0.4.13/nextrec/__version__.py +0 -1
- {nextrec-0.4.13 → nextrec-0.4.14}/.github/workflows/tests.yml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/.gitignore +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/.readthedocs.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/CODE_OF_CONDUCT.md +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/CONTRIBUTING.md +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/LICENSE +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/MANIFEST.in +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/assets/Feature Configuration.png +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/assets/Model Parameters.png +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/assets/Training Configuration.png +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/assets/Training logs.png +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/assets/logo.png +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/assets/mmoe_tutorial.png +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/assets/nextrec_diagram.png +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/assets/test data.png +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/dataset/ctcvr_task.csv +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/dataset/ecommerce_task.csv +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/dataset/match_task.csv +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/dataset/movielens_100k.csv +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/dataset/multitask_task.csv +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/dataset/ranking_task.csv +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/docs/en/Getting started guide.md +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/docs/rtd/Makefile +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/docs/rtd/index.md +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/docs/rtd/make.bat +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/docs/rtd/modules.rst +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/docs/rtd/nextrec.basic.rst +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/docs/rtd/nextrec.data.rst +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/docs/rtd/nextrec.loss.rst +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/docs/rtd/nextrec.rst +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/docs/rtd/nextrec.utils.rst +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/docs/rtd/requirements.txt +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/docs/zh//345/277/253/351/200/237/344/270/212/346/211/213.md" +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/__init__.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/basic/__init__.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/basic/activation.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/basic/callback.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/basic/features.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/basic/layers.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/basic/loggers.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/basic/metrics.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/basic/session.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/cli.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/data/__init__.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/data/batch_utils.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/data/data_processing.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/data/data_utils.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/data/preprocessor.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/loss/__init__.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/loss/grad_norm.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/loss/listwise.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/loss/loss_utils.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/loss/pairwise.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/loss/pointwise.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/generative/__init__.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/generative/tiger.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/multi_task/__init__.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/multi_task/esmm.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/multi_task/mmoe.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/multi_task/ple.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/multi_task/poso.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/multi_task/share_bottom.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/ranking/__init__.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/ranking/afm.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/ranking/autoint.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/ranking/dcn.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/ranking/dcn_v2.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/ranking/deepfm.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/ranking/dien.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/ranking/din.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/ranking/eulernet.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/ranking/ffm.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/ranking/fibinet.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/ranking/fm.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/ranking/lr.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/ranking/masknet.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/ranking/pnn.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/ranking/widedeep.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/ranking/xdeepfm.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/representation/__init__.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/representation/autorec.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/representation/bpr.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/representation/cl4srec.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/representation/lightgcn.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/representation/mf.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/representation/rqvae.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/representation/s3rec.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/retrieval/__init__.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/retrieval/dssm.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/retrieval/dssm_v2.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/retrieval/mind.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/retrieval/sdm.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/retrieval/youtube_dnn.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/sequential/hstu.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/models/sequential/sasrec.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/utils/__init__.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/utils/console.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/utils/data.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/utils/embedding.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/utils/feature.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/utils/model.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec/utils/torch_utils.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/NextRec-CLI.md +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/NextRec-CLI_zh.md +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/feature_config.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/model_configs/afm.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/model_configs/autoint.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/model_configs/dcn.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/model_configs/deepfm.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/model_configs/din.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/model_configs/esmm.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/model_configs/fibinet.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/model_configs/fm.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/model_configs/masknet.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/model_configs/mmoe.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/model_configs/ple.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/model_configs/pnn.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/model_configs/poso.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/model_configs/share_bottom.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/model_configs/widedeep.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/model_configs/xdeepfm.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/predict_config.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/predict_config_template.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/train_config.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/nextrec_cli_preset/train_config_template.yaml +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/pytest.ini +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/requirements.txt +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/scripts/format_code.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/test/__init__.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/test/conftest.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/test/helpers.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/test/run_tests.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/test/test_base_model_regularization.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/test/test_generative_models.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/test/test_layers.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/test/test_losses.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/test/test_match_models.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/test/test_multitask_models.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/test/test_preprocessor.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/test/test_ranking_models.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/test/test_utils_console.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/test/test_utils_data.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/test/test_utils_embedding.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/test_requirements.txt +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/tutorials/distributed/example_distributed_training.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/tutorials/distributed/example_distributed_training_large_dataset.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/tutorials/example_multitask.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/tutorials/example_ranking_din.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/tutorials/movielen_match_dssm.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/tutorials/movielen_ranking_deepfm.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/tutorials/notebooks/en/Build semantic ID with RQ-VAE.ipynb +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/tutorials/notebooks/en/Hands on dataprocessor.ipynb +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/tutorials/notebooks/en/Hands on nextrec.ipynb +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/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.13 → nextrec-0.4.14}/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.13 → nextrec-0.4.14}/tutorials/notebooks/zh//345/277/253/351/200/237/345/205/245/351/227/250nextrec.ipynb" +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/tutorials/run_all_match_models.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/tutorials/run_all_multitask_models.py +0 -0
- {nextrec-0.4.13 → nextrec-0.4.14}/tutorials/run_all_ranking_models.py +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- dev
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
check-version:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
outputs:
|
|
14
|
+
changed: ${{ steps.version.outputs.changed }}
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout code
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
|
|
21
|
+
- name: Compare project version
|
|
22
|
+
id: version
|
|
23
|
+
run: |
|
|
24
|
+
before="${{ github.event.before }}"
|
|
25
|
+
after="${{ github.sha }}"
|
|
26
|
+
zero_sha="0000000000000000000000000000000000000000"
|
|
27
|
+
|
|
28
|
+
if [ -z "$before" ] || [ "$before" = "$zero_sha" ]; then
|
|
29
|
+
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
30
|
+
exit 0
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
get_version() {
|
|
34
|
+
git show "$1:pyproject.toml" | grep -m 1 '^version[[:space:]]*=' | sed -E 's/.*"([^"]+)".*/\1/'
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
before_version="$(get_version "$before" || true)"
|
|
38
|
+
after_version="$(get_version "$after" || true)"
|
|
39
|
+
|
|
40
|
+
if [ -z "$before_version" ] || [ -z "$after_version" ]; then
|
|
41
|
+
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
42
|
+
exit 0
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
if [ "$before_version" = "$after_version" ]; then
|
|
46
|
+
echo "changed=false" >> "$GITHUB_OUTPUT"
|
|
47
|
+
else
|
|
48
|
+
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
# dev -> TestPyPI
|
|
52
|
+
publish-to-testpypi:
|
|
53
|
+
needs: check-version
|
|
54
|
+
if: needs.check-version.outputs.changed == 'true' && github.ref == 'refs/heads/dev'
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
steps:
|
|
57
|
+
- name: Checkout code
|
|
58
|
+
uses: actions/checkout@v4
|
|
59
|
+
|
|
60
|
+
- name: Set up Python
|
|
61
|
+
uses: actions/setup-python@v5
|
|
62
|
+
with:
|
|
63
|
+
python-version: '3.10'
|
|
64
|
+
|
|
65
|
+
- name: Install build tools
|
|
66
|
+
run: |
|
|
67
|
+
pip install build twine
|
|
68
|
+
|
|
69
|
+
- name: Build package
|
|
70
|
+
run: |
|
|
71
|
+
python -m build
|
|
72
|
+
|
|
73
|
+
- name: Publish to TestPyPI
|
|
74
|
+
env:
|
|
75
|
+
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
|
|
76
|
+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
|
|
77
|
+
run: |
|
|
78
|
+
twine upload --verbose --repository testpypi dist/*
|
|
79
|
+
|
|
80
|
+
# main -> PyPI
|
|
81
|
+
publish-to-pypi:
|
|
82
|
+
needs: check-version
|
|
83
|
+
if: needs.check-version.outputs.changed == 'true' && github.ref == 'refs/heads/main'
|
|
84
|
+
runs-on: ubuntu-latest
|
|
85
|
+
steps:
|
|
86
|
+
- name: Checkout code
|
|
87
|
+
uses: actions/checkout@v4
|
|
88
|
+
|
|
89
|
+
- name: Set up Python
|
|
90
|
+
uses: actions/setup-python@v5
|
|
91
|
+
with:
|
|
92
|
+
python-version: '3.10'
|
|
93
|
+
|
|
94
|
+
- name: Install build tools
|
|
95
|
+
run: |
|
|
96
|
+
pip install build twine
|
|
97
|
+
|
|
98
|
+
- name: Build package
|
|
99
|
+
run: |
|
|
100
|
+
python -m build
|
|
101
|
+
|
|
102
|
+
- name: Publish to PyPI
|
|
103
|
+
env:
|
|
104
|
+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
|
105
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
|
106
|
+
run: |
|
|
107
|
+
twine upload --verbose dist/*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nextrec
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.14
|
|
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
|
|
@@ -66,7 +66,7 @@ Description-Content-Type: text/markdown
|
|
|
66
66
|

|
|
67
67
|

|
|
68
68
|

|
|
69
|
-

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

|
|
8
8
|

|
|
9
9
|

|
|
10
|
-

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

|
|
8
8
|

|
|
9
9
|

|
|
10
|
-

|
|
11
11
|
|
|
12
12
|
English | [中文文档](README.md)
|
|
13
13
|
|
|
@@ -42,7 +42,8 @@ NextRec is a modern recommendation framework built on PyTorch, delivering a unif
|
|
|
42
42
|
|
|
43
43
|
## NextRec Progress
|
|
44
44
|
|
|
45
|
-
- **
|
|
45
|
+
- **21/12/2025** Added support for [GradNorm](/nextrec/loss/grad_norm.py) in v0.4.14, configurable via `loss_weight='grad_norm'` in the compile method
|
|
46
|
+
- **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.
|
|
46
47
|
- **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).
|
|
47
48
|
- **03/12/2025** NextRec reached 100 ⭐—thanks for the support!
|
|
48
49
|
- **06/12/2025** Added single-machine multi-GPU DDP training in v0.4.1 with supporting [code](tutorials/distributed).
|
|
@@ -185,11 +186,11 @@ nextrec --mode=train --train_config=path/to/train_config.yaml
|
|
|
185
186
|
nextrec --mode=predict --predict_config=path/to/predict_config.yaml
|
|
186
187
|
```
|
|
187
188
|
|
|
188
|
-
> As of version 0.4.
|
|
189
|
+
> As of version 0.4.14, NextRec CLI supports single-machine training; distributed training features are currently under development.
|
|
189
190
|
|
|
190
191
|
## Platform Compatibility
|
|
191
192
|
|
|
192
|
-
The current version is 0.4.
|
|
193
|
+
The current version is 0.4.14. 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:
|
|
193
194
|
|
|
194
195
|
| Platform | Configuration |
|
|
195
196
|
|----------|---------------|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.14"
|
|
@@ -341,7 +341,7 @@ class BaseModel(FeatureSet, nn.Module):
|
|
|
341
341
|
)
|
|
342
342
|
else:
|
|
343
343
|
raise TypeError(
|
|
344
|
-
f"[BaseModel-validation Error] train_data must be a pandas DataFrame or a dict
|
|
344
|
+
f"[BaseModel-validation Error] If you want to use validation_split, train_data must be a pandas DataFrame or a dict instead of {type(train_data)}"
|
|
345
345
|
)
|
|
346
346
|
rng = np.random.default_rng(42)
|
|
347
347
|
indices = rng.permutation(total_length)
|
|
@@ -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
|
|
@@ -555,13 +555,13 @@ class BaseModel(FeatureSet, nn.Module):
|
|
|
555
555
|
|
|
556
556
|
def prepare_data_loader(
|
|
557
557
|
self,
|
|
558
|
-
data
|
|
558
|
+
data,
|
|
559
559
|
batch_size: int = 32,
|
|
560
560
|
shuffle: bool = True,
|
|
561
561
|
num_workers: int = 0,
|
|
562
562
|
sampler=None,
|
|
563
563
|
return_dataset: bool = False,
|
|
564
|
-
)
|
|
564
|
+
):
|
|
565
565
|
"""
|
|
566
566
|
Prepare a DataLoader from input data. Only used when input data is not a DataLoader.
|
|
567
567
|
"""
|
|
@@ -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']}
|
|
@@ -1943,6 +1943,12 @@ class BaseModel(FeatureSet, nn.Module):
|
|
|
1943
1943
|
logger.info(f"Loss Function: {self.loss_config}")
|
|
1944
1944
|
if hasattr(self, "loss_weights"):
|
|
1945
1945
|
logger.info(f"Loss Weights: {self.loss_weights}")
|
|
1946
|
+
if hasattr(self, "grad_norm"):
|
|
1947
|
+
logger.info(f"GradNorm Enabled: {self.grad_norm is not None}")
|
|
1948
|
+
if self.grad_norm is not None:
|
|
1949
|
+
grad_lr = self.grad_norm.optimizer.param_groups[0].get("lr")
|
|
1950
|
+
logger.info(f" GradNorm alpha: {self.grad_norm.alpha}")
|
|
1951
|
+
logger.info(f" GradNorm lr: {grad_lr}")
|
|
1946
1952
|
|
|
1947
1953
|
logger.info("Regularization:")
|
|
1948
1954
|
logger.info(f" Embedding L1: {self.embedding_l1_reg}")
|
|
@@ -28,19 +28,19 @@ if TYPE_CHECKING:
|
|
|
28
28
|
from nextrec.data.preprocessor import DataProcessor
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
def resolve_path(path_str: str | Path, base_dir: Path) -> Path:
|
|
31
|
+
def resolve_path(path_str: str | Path | None = None, base_dir: Path | None = None) -> Path:
|
|
32
|
+
if path_str is None:
|
|
33
|
+
return Path.cwd()
|
|
32
34
|
path = Path(path_str).expanduser()
|
|
33
35
|
if path.is_absolute():
|
|
34
36
|
return path
|
|
35
37
|
# Prefer resolving relative to current working directory when the path (or its parent)
|
|
36
38
|
# already exists there; otherwise fall back to the config file's directory.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return base_dir_path
|
|
43
|
-
return cwd_path
|
|
39
|
+
candidates = ((Path.cwd() / path).resolve(), ((base_dir or Path.cwd()) / path).resolve())
|
|
40
|
+
return next(
|
|
41
|
+
(candidate for candidate in candidates if candidate.exists() or candidate.parent.exists()),
|
|
42
|
+
candidates[0],
|
|
43
|
+
)
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
def select_features(
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
name: Publish to PyPI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
- dev
|
|
8
|
-
workflow_dispatch:
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
# dev -> TestPyPI
|
|
12
|
-
publish-to-testpypi:
|
|
13
|
-
if: github.ref == 'refs/heads/dev'
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
steps:
|
|
16
|
-
- name: Checkout code
|
|
17
|
-
uses: actions/checkout@v4
|
|
18
|
-
|
|
19
|
-
- name: Set up Python
|
|
20
|
-
uses: actions/setup-python@v5
|
|
21
|
-
with:
|
|
22
|
-
python-version: '3.10'
|
|
23
|
-
|
|
24
|
-
- name: Install build tools
|
|
25
|
-
run: |
|
|
26
|
-
pip install build twine
|
|
27
|
-
|
|
28
|
-
- name: Build package
|
|
29
|
-
run: |
|
|
30
|
-
python -m build
|
|
31
|
-
|
|
32
|
-
- name: Publish to TestPyPI
|
|
33
|
-
env:
|
|
34
|
-
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
|
|
35
|
-
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
|
|
36
|
-
run: |
|
|
37
|
-
twine upload --verbose --repository testpypi dist/*
|
|
38
|
-
|
|
39
|
-
# main -> PyPI
|
|
40
|
-
publish-to-pypi:
|
|
41
|
-
if: github.ref == 'refs/heads/main'
|
|
42
|
-
runs-on: ubuntu-latest
|
|
43
|
-
steps:
|
|
44
|
-
- name: Checkout code
|
|
45
|
-
uses: actions/checkout@v4
|
|
46
|
-
|
|
47
|
-
- name: Set up Python
|
|
48
|
-
uses: actions/setup-python@v5
|
|
49
|
-
with:
|
|
50
|
-
python-version: '3.10'
|
|
51
|
-
|
|
52
|
-
- name: Install build tools
|
|
53
|
-
run: |
|
|
54
|
-
pip install build twine
|
|
55
|
-
|
|
56
|
-
- name: Build package
|
|
57
|
-
run: |
|
|
58
|
-
python -m build
|
|
59
|
-
|
|
60
|
-
- name: Publish to PyPI
|
|
61
|
-
env:
|
|
62
|
-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
|
63
|
-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
|
64
|
-
run: |
|
|
65
|
-
twine upload --verbose dist/*
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.4.13"
|
|
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.13 → nextrec-0.4.14}/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
|
|
File without changes
|
{nextrec-0.4.13 → nextrec-0.4.14}/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
|