torch-rechub 0.2.0__tar.gz → 0.3.0__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.
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/CHANGELOG.md +21 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/PKG-INFO +5 -1
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/README.md +4 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/README_en.md +1 -0
- torch_rechub-0.3.0/docs/en/community/changelog.md +9 -0
- torch_rechub-0.3.0/docs/en/community/contributing.md +177 -0
- torch_rechub-0.3.0/docs/en/community/faq.md +82 -0
- torch_rechub-0.3.0/docs/en/core/data.md +159 -0
- torch_rechub-0.3.0/docs/en/guide/install.md +94 -0
- torch_rechub-0.3.0/docs/en/guide/intro.md +97 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/index.md +2 -2
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/manual/tutorials/matching.md +5 -5
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/manual/tutorials/multi-task.md +5 -5
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/manual/tutorials/ranking.md +3 -3
- torch_rechub-0.3.0/docs/en/models/generative.md +310 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/models/intro.md +4 -0
- torch_rechub-0.3.0/docs/en/models/matching.md +840 -0
- torch_rechub-0.3.0/docs/en/models/mtl.md +451 -0
- torch_rechub-0.3.0/docs/en/models/ranking.md +677 -0
- torch_rechub-0.3.0/docs/en/serving/demo.md +110 -0
- torch_rechub-0.3.0/docs/en/serving/intro.md +85 -0
- torch_rechub-0.3.0/docs/en/serving/onnx.md +84 -0
- torch_rechub-0.3.0/docs/en/tools/callbacks.md +155 -0
- torch_rechub-0.3.0/docs/en/tools/intro.md +144 -0
- torch_rechub-0.3.0/docs/en/tools/visualization.md +228 -0
- torch_rechub-0.3.0/docs/en/tutorials/ctr.md +205 -0
- torch_rechub-0.3.0/docs/en/tutorials/intro.md +50 -0
- torch_rechub-0.3.0/docs/en/tutorials/pipeline.md +194 -0
- torch_rechub-0.3.0/docs/en/tutorials/retrieval.md +207 -0
- torch_rechub-0.3.0/docs/public/favicon.ico +0 -0
- torch_rechub-0.3.0/docs/public/img/logo.png +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/core/data.md +76 -0
- torch_rechub-0.3.0/docs/zh/serving/demo.md +111 -0
- torch_rechub-0.3.0/docs/zh/serving/intro.md +86 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/serving/onnx.md +10 -0
- torch_rechub-0.3.0/docs/zh/tools/callbacks.md +155 -0
- torch_rechub-0.3.0/docs/zh/tools/intro.md +144 -0
- torch_rechub-0.3.0/docs/zh/tools/visualization.md +233 -0
- torch_rechub-0.3.0/docs/zh/tutorials/ctr.md +206 -0
- torch_rechub-0.3.0/docs/zh/tutorials/intro.md +51 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/tutorials/pipeline.md +5 -5
- torch_rechub-0.3.0/docs/zh/tutorials/retrieval.md +208 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/pyproject.toml +1 -1
- torch_rechub-0.3.0/tests/test_inbatch_sampling.py +78 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/basic/loss_func.py +10 -4
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/matching/narm.py +43 -20
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/matching/sasrec.py +55 -5
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/matching/stamp.py +43 -15
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/trainers/match_trainer.py +54 -6
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/utils/match.py +61 -1
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tutorials/Matching.ipynb +96 -122
- torch_rechub-0.2.0/docs/en/community/changelog.md +0 -0
- torch_rechub-0.2.0/docs/en/community/contributing.md +0 -0
- torch_rechub-0.2.0/docs/en/community/faq.md +0 -0
- torch_rechub-0.2.0/docs/en/core/data.md +0 -86
- torch_rechub-0.2.0/docs/en/guide/install.md +0 -0
- torch_rechub-0.2.0/docs/en/guide/intro.md +0 -78
- torch_rechub-0.2.0/docs/en/models/generative.md +0 -128
- torch_rechub-0.2.0/docs/en/models/matching.md +0 -72
- torch_rechub-0.2.0/docs/en/models/mtl.md +0 -57
- torch_rechub-0.2.0/docs/en/models/ranking.md +0 -69
- torch_rechub-0.2.0/docs/en/serving/demo.md +0 -0
- torch_rechub-0.2.0/docs/en/serving/intro.md +0 -0
- torch_rechub-0.2.0/docs/en/serving/onnx.md +0 -0
- torch_rechub-0.2.0/docs/en/tools/callbacks.md +0 -0
- torch_rechub-0.2.0/docs/en/tools/intro.md +0 -0
- torch_rechub-0.2.0/docs/en/tools/visualization.md +0 -0
- torch_rechub-0.2.0/docs/en/tutorials/ctr.md +0 -0
- torch_rechub-0.2.0/docs/en/tutorials/intro.md +0 -0
- torch_rechub-0.2.0/docs/en/tutorials/pipeline.md +0 -0
- torch_rechub-0.2.0/docs/en/tutorials/retrieval.md +0 -0
- torch_rechub-0.2.0/docs/public/favicon.ico +0 -0
- torch_rechub-0.2.0/docs/public/img/logo.png +0 -0
- torch_rechub-0.2.0/docs/zh/serving/demo.md +0 -9
- torch_rechub-0.2.0/docs/zh/serving/intro.md +0 -9
- torch_rechub-0.2.0/docs/zh/tools/callbacks.md +0 -9
- torch_rechub-0.2.0/docs/zh/tools/intro.md +0 -9
- torch_rechub-0.2.0/docs/zh/tools/visualization.md +0 -9
- torch_rechub-0.2.0/docs/zh/tutorials/ctr.md +0 -186
- torch_rechub-0.2.0/docs/zh/tutorials/intro.md +0 -9
- torch_rechub-0.2.0/docs/zh/tutorials/retrieval.md +0 -155
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/.github/ISSUE_TEMPLATE/help_wanted.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/.github/dependabot.yml +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/.github/pull_request_template.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/.github/release.yml +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/.github/workflows/ci.yml +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/.github/workflows/deploy.yml +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/.gitignore +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/.pre-commit-config.yaml +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/CODE_OF_CONDUCT.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/CONTRIBUTING.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/LICENSE +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/config/.flake8 +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/config/.pep8 +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/config/.pre-commit-config.yaml +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/config/CONFIG_GUIDE.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/config/fix_encoding.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/config/format_code.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/config/pytest.ini +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/.vitepress/config.mts +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/.vitepress/theme/custom.css +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/.vitepress/theme/index.ts +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/.vitepress/theme/style.css +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/cache/api-basic.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/cache/api-models.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/cache/api-trainers.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/cache/api-utils.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/cache/hllm_reproduction.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/cache/hstu_reproduction.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/cache/match.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/cache/rank.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/cache//345/217/202/350/200/203/350/265/204/346/226/231.md" +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/api/api.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/blog/hllm_reproduction.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/blog/match.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/blog/rank.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/contributing.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/core/evaluation.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/core/features.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/core/intro.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/guide/quick_start.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/manual/api-reference/basic.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/manual/api-reference/models.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/manual/api-reference/trainers.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/manual/api-reference/utils.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/manual/faq.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/manual/getting-started.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/manual/installation.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/serving/vector_index.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/en/tools/tracking.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/img/banner.png +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/img/logo_with_name.png +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/img/project_framework.png +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/img/project_framework_old.jpg +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/img/win_install_annoy_error.png +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/1606.07792_l8JrVnuYXA.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/1703.04247_sFSyE7q3U1.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/1706.06978_0xZD_K10S2.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/1708.05123_f3lKSqxIvw.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/1711.00165_eosOSOmTfE.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/1804.07931_ybf_jOAFRp.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/1808.09781-3_bmRm284Rxd.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/1808.09781v1.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/1905.06336_2oH3RMtROA.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/2006.11632_qiN67CrHNs.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/2020 (Tencent) (Recsys) [PLE] Progressive Layered .pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/2102.09267_cdwBFKPCrj.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/2105.08489-2_XnVVGxN9GG.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/2203.06801v1-3_qUTY4TbvSL.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/2959100.2959190_jRzTU81Xmq.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/3219819.3219950_aTMFXHL3JB.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/3219819.3220007_zvaZg_CZ6z.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/4545-Article Text-7584-1-10-20190706.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/6c8a86c981a62b0126a11896b7f6ae0dae4c3566_1QYYhqJR8.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/Caruana1997_Article_MultitaskLearning_ySprcjzJ6v.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/DCN V2 Improved Deep & Cross Network and Practical.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/public/pdf/cikm2013_DSSM_fullversion_c9ZSdM19XJ.pdf +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/api/api.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/community/changelog.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/community/contributing.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/community/faq.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/core/evaluation.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/core/features.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/core/intro.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/guide/install.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/guide/intro.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/guide/quick_start.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/index.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/models/generative.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/models/intro.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/models/matching.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/models/mtl.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/models/ranking.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/serving/vector_index.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/docs/zh/tools/tracking.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/generative/data/amazon-books/README.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/generative/data/amazon-books/preprocess_amazon_books.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/generative/data/amazon-books/preprocess_amazon_books_hllm.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/generative/data/ml-1m/README +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/generative/data/ml-1m/preprocess_hllm_data.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/generative/data/ml-1m/preprocess_ml_hstu.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/generative/run_hllm_amazon_books.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/generative/run_hllm_movielens.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/generative/run_hstu_movielens.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/matching/README.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/matching/data/million-song-dataset/process_msd.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/matching/data/ml-1m/preprocess_ml.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/matching/data/session_based/preprocess_session_based.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/matching/data/yidian_news/preprocess.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/matching/movielens_utils.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/matching/run_ml_comirec.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/matching/run_ml_dssm.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/matching/run_ml_facebook_dssm.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/matching/run_ml_gru4rec.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/matching/run_ml_mind.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/matching/run_ml_sine.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/matching/run_ml_youtube_dnn.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/matching/run_ml_youtube_sbc.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/matching/run_sbr.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/ranking/README.md +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/ranking/data/ali-ccp/preprocess_ali_ccp.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/ranking/data/amazon-beauty/preprocess_amazon_beauty.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/ranking/data/amazon-books/preprocess_amazon_books.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/ranking/data/amazon-electronics/preprocess_amazon_electronics.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/ranking/data/avazu/download_avazu.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/ranking/data/census-income/preprocess_census.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/ranking/run_ali_ccp_ctr_ranking.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/ranking/run_ali_ccp_multi_task.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/ranking/run_aliexpress.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/ranking/run_amazon_electronics.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/ranking/run_avazu.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/ranking/run_census.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/ranking/run_criteo.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/ranking/run_gradnorm.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/ranking/run_metabalance.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/serving/benchmark_onnx_quantization.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/examples/serving/quantize_onnx.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/package-lock.json +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/package.json +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tests/test_e2e_matching.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tests/test_e2e_multitask.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tests/test_e2e_ranking.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tests/test_onnx_export.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tests/test_onnx_quantization.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tests/test_pa_array_to_tensor.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tests/test_parquet_dataset.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tests/test_regularization.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tests/test_serving.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/__init__.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/basic/__init__.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/basic/activation.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/basic/callback.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/basic/features.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/basic/initializers.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/basic/layers.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/basic/metaoptimizer.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/basic/metric.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/basic/tracking.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/data/__init__.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/data/convert.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/data/dataset.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/__init__.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/generative/__init__.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/generative/hllm.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/generative/hstu.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/matching/__init__.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/matching/comirec.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/matching/dssm.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/matching/dssm_facebook.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/matching/dssm_senet.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/matching/gru4rec.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/matching/mind.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/matching/sine.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/matching/youtube_dnn.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/matching/youtube_sbc.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/multi_task/__init__.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/multi_task/aitm.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/multi_task/esmm.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/multi_task/mmoe.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/multi_task/ple.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/multi_task/shared_bottom.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/ranking/__init__.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/ranking/afm.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/ranking/autoint.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/ranking/bst.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/ranking/dcn.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/ranking/dcn_v2.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/ranking/deepffm.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/ranking/deepfm.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/ranking/dien.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/ranking/din.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/ranking/edcn.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/ranking/fibinet.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/models/ranking/widedeep.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/serving/__init__.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/serving/annoy.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/serving/base.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/serving/faiss.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/serving/milvus.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/trainers/__init__.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/trainers/ctr_trainer.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/trainers/mtl_trainer.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/trainers/seq_trainer.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/types.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/utils/__init__.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/utils/data.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/utils/hstu_utils.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/utils/model_utils.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/utils/mtl.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/utils/onnx_export.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/utils/quantization.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/torch_rechub/utils/visualization.py +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tutorials/00_QuickStart_CTR_DeepFM.ipynb +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tutorials/01_Ranking_DIN.ipynb +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tutorials/02_Matching_DSSM.ipynb +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tutorials/03_MultiTask_MMOE.ipynb +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tutorials/04_Experiment_Tracking_Light.ipynb +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tutorials/05_Model_Export_and_Serving.ipynb +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tutorials/DIN.ipynb +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tutorials/DeepFM.ipynb +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tutorials/Milvus.ipynb +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/tutorials/Multi_Task.ipynb +0 -0
- {torch_rechub-0.2.0 → torch_rechub-0.3.0}/uv.lock +0 -0
|
@@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [0.3.0] - 2026-02-05
|
|
11
|
+
|
|
12
|
+
<!-- Release notes generated using configuration in .github/release.yml at main -->
|
|
13
|
+
|
|
14
|
+
## What's Changed
|
|
15
|
+
### ✨ 新特性 / Features
|
|
16
|
+
* Inbatchsample by @zerolovesea in https://github.com/datawhalechina/torch-rechub/pull/128
|
|
17
|
+
### 📝 文档更新 / Documentation
|
|
18
|
+
* Enhance docs: ONNX, serving, tools, tutorials by @1985312383 in https://github.com/datawhalechina/torch-rechub/pull/165
|
|
19
|
+
* Expand docs: community, guides, models, data by @1985312383 in https://github.com/datawhalechina/torch-rechub/pull/166
|
|
20
|
+
### 🔄 其他变更 / Other Changes
|
|
21
|
+
* Update favicon and logo images by @1985312383 in https://github.com/datawhalechina/torch-rechub/pull/164
|
|
22
|
+
* Update docs imports to torch_rechub by @1985312383 in https://github.com/datawhalechina/torch-rechub/pull/167
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
**Full Changelog**: https://github.com/datawhalechina/torch-rechub/compare/v0.2.0...v0.3.0
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
10
31
|
## [0.2.0] - 2026-01-11
|
|
11
32
|
|
|
12
33
|
<!-- Release notes generated using configuration in .github/release.yml at main -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: torch-rechub
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: A Pytorch Toolbox for Recommendation Models, Easy-to-use and Easy-to-extend.
|
|
5
5
|
Project-URL: Homepage, https://github.com/datawhalechina/torch-rechub
|
|
6
6
|
Project-URL: Documentation, https://www.torch-rechub.com
|
|
@@ -66,6 +66,8 @@ Description-Content-Type: text/markdown
|
|
|
66
66
|
|
|
67
67
|
# Torch-RecHub: 轻量、高效、易用的 PyTorch 推荐系统框架
|
|
68
68
|
|
|
69
|
+
【⚠️ Alpha内测版本警告:此为早期内部构建版本,尚不完整且可能存在错误,欢迎大家提Issue反馈问题或建议。】
|
|
70
|
+
|
|
69
71
|
[](LICENSE)
|
|
70
72
|

|
|
71
73
|

|
|
@@ -77,6 +79,7 @@ Description-Content-Type: text/markdown
|
|
|
77
79
|
[](https://numpy.org/)
|
|
78
80
|
[](https://scikit-learn.org/)
|
|
79
81
|
[](https://pypi.org/project/torch-rechub/)
|
|
82
|
+
[](https://github.com/mert-kurttutan/torchview)
|
|
80
83
|
|
|
81
84
|
[English](README_en.md) | 简体中文
|
|
82
85
|
|
|
@@ -90,6 +93,7 @@ Description-Content-Type: text/markdown
|
|
|
90
93
|
|
|
91
94
|
## ✨ 特性
|
|
92
95
|
|
|
96
|
+
* **生成式推荐模型:** LLM时代下,可以复现部分生成式推荐模型
|
|
93
97
|
* **模块化设计:** 易于添加新的模型、数据集和评估指标。
|
|
94
98
|
* **基于 PyTorch:** 利用 PyTorch 的动态图和 GPU 加速能力。
|
|
95
99
|
* **丰富的模型库:** 涵盖 **30+** 经典和前沿推荐算法(召回、排序、多任务、生成式推荐等)。
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
# Torch-RecHub: 轻量、高效、易用的 PyTorch 推荐系统框架
|
|
6
6
|
|
|
7
|
+
【⚠️ Alpha内测版本警告:此为早期内部构建版本,尚不完整且可能存在错误,欢迎大家提Issue反馈问题或建议。】
|
|
8
|
+
|
|
7
9
|
[](LICENSE)
|
|
8
10
|

|
|
9
11
|

|
|
@@ -15,6 +17,7 @@
|
|
|
15
17
|
[](https://numpy.org/)
|
|
16
18
|
[](https://scikit-learn.org/)
|
|
17
19
|
[](https://pypi.org/project/torch-rechub/)
|
|
20
|
+
[](https://github.com/mert-kurttutan/torchview)
|
|
18
21
|
|
|
19
22
|
[English](README_en.md) | 简体中文
|
|
20
23
|
|
|
@@ -28,6 +31,7 @@
|
|
|
28
31
|
|
|
29
32
|
## ✨ 特性
|
|
30
33
|
|
|
34
|
+
* **生成式推荐模型:** LLM时代下,可以复现部分生成式推荐模型
|
|
31
35
|
* **模块化设计:** 易于添加新的模型、数据集和评估指标。
|
|
32
36
|
* **基于 PyTorch:** 利用 PyTorch 的动态图和 GPU 加速能力。
|
|
33
37
|
* **丰富的模型库:** 涵盖 **30+** 经典和前沿推荐算法(召回、排序、多任务、生成式推荐等)。
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
[](https://numpy.org/)
|
|
16
16
|
[](https://scikit-learn.org/)
|
|
17
17
|
[](https://pypi.org/project/torch-rechub/)
|
|
18
|
+
[](https://github.com/mert-kurttutan/torchview)
|
|
18
19
|
|
|
19
20
|
English | [简体中文](README.md)
|
|
20
21
|
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Contributing Guide
|
|
3
|
+
description: Torch-RecHub project contribution guide, including bug reports, feature requests, and pull request process
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Contributing Guide
|
|
7
|
+
|
|
8
|
+
Thank you for your interest in Torch-RecHub! We welcome all forms of contributions, including but not limited to:
|
|
9
|
+
|
|
10
|
+
- Bug reports
|
|
11
|
+
- Feature suggestions
|
|
12
|
+
- Documentation improvements
|
|
13
|
+
- Code contributions
|
|
14
|
+
- Test cases
|
|
15
|
+
- Tutorials and examples
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
### Development Environment Setup
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# 1. Fork and clone the repository
|
|
23
|
+
git clone https://github.com/YOUR_USERNAME/torch-rechub.git
|
|
24
|
+
cd torch-rechub
|
|
25
|
+
|
|
26
|
+
# 2. Install dependencies and set up environment
|
|
27
|
+
uv sync
|
|
28
|
+
|
|
29
|
+
# 3. Install package in development mode
|
|
30
|
+
uv pip install -e .
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Development Workflow
|
|
34
|
+
|
|
35
|
+
1. **Fork the repository**: Click the "Fork" button in the top right corner.
|
|
36
|
+
2. **Make changes**: Implement new features or fix bugs.
|
|
37
|
+
3. **Format code**: Run code formatting before committing to ensure consistent style:
|
|
38
|
+
```bash
|
|
39
|
+
python config/format_code.py
|
|
40
|
+
```
|
|
41
|
+
4. **Commit changes**: `git commit -m "feat: add new feature"` or `git commit -m "fix: fix some issue"` (following [Conventional Commits](https://www.conventionalcommits.org/) is recommended).
|
|
42
|
+
5. **Push to branch**: `git push origin`
|
|
43
|
+
6. **Create Pull Request**: Return to the original repository page, click "New pull request", compare your branch with the main repository's `main` branch, then submit the PR.
|
|
44
|
+
|
|
45
|
+
## Code Standards
|
|
46
|
+
|
|
47
|
+
### Branch Naming
|
|
48
|
+
|
|
49
|
+
- `feature/feature-name` - New features
|
|
50
|
+
- `fix/bug-description` - Bug fixes
|
|
51
|
+
- `docs/documentation-update` - Documentation updates
|
|
52
|
+
- `test/test-description` - Test additions
|
|
53
|
+
|
|
54
|
+
### Commit Messages
|
|
55
|
+
|
|
56
|
+
We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification:
|
|
57
|
+
|
|
58
|
+
- `feat: add new recommendation model`
|
|
59
|
+
- `fix: resolve memory leak in training loop`
|
|
60
|
+
- `docs: update installation guide`
|
|
61
|
+
- `test: add unit tests for DeepFM model`
|
|
62
|
+
- `refactor: optimize data loading pipeline`
|
|
63
|
+
|
|
64
|
+
### Pull Request Process
|
|
65
|
+
|
|
66
|
+
1. **Push your branch**
|
|
67
|
+
```bash
|
|
68
|
+
git push origin your-branch-name
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
2. **Create Pull Request**
|
|
72
|
+
- Visit the GitHub repository page
|
|
73
|
+
- Click "New pull request"
|
|
74
|
+
- Select your branch
|
|
75
|
+
- Fill in the PR template
|
|
76
|
+
|
|
77
|
+
3. **PR Requirements**
|
|
78
|
+
- Clear description of changes
|
|
79
|
+
- Explain why these changes are needed
|
|
80
|
+
- List related Issues (if any)
|
|
81
|
+
- Include test instructions
|
|
82
|
+
- Add screenshots (if applicable)
|
|
83
|
+
|
|
84
|
+
## Testing Guide
|
|
85
|
+
|
|
86
|
+
### Writing Tests
|
|
87
|
+
|
|
88
|
+
- **Unit tests**: Test individual functions or classes
|
|
89
|
+
- **Integration tests**: Test interactions between modules
|
|
90
|
+
- **End-to-end tests**: Test complete workflows
|
|
91
|
+
|
|
92
|
+
### Running Tests
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Run all tests
|
|
96
|
+
uv run pytest
|
|
97
|
+
|
|
98
|
+
# Run specific test file
|
|
99
|
+
uv run pytest tests/test_models/test_ranking.py
|
|
100
|
+
|
|
101
|
+
# Run with coverage report
|
|
102
|
+
uv run pytest --cov=torch_rechub
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Documentation
|
|
106
|
+
|
|
107
|
+
### Documentation Types
|
|
108
|
+
|
|
109
|
+
- **API documentation**: Docstrings in code
|
|
110
|
+
- **User guides**: Files in `docs/` directory
|
|
111
|
+
- **Tutorials**: Jupyter notebooks in `tutorials/` directory
|
|
112
|
+
- **README**: Project introduction and quick start
|
|
113
|
+
|
|
114
|
+
### Documentation Standards
|
|
115
|
+
|
|
116
|
+
- Use Markdown format
|
|
117
|
+
- Include code examples
|
|
118
|
+
- Provide clear step-by-step instructions
|
|
119
|
+
- Keep English and Chinese versions in sync
|
|
120
|
+
- Follow Google-style Python docstrings
|
|
121
|
+
|
|
122
|
+
## Contribution Ideas
|
|
123
|
+
|
|
124
|
+
### Beginner-Friendly Tasks
|
|
125
|
+
|
|
126
|
+
- Improve documentation and comments
|
|
127
|
+
- Add test cases
|
|
128
|
+
- Fix simple bugs
|
|
129
|
+
- Translate documentation
|
|
130
|
+
- Add example code
|
|
131
|
+
- Code formatting and style improvements
|
|
132
|
+
|
|
133
|
+
### Advanced Contributions
|
|
134
|
+
|
|
135
|
+
- Implement new recommendation algorithms
|
|
136
|
+
- Performance optimization
|
|
137
|
+
- Architecture improvements
|
|
138
|
+
- Add new evaluation metrics
|
|
139
|
+
- Develop tools and scripts
|
|
140
|
+
- Research paper implementations
|
|
141
|
+
|
|
142
|
+
### Model Implementation Guide
|
|
143
|
+
|
|
144
|
+
When implementing new models:
|
|
145
|
+
|
|
146
|
+
1. **Follow existing patterns**: Look at the structure of existing models
|
|
147
|
+
2. **Add comprehensive tests**: Include unit and integration tests
|
|
148
|
+
3. **Provide examples**: Add usage examples in `examples/` directory
|
|
149
|
+
4. **Detailed documentation**: Include docstrings and README updates
|
|
150
|
+
5. **Performance benchmarks**: Compare with existing implementations
|
|
151
|
+
|
|
152
|
+
## Getting Help
|
|
153
|
+
|
|
154
|
+
If you encounter issues during contribution:
|
|
155
|
+
|
|
156
|
+
1. **Check existing Issues**: There may be related discussions
|
|
157
|
+
2. **Create new Issue**: Clearly describe your problem
|
|
158
|
+
3. **Join discussions**: Ask questions in related Issues or PRs
|
|
159
|
+
4. **Contact maintainers**: Via GitHub or email
|
|
160
|
+
|
|
161
|
+
## Recognition
|
|
162
|
+
|
|
163
|
+
We value every contribution! All contributors will be recognized in:
|
|
164
|
+
|
|
165
|
+
- Contributors list in README
|
|
166
|
+
- Acknowledgments in release notes
|
|
167
|
+
- Contributors page in project documentation
|
|
168
|
+
- Special mentions for significant contributions
|
|
169
|
+
|
|
170
|
+
## Code of Conduct
|
|
171
|
+
|
|
172
|
+
Please follow our [Code of Conduct](https://github.com/datawhalechina/torch-rechub/blob/main/CODE_OF_CONDUCT.md) to ensure a friendly and inclusive community environment.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
Thank you again for your contribution! Every contribution makes Torch-RecHub better.
|
|
177
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: FAQ
|
|
3
|
+
description: Torch-RecHub frequently asked questions and troubleshooting guide
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# FAQ
|
|
7
|
+
|
|
8
|
+
Torch-RecHub frequently asked questions and troubleshooting guide.
|
|
9
|
+
|
|
10
|
+
* **Will there be a TensorFlow version?**
|
|
11
|
+
|
|
12
|
+
- Not currently planned
|
|
13
|
+
|
|
14
|
+
- This project's core positioning is to provide easy-to-use model implementations for beginners, referencing industry-used models. PyTorch has a wider audience.
|
|
15
|
+
|
|
16
|
+
* **Why does running the example give AUC=0?**
|
|
17
|
+
|
|
18
|
+
- The examples use 100 sample records for users to reference data format and feature types, ensuring the code runs smoothly. Accuracy is not guaranteed.
|
|
19
|
+
- If you need to test performance, download the data from the links described in the README, then refer to the parameter configuration files in the examples for model training and evaluation.
|
|
20
|
+
|
|
21
|
+
- **Annoy Installation**
|
|
22
|
+
|
|
23
|
+
- Windows installation
|
|
24
|
+
|
|
25
|
+
- Online installation
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pip install annoy
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
If Windows doesn't have a C++ compilation environment, you may see this error:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
In this case, use offline installation:
|
|
38
|
+
|
|
39
|
+
- Offline installation
|
|
40
|
+
|
|
41
|
+
Annoy library download: [https://www.lfd.uci.edu/~gohlke/pythonlibs/#_annoy](https://www.lfd.uci.edu/~gohlke/pythonlibs/#_annoy)
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install annoy‑1.17.0‑cp39‑cp39‑win_amd64.whl
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
- Linux/macOS installation
|
|
48
|
+
|
|
49
|
+
- Online installation
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
pip install annoy
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Normally macOS can install online successfully. If online installation fails with a nose-related error, use offline compilation:
|
|
56
|
+
|
|
57
|
+
- Offline installation
|
|
58
|
+
|
|
59
|
+
- Download nose
|
|
60
|
+
|
|
61
|
+
Download: [https://www.lfd.uci.edu/~gohlke/pythonlibs/#_annoy](https://www.lfd.uci.edu/~gohlke/pythonlibs/#_annoy)
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pip install nose‑1.3.7‑py3‑none‑any.whl
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
- Download annoy
|
|
68
|
+
|
|
69
|
+
Download: [https://files.pythonhosted.org/packages/a1/5b/1c22129f608b3f438713b91cd880dc681d747a860afe3e8e0af86e921942/annoy-1.17.0.tar.gz](https://files.pythonhosted.org/packages/a1/5b/1c22129f608b3f438713b91cd880dc681d747a860afe3e8e0af86e921942/annoy-1.17.0.tar.gz)
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
tar -zxvf annoy-1.17.0.tar.gz
|
|
73
|
+
cd annoy-1.17.0
|
|
74
|
+
python setup.py install
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
After installing annoy, you can install torch-rechub:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pip install --upgrade torch-rechub
|
|
81
|
+
```
|
|
82
|
+
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Data Pipeline
|
|
3
|
+
description: Torch-RecHub data loading and preprocessing
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Data Pipeline
|
|
7
|
+
|
|
8
|
+
Torch-RecHub offers datasets, generators, and utilities for recommendation data.
|
|
9
|
+
|
|
10
|
+
## Datasets
|
|
11
|
+
|
|
12
|
+
### TorchDataset
|
|
13
|
+
Training/validation dataset with features and labels.
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
from torch_rechub.utils.data import TorchDataset
|
|
17
|
+
dataset = TorchDataset(x, y)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### PredictDataset
|
|
21
|
+
Prediction-only dataset (features only).
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
from torch_rechub.utils.data import PredictDataset
|
|
25
|
+
dataset = PredictDataset(x)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Data Generators
|
|
29
|
+
|
|
30
|
+
### DataGenerator
|
|
31
|
+
Build dataloaders for ranking / multi-task models.
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
from torch_rechub.utils.data import DataGenerator
|
|
35
|
+
|
|
36
|
+
dg = DataGenerator(x, y)
|
|
37
|
+
train_dl, val_dl, test_dl = dg.generate_dataloader(
|
|
38
|
+
split_ratio=[0.7, 0.1],
|
|
39
|
+
batch_size=256,
|
|
40
|
+
num_workers=8,
|
|
41
|
+
)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### MatchDataGenerator
|
|
45
|
+
Build dataloaders for matching/retrieval models.
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
from torch_rechub.utils.data import MatchDataGenerator
|
|
49
|
+
|
|
50
|
+
dg = MatchDataGenerator(x, y)
|
|
51
|
+
train_dl, test_dl, item_dl = dg.generate_dataloader(
|
|
52
|
+
x_test_user=x_test_user,
|
|
53
|
+
x_all_item=x_all_item,
|
|
54
|
+
batch_size=256,
|
|
55
|
+
num_workers=8,
|
|
56
|
+
)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Utilities
|
|
60
|
+
|
|
61
|
+
### get_auto_embedding_dim
|
|
62
|
+
Compute embedding dim from vocab size: ``int(floor(6 * num_classes**0.25))``.
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
from torch_rechub.utils.data import get_auto_embedding_dim
|
|
66
|
+
embed_dim = get_auto_embedding_dim(vocab_size=1000)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### get_loss_func
|
|
70
|
+
Return default loss by task type: BCELoss for classification, MSELoss for regression.
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
from torch_rechub.utils.data import get_loss_func
|
|
74
|
+
loss_fn = get_loss_func(task_type="classification")
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Parquet Streaming Dataset
|
|
78
|
+
|
|
79
|
+
In industrial scenarios, feature engineering is typically done by **PySpark** on big data clusters, with data volumes reaching GB to TB scale. Using `spark_df.toPandas()` directly causes Driver OOM.
|
|
80
|
+
|
|
81
|
+
Torch-RecHub provides `ParquetIterableDataset` for streaming Parquet files generated by Spark without loading all data into memory.
|
|
82
|
+
|
|
83
|
+
### Installation
|
|
84
|
+
|
|
85
|
+
Parquet data loading requires `pyarrow`:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
pip install pyarrow
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### ParquetIterableDataset
|
|
92
|
+
|
|
93
|
+
Inherits from `torch.utils.data.IterableDataset` with multi-worker support.
|
|
94
|
+
|
|
95
|
+
```python
|
|
96
|
+
from torch.utils.data import DataLoader
|
|
97
|
+
from torch_rechub.data import ParquetIterableDataset
|
|
98
|
+
|
|
99
|
+
dataset = ParquetIterableDataset(
|
|
100
|
+
["/data/train1.parquet", "/data/train2.parquet"],
|
|
101
|
+
columns=["user_id", "item_id", "label"], # Optional
|
|
102
|
+
batch_size=1024,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
loader = DataLoader(dataset, batch_size=None, num_workers=4)
|
|
106
|
+
|
|
107
|
+
for batch in loader:
|
|
108
|
+
user_id = batch["user_id"] # torch.Tensor
|
|
109
|
+
item_id = batch["item_id"] # torch.Tensor
|
|
110
|
+
label = batch["label"] # torch.Tensor
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**Parameters:**
|
|
114
|
+
- `file_paths`: List of Parquet file paths
|
|
115
|
+
- `columns`: Column names to read; `None` reads all columns
|
|
116
|
+
- `batch_size`: Rows per batch (default: 1024)
|
|
117
|
+
|
|
118
|
+
**Features:**
|
|
119
|
+
- **Streaming**: Uses PyArrow Scanner for constant memory usage
|
|
120
|
+
- **Multi-worker**: Automatically partitions files across workers
|
|
121
|
+
- **Type conversion**: Converts PyArrow arrays to PyTorch Tensors
|
|
122
|
+
- **Nested arrays**: Supports Spark `Array` columns as 2D Tensors
|
|
123
|
+
|
|
124
|
+
### Working with Spark
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
# ========== Spark Side ==========
|
|
128
|
+
# df.write.parquet("/data/train.parquet")
|
|
129
|
+
|
|
130
|
+
# ========== PyTorch Side ==========
|
|
131
|
+
import glob
|
|
132
|
+
from torch_rechub.data import ParquetIterableDataset
|
|
133
|
+
|
|
134
|
+
file_paths = glob.glob("/data/train.parquet/*.parquet")
|
|
135
|
+
dataset = ParquetIterableDataset(file_paths, batch_size=2048)
|
|
136
|
+
loader = DataLoader(dataset, batch_size=None, num_workers=8)
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Supported Types
|
|
140
|
+
|
|
141
|
+
| Parquet/Arrow Type | Result |
|
|
142
|
+
|-------------------|--------|
|
|
143
|
+
| int8/16/32/64 | torch.float32 |
|
|
144
|
+
| float32/64 | torch.float32 |
|
|
145
|
+
| boolean | torch.float32 |
|
|
146
|
+
| list/array | torch.Tensor (2D) |
|
|
147
|
+
|
|
148
|
+
> **Note**: Nested arrays require equal row lengths; otherwise raises `ValueError`.
|
|
149
|
+
|
|
150
|
+
## Typical Flow
|
|
151
|
+
|
|
152
|
+
1. Define features (Dense/Sparse/Sequence).
|
|
153
|
+
2. Load raw data.
|
|
154
|
+
3. Encode categorical features (e.g., LabelEncoder).
|
|
155
|
+
4. Process sequences (pad/truncate).
|
|
156
|
+
5. Construct samples (e.g., negative sampling).
|
|
157
|
+
6. Use DataGenerator / MatchDataGenerator to build dataloaders.
|
|
158
|
+
7. Train models with the trainers.
|
|
159
|
+
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Installation Guide
|
|
3
|
+
description: Torch-RecHub installation instructions for stable and development versions
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Installation Guide
|
|
7
|
+
|
|
8
|
+
This document provides detailed installation instructions for Torch-RecHub, including stable and development versions.
|
|
9
|
+
|
|
10
|
+
## System Requirements
|
|
11
|
+
|
|
12
|
+
Before installing Torch-RecHub, ensure your system meets the following requirements:
|
|
13
|
+
|
|
14
|
+
- **Python 3.9+**
|
|
15
|
+
- **PyTorch 1.7+** (CUDA version recommended for GPU acceleration)
|
|
16
|
+
- **NumPy**
|
|
17
|
+
- **Pandas**
|
|
18
|
+
- **SciPy**
|
|
19
|
+
- **Scikit-learn**
|
|
20
|
+
|
|
21
|
+
## Installation Methods
|
|
22
|
+
|
|
23
|
+
### Stable Version (Recommended)
|
|
24
|
+
|
|
25
|
+
The simplest way to install is via pip:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pip install torch-rechub
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Latest Development Version
|
|
32
|
+
|
|
33
|
+
To install the development version with the latest features:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Install uv first (if not already installed)
|
|
37
|
+
pip install uv
|
|
38
|
+
|
|
39
|
+
# Clone and install
|
|
40
|
+
git clone https://github.com/datawhalechina/torch-rechub.git
|
|
41
|
+
cd torch-rechub
|
|
42
|
+
uv sync
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Development Environment Setup
|
|
46
|
+
|
|
47
|
+
If you want to contribute to Torch-RecHub or work with the source code:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# 1. Fork and clone the repository
|
|
51
|
+
git clone https://github.com/YOUR_USERNAME/torch-rechub.git
|
|
52
|
+
cd torch-rechub
|
|
53
|
+
|
|
54
|
+
# 2. Install dependencies and set up environment
|
|
55
|
+
uv sync
|
|
56
|
+
|
|
57
|
+
# 3. Install package in development mode
|
|
58
|
+
uv pip install -e .
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Verify Installation
|
|
62
|
+
|
|
63
|
+
To verify that Torch-RecHub is correctly installed:
|
|
64
|
+
|
|
65
|
+
```python
|
|
66
|
+
import torch_rechub
|
|
67
|
+
print(torch_rechub.__version__)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Or run a simple example:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
python examples/matching/run_ml_dssm.py
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Troubleshooting
|
|
77
|
+
|
|
78
|
+
### PyTorch Installation
|
|
79
|
+
|
|
80
|
+
If you need to install PyTorch with a specific CUDA version, visit the [PyTorch official website](https://pytorch.org/get-started/locally/) for installation instructions tailored to your system.
|
|
81
|
+
|
|
82
|
+
### GPU Support
|
|
83
|
+
|
|
84
|
+
For GPU acceleration, ensure you have:
|
|
85
|
+
- NVIDIA GPU with compute capability 3.5 or higher
|
|
86
|
+
- CUDA Toolkit installed
|
|
87
|
+
- cuDNN library installed
|
|
88
|
+
|
|
89
|
+
### Common Issues
|
|
90
|
+
|
|
91
|
+
If you encounter any installation issues:
|
|
92
|
+
1. Check [GitHub Issues](https://github.com/datawhalechina/torch-rechub/issues)
|
|
93
|
+
2. Create a new Issue with detailed error messages and system information
|
|
94
|
+
3. Refer to the FAQ section
|