torch-rechub 0.0.5__tar.gz → 0.1.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.
Files changed (278) hide show
  1. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/.github/workflows/ci.yml +43 -6
  2. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/.github/workflows/deploy.yml +8 -0
  3. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/CHANGELOG.md +36 -0
  4. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/CONTRIBUTING.md +20 -13
  5. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/PKG-INFO +20 -5
  6. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/README.md +3 -2
  7. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/README_en.md +3 -1
  8. torch_rechub-0.1.0/docs/.vitepress/config.mts +214 -0
  9. torch_rechub-0.1.0/docs/en/community/faq.md +0 -0
  10. torch_rechub-0.1.0/docs/en/core/data.md +86 -0
  11. torch_rechub-0.1.0/docs/en/core/evaluation.md +207 -0
  12. torch_rechub-0.1.0/docs/en/core/features.md +77 -0
  13. torch_rechub-0.1.0/docs/en/core/intro.md +30 -0
  14. torch_rechub-0.1.0/docs/en/guide/install.md +0 -0
  15. torch_rechub-0.1.0/docs/en/guide/intro.md +0 -0
  16. torch_rechub-0.1.0/docs/en/guide/quick_start.md +0 -0
  17. torch_rechub-0.1.0/docs/en/models/generative.md +128 -0
  18. torch_rechub-0.1.0/docs/en/models/intro.md +102 -0
  19. torch_rechub-0.1.0/docs/en/models/matching.md +72 -0
  20. torch_rechub-0.1.0/docs/en/models/mtl.md +57 -0
  21. torch_rechub-0.1.0/docs/en/models/ranking.md +69 -0
  22. torch_rechub-0.1.0/docs/en/serving/demo.md +0 -0
  23. torch_rechub-0.1.0/docs/en/serving/intro.md +0 -0
  24. torch_rechub-0.1.0/docs/en/serving/onnx.md +0 -0
  25. torch_rechub-0.1.0/docs/en/serving/vector_index.md +0 -0
  26. torch_rechub-0.1.0/docs/en/tools/callbacks.md +0 -0
  27. torch_rechub-0.1.0/docs/en/tools/intro.md +0 -0
  28. torch_rechub-0.1.0/docs/en/tools/tracking.md +112 -0
  29. torch_rechub-0.1.0/docs/en/tools/visualization.md +0 -0
  30. torch_rechub-0.1.0/docs/en/tutorials/ctr.md +0 -0
  31. torch_rechub-0.1.0/docs/en/tutorials/intro.md +0 -0
  32. torch_rechub-0.1.0/docs/en/tutorials/pipeline.md +0 -0
  33. torch_rechub-0.1.0/docs/en/tutorials/retrieval.md +0 -0
  34. torch_rechub-0.1.0/docs/public/favicon.ico +0 -0
  35. torch_rechub-0.1.0/docs/public/img/logo.png +0 -0
  36. torch_rechub-0.1.0/docs/public/img/logo_with_name.png +0 -0
  37. torch_rechub-0.1.0/docs/zh/api/api.md +0 -0
  38. torch_rechub-0.1.0/docs/zh/community/changelog.md +9 -0
  39. torch_rechub-0.1.0/docs/zh/core/data.md +143 -0
  40. torch_rechub-0.1.0/docs/zh/core/evaluation.md +223 -0
  41. torch_rechub-0.1.0/docs/zh/core/features.md +96 -0
  42. torch_rechub-0.1.0/docs/zh/core/intro.md +60 -0
  43. torch_rechub-0.0.5/docs/zh/manual/installation.md → torch_rechub-0.1.0/docs/zh/guide/install.md +1 -1
  44. torch_rechub-0.1.0/docs/zh/guide/intro.md +97 -0
  45. torch_rechub-0.0.5/docs/zh/manual/getting-started.md → torch_rechub-0.1.0/docs/zh/guide/quick_start.md +5 -4
  46. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/zh/index.md +2 -2
  47. torch_rechub-0.1.0/docs/zh/models/generative.md +310 -0
  48. torch_rechub-0.1.0/docs/zh/models/intro.md +119 -0
  49. torch_rechub-0.1.0/docs/zh/models/matching.md +853 -0
  50. torch_rechub-0.1.0/docs/zh/models/mtl.md +451 -0
  51. torch_rechub-0.1.0/docs/zh/models/ranking.md +695 -0
  52. torch_rechub-0.1.0/docs/zh/serving/demo.md +9 -0
  53. torch_rechub-0.1.0/docs/zh/serving/intro.md +9 -0
  54. torch_rechub-0.1.0/docs/zh/serving/onnx.md +143 -0
  55. torch_rechub-0.1.0/docs/zh/serving/vector_index.md +9 -0
  56. torch_rechub-0.1.0/docs/zh/tools/callbacks.md +9 -0
  57. torch_rechub-0.1.0/docs/zh/tools/intro.md +9 -0
  58. torch_rechub-0.1.0/docs/zh/tools/tracking.md +111 -0
  59. torch_rechub-0.1.0/docs/zh/tools/visualization.md +9 -0
  60. torch_rechub-0.1.0/docs/zh/tutorials/intro.md +9 -0
  61. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/pyproject.toml +18 -5
  62. torch_rechub-0.1.0/tests/test_pa_array_to_tensor.py +221 -0
  63. torch_rechub-0.1.0/tests/test_parquet_dataset.py +90 -0
  64. torch_rechub-0.1.0/tests/test_serving.py +324 -0
  65. torch_rechub-0.1.0/torch_rechub/basic/__init__.py +0 -0
  66. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/basic/layers.py +213 -150
  67. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/basic/loss_func.py +62 -47
  68. torch_rechub-0.1.0/torch_rechub/basic/tracking.py +198 -0
  69. torch_rechub-0.1.0/torch_rechub/data/__init__.py +0 -0
  70. torch_rechub-0.1.0/torch_rechub/data/convert.py +67 -0
  71. torch_rechub-0.1.0/torch_rechub/data/dataset.py +107 -0
  72. torch_rechub-0.1.0/torch_rechub/models/__init__.py +0 -0
  73. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/generative/hstu.py +48 -33
  74. torch_rechub-0.1.0/torch_rechub/serving/__init__.py +50 -0
  75. torch_rechub-0.1.0/torch_rechub/serving/annoy.py +133 -0
  76. torch_rechub-0.1.0/torch_rechub/serving/base.py +107 -0
  77. torch_rechub-0.1.0/torch_rechub/serving/faiss.py +154 -0
  78. torch_rechub-0.1.0/torch_rechub/serving/milvus.py +215 -0
  79. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/trainers/ctr_trainer.py +52 -3
  80. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/trainers/match_trainer.py +52 -3
  81. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/trainers/mtl_trainer.py +61 -3
  82. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/trainers/seq_trainer.py +93 -17
  83. torch_rechub-0.1.0/torch_rechub/types.py +5 -0
  84. torch_rechub-0.1.0/torch_rechub/utils/__init__.py +0 -0
  85. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/utils/data.py +167 -137
  86. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/utils/hstu_utils.py +87 -76
  87. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/utils/model_utils.py +10 -12
  88. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/utils/onnx_export.py +98 -45
  89. torch_rechub-0.1.0/torch_rechub/utils/quantization.py +128 -0
  90. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/utils/visualization.py +4 -12
  91. torch_rechub-0.1.0/tutorials/00_QuickStart_CTR_DeepFM.ipynb +300 -0
  92. torch_rechub-0.1.0/tutorials/01_Ranking_DIN.ipynb +314 -0
  93. torch_rechub-0.1.0/tutorials/02_Matching_DSSM.ipynb +394 -0
  94. torch_rechub-0.1.0/tutorials/03_MultiTask_MMOE.ipynb +228 -0
  95. torch_rechub-0.1.0/tutorials/04_Experiment_Tracking_Light.ipynb +297 -0
  96. torch_rechub-0.1.0/tutorials/05_Model_Export_and_Serving.ipynb +438 -0
  97. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/uv.lock +1047 -66
  98. torch_rechub-0.0.5/docs/.vitepress/config.mts +0 -154
  99. torch_rechub-0.0.5/docs/public/favicon.ico +0 -0
  100. torch_rechub-0.0.5/docs/public/img/logo.png +0 -0
  101. torch_rechub-0.0.5/docs/public/img/logo_with_name.png +0 -0
  102. torch_rechub-0.0.5/docs/zh/introduction.md +0 -78
  103. torch_rechub-0.0.5/torch_rechub/trainers/matching.md +0 -3
  104. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  105. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  106. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  107. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/.github/ISSUE_TEMPLATE/help_wanted.md +0 -0
  108. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/.github/dependabot.yml +0 -0
  109. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/.github/pull_request_template.md +0 -0
  110. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/.github/release.yml +0 -0
  111. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/.gitignore +0 -0
  112. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/.pre-commit-config.yaml +0 -0
  113. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/CODE_OF_CONDUCT.md +0 -0
  114. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/LICENSE +0 -0
  115. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/config/.flake8 +0 -0
  116. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/config/.pep8 +0 -0
  117. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/config/.pre-commit-config.yaml +0 -0
  118. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/config/CONFIG_GUIDE.md +0 -0
  119. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/config/fix_encoding.py +0 -0
  120. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/config/format_code.py +0 -0
  121. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/config/pytest.ini +0 -0
  122. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/.vitepress/theme/custom.css +0 -0
  123. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/.vitepress/theme/index.ts +0 -0
  124. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/.vitepress/theme/style.css +0 -0
  125. /torch_rechub-0.0.5/docs/zh/manual/api-reference/basic.md → /torch_rechub-0.1.0/docs/cache/api-basic.md +0 -0
  126. /torch_rechub-0.0.5/docs/zh/manual/api-reference/models.md → /torch_rechub-0.1.0/docs/cache/api-models.md +0 -0
  127. /torch_rechub-0.0.5/docs/zh/manual/api-reference/trainers.md → /torch_rechub-0.1.0/docs/cache/api-trainers.md +0 -0
  128. /torch_rechub-0.0.5/docs/zh/manual/api-reference/utils.md → /torch_rechub-0.1.0/docs/cache/api-utils.md +0 -0
  129. {torch_rechub-0.0.5/docs/zh/blog → torch_rechub-0.1.0/docs/cache}/hllm_reproduction.md +0 -0
  130. {torch_rechub-0.0.5/docs/zh/blog → torch_rechub-0.1.0/docs/cache}/hstu_reproduction.md +0 -0
  131. {torch_rechub-0.0.5/docs/zh/blog → torch_rechub-0.1.0/docs/cache}/match.md +0 -0
  132. {torch_rechub-0.0.5/docs/zh/blog → torch_rechub-0.1.0/docs/cache}/rank.md +0 -0
  133. {torch_rechub-0.0.5/docs/zh//345/217/202/350/200/203/350/265/204/346/226/231 → torch_rechub-0.1.0/docs/cache}//345/217/202/350/200/203/350/265/204/346/226/231.md" +0 -0
  134. /torch_rechub-0.0.5/torch_rechub/utils/__init__.py → /torch_rechub-0.1.0/docs/en/api/api.md +0 -0
  135. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/en/blog/hllm_reproduction.md +0 -0
  136. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/en/blog/match.md +0 -0
  137. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/en/blog/rank.md +0 -0
  138. /torch_rechub-0.0.5/torch_rechub/models/__init__.py → /torch_rechub-0.1.0/docs/en/community/changelog.md +0 -0
  139. /torch_rechub-0.0.5/torch_rechub/basic/__init__.py → /torch_rechub-0.1.0/docs/en/community/contributing.md +0 -0
  140. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/en/contributing.md +0 -0
  141. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/en/index.md +0 -0
  142. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/en/introduction.md +0 -0
  143. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/en/manual/api-reference/basic.md +0 -0
  144. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/en/manual/api-reference/models.md +0 -0
  145. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/en/manual/api-reference/trainers.md +0 -0
  146. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/en/manual/api-reference/utils.md +0 -0
  147. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/en/manual/faq.md +0 -0
  148. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/en/manual/getting-started.md +0 -0
  149. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/en/manual/installation.md +0 -0
  150. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/en/manual/tutorials/matching.md +0 -0
  151. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/en/manual/tutorials/multi-task.md +0 -0
  152. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/en/manual/tutorials/ranking.md +0 -0
  153. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/img/banner.png +0 -0
  154. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/img/project_framework.jpg +0 -0
  155. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/img/win_install_annoy_error.png +0 -0
  156. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/1606.07792_l8JrVnuYXA.pdf +0 -0
  157. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/1703.04247_sFSyE7q3U1.pdf +0 -0
  158. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/1706.06978_0xZD_K10S2.pdf +0 -0
  159. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/1708.05123_f3lKSqxIvw.pdf +0 -0
  160. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/1711.00165_eosOSOmTfE.pdf +0 -0
  161. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/1804.07931_ybf_jOAFRp.pdf +0 -0
  162. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/1808.09781-3_bmRm284Rxd.pdf +0 -0
  163. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/1808.09781v1.pdf +0 -0
  164. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/1905.06336_2oH3RMtROA.pdf +0 -0
  165. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/2006.11632_qiN67CrHNs.pdf +0 -0
  166. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/2020 (Tencent) (Recsys) [PLE] Progressive Layered .pdf +0 -0
  167. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/2102.09267_cdwBFKPCrj.pdf +0 -0
  168. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/2105.08489-2_XnVVGxN9GG.pdf +0 -0
  169. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/2203.06801v1-3_qUTY4TbvSL.pdf +0 -0
  170. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/2959100.2959190_jRzTU81Xmq.pdf +0 -0
  171. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/3219819.3219950_aTMFXHL3JB.pdf +0 -0
  172. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/3219819.3220007_zvaZg_CZ6z.pdf +0 -0
  173. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/4545-Article Text-7584-1-10-20190706.pdf +0 -0
  174. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/6c8a86c981a62b0126a11896b7f6ae0dae4c3566_1QYYhqJR8.pdf +0 -0
  175. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/Caruana1997_Article_MultitaskLearning_ySprcjzJ6v.pdf +0 -0
  176. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/DCN V2 Improved Deep & Cross Network and Practical.pdf +0 -0
  177. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/docs/public/pdf/cikm2013_DSSM_fullversion_c9ZSdM19XJ.pdf +0 -0
  178. {torch_rechub-0.0.5/docs/zh → torch_rechub-0.1.0/docs/zh/community}/contributing.md +0 -0
  179. {torch_rechub-0.0.5/docs/zh/manual → torch_rechub-0.1.0/docs/zh/community}/faq.md +0 -0
  180. /torch_rechub-0.0.5/docs/zh/manual/tutorials/ranking.md → /torch_rechub-0.1.0/docs/zh/tutorials/ctr.md +0 -0
  181. /torch_rechub-0.0.5/docs/zh/manual/tutorials/multi-task.md → /torch_rechub-0.1.0/docs/zh/tutorials/pipeline.md +0 -0
  182. /torch_rechub-0.0.5/docs/zh/manual/tutorials/matching.md → /torch_rechub-0.1.0/docs/zh/tutorials/retrieval.md +0 -0
  183. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/generative/data/amazon-books/README.md +0 -0
  184. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/generative/data/amazon-books/preprocess_amazon_books.py +0 -0
  185. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/generative/data/amazon-books/preprocess_amazon_books_hllm.py +0 -0
  186. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/generative/data/ml-1m/README +0 -0
  187. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/generative/data/ml-1m/preprocess_hllm_data.py +0 -0
  188. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/generative/data/ml-1m/preprocess_ml_hstu.py +0 -0
  189. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/generative/run_hllm_amazon_books.py +0 -0
  190. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/generative/run_hllm_movielens.py +0 -0
  191. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/generative/run_hstu_movielens.py +0 -0
  192. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/matching/README.md +0 -0
  193. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/matching/data/million-song-dataset/process_msd.py +0 -0
  194. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/matching/data/ml-1m/preprocess_ml.py +0 -0
  195. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/matching/data/session_based/preprocess_session_based.py +0 -0
  196. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/matching/data/yidian_news/preprocess.py +0 -0
  197. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/matching/movielens_utils.py +0 -0
  198. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/matching/run_ml_comirec.py +0 -0
  199. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/matching/run_ml_dssm.py +0 -0
  200. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/matching/run_ml_facebook_dssm.py +0 -0
  201. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/matching/run_ml_gru4rec.py +0 -0
  202. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/matching/run_ml_mind.py +0 -0
  203. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/matching/run_ml_sine.py +0 -0
  204. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/matching/run_ml_youtube_dnn.py +0 -0
  205. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/matching/run_ml_youtube_sbc.py +0 -0
  206. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/matching/run_sbr.py +0 -0
  207. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/ranking/README.md +0 -0
  208. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/ranking/data/ali-ccp/preprocess_ali_ccp.py +0 -0
  209. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/ranking/data/amazon-beauty/preprocess_amazon_beauty.py +0 -0
  210. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/ranking/data/amazon-books/preprocess_amazon_books.py +0 -0
  211. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/ranking/data/amazon-electronics/preprocess_amazon_electronics.py +0 -0
  212. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/ranking/data/avazu/download_avazu.py +0 -0
  213. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/ranking/data/census-income/preprocess_census.py +0 -0
  214. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/ranking/run_ali_ccp_ctr_ranking.py +0 -0
  215. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/ranking/run_ali_ccp_multi_task.py +0 -0
  216. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/ranking/run_aliexpress.py +0 -0
  217. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/ranking/run_amazon_electronics.py +0 -0
  218. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/ranking/run_avazu.py +0 -0
  219. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/ranking/run_census.py +0 -0
  220. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/ranking/run_criteo.py +0 -0
  221. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/ranking/run_gradnorm.py +0 -0
  222. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/examples/ranking/run_metabalance.py +0 -0
  223. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/package-lock.json +0 -0
  224. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/package.json +0 -0
  225. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/tests/test_e2e_matching.py +0 -0
  226. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/tests/test_e2e_multitask.py +0 -0
  227. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/tests/test_e2e_ranking.py +0 -0
  228. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/tests/test_onnx_export.py +0 -0
  229. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/tests/test_regularization.py +0 -0
  230. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/__init__.py +0 -0
  231. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/basic/activation.py +0 -0
  232. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/basic/callback.py +0 -0
  233. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/basic/features.py +0 -0
  234. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/basic/initializers.py +0 -0
  235. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/basic/metaoptimizer.py +0 -0
  236. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/basic/metric.py +0 -0
  237. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/generative/__init__.py +0 -0
  238. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/generative/hllm.py +0 -0
  239. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/matching/__init__.py +0 -0
  240. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/matching/comirec.py +0 -0
  241. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/matching/dssm.py +0 -0
  242. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/matching/dssm_facebook.py +0 -0
  243. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/matching/dssm_senet.py +0 -0
  244. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/matching/gru4rec.py +0 -0
  245. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/matching/mind.py +0 -0
  246. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/matching/narm.py +0 -0
  247. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/matching/sasrec.py +0 -0
  248. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/matching/sine.py +0 -0
  249. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/matching/stamp.py +0 -0
  250. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/matching/youtube_dnn.py +0 -0
  251. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/matching/youtube_sbc.py +0 -0
  252. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/multi_task/__init__.py +0 -0
  253. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/multi_task/aitm.py +0 -0
  254. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/multi_task/esmm.py +0 -0
  255. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/multi_task/mmoe.py +0 -0
  256. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/multi_task/ple.py +0 -0
  257. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/multi_task/shared_bottom.py +0 -0
  258. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/ranking/__init__.py +0 -0
  259. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/ranking/afm.py +0 -0
  260. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/ranking/autoint.py +0 -0
  261. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/ranking/bst.py +0 -0
  262. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/ranking/dcn.py +0 -0
  263. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/ranking/dcn_v2.py +0 -0
  264. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/ranking/deepffm.py +0 -0
  265. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/ranking/deepfm.py +0 -0
  266. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/ranking/dien.py +0 -0
  267. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/ranking/din.py +0 -0
  268. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/ranking/edcn.py +0 -0
  269. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/ranking/fibinet.py +0 -0
  270. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/models/ranking/widedeep.py +0 -0
  271. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/trainers/__init__.py +0 -0
  272. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/utils/match.py +0 -0
  273. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/torch_rechub/utils/mtl.py +0 -0
  274. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/tutorials/DIN.ipynb +0 -0
  275. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/tutorials/DeepFM.ipynb +0 -0
  276. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/tutorials/Matching.ipynb +0 -0
  277. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/tutorials/Milvus.ipynb +0 -0
  278. {torch_rechub-0.0.5 → torch_rechub-0.1.0}/tutorials/Multi_Task.ipynb +0 -0
@@ -56,7 +56,7 @@ jobs:
56
56
  python-version: ${{ env.PYTHON_VERSION }}
57
57
 
58
58
  - name: Cache pip packages
59
- uses: actions/cache@v4
59
+ uses: actions/cache@v5
60
60
  with:
61
61
  path: ~/.cache/pip
62
62
  key: ${{ runner.os }}-pip-lint-${{ hashFiles('pyproject.toml') }}
@@ -104,6 +104,9 @@ jobs:
104
104
  matrix:
105
105
  os: [ubuntu-latest, windows-latest, macos-latest]
106
106
 
107
+ env:
108
+ SKIP_MILVUS_TESTS: ${{ matrix.os != 'ubuntu-latest' && '1' || '0' }}
109
+
107
110
  steps:
108
111
  - name: Checkout code
109
112
  uses: actions/checkout@v6
@@ -114,7 +117,7 @@ jobs:
114
117
  python-version: '3.9'
115
118
 
116
119
  - name: Cache pip packages
117
- uses: actions/cache@v4
120
+ uses: actions/cache@v5
118
121
  with:
119
122
  path: |
120
123
  ~/.cache/pip
@@ -136,12 +139,36 @@ jobs:
136
139
  # Install CPU-only PyTorch for faster CI
137
140
  pip install torch --index-url ${{ env.TORCH_INDEX_URL }}
138
141
  # Install the package with dev and onnx dependencies
139
- pip install -e ".[dev,onnx]" || pip install -r requirements-dev.txt && pip install -e .
142
+ pip install -e ".[dev,annoy,faiss,milvus,onnx]" || pip install -r requirements-dev.txt && pip install -e .
143
+
144
+ - name: Start Milvus
145
+ if: matrix.os == 'ubuntu-latest'
146
+ run: |
147
+ # Download the installation script
148
+ curl -sfL https://raw.githubusercontent.com/milvus-io/milvus/master/scripts/standalone_embed.sh -o standalone_embed.sh
149
+
150
+ # Start the Docker container
151
+ bash standalone_embed.sh start
152
+
153
+ - name: Wait for Milvus
154
+ if: matrix.os == 'ubuntu-latest'
155
+ run: |
156
+ for i in {1..60}; do
157
+ if curl -fsS http://localhost:9091/healthz >/dev/null; then exit 0; fi
158
+ sleep 2
159
+ done
160
+ exit 1
140
161
 
141
162
  - name: Run tests
163
+ if: matrix.os != 'macos-latest'
142
164
  run: |
143
165
  pytest -c config/pytest.ini tests/ -v
144
166
 
167
+ - name: Run tests (skip indexing tests)
168
+ if: matrix.os == 'macos-latest'
169
+ run: |
170
+ pytest -c config/pytest.ini tests/ -v --ignore=tests/test_serving.py
171
+
145
172
  - name: Run tests with coverage (Ubuntu only)
146
173
  if: matrix.os == 'ubuntu-latest'
147
174
  run: |
@@ -155,6 +182,16 @@ jobs:
155
182
  flags: unittests
156
183
  name: codecov-umbrella
157
184
 
185
+ - name: Shutdown Milvus
186
+ if: always() && matrix.os == 'ubuntu-latest'
187
+ run: |
188
+ # Stop Milvus
189
+ bash standalone_embed.sh stop
190
+
191
+ # Delete Milvus data
192
+ bash standalone_embed.sh delete
193
+
194
+
158
195
  # ===================================================================
159
196
  # 依赖兼容性验证 (Python 3.10+) - 仅验证依赖安装成功
160
197
  # (仅在 push/PR 时运行,release 时跳过)
@@ -221,7 +258,7 @@ jobs:
221
258
  bandit -r torch_rechub/ -s B101,B311,B614 -x tests,docs,examples -f txt
222
259
 
223
260
  - name: Upload security scan results
224
- uses: actions/upload-artifact@v5
261
+ uses: actions/upload-artifact@v6
225
262
  if: always()
226
263
  with:
227
264
  name: bandit-security-report
@@ -259,7 +296,7 @@ jobs:
259
296
  twine check dist/*
260
297
 
261
298
  - name: Upload build artifacts
262
- uses: actions/upload-artifact@v5
299
+ uses: actions/upload-artifact@v6
263
300
  with:
264
301
  name: dist-packages
265
302
  path: dist/
@@ -348,7 +385,7 @@ jobs:
348
385
  fi
349
386
 
350
387
  - name: Install uv
351
- uses: astral-sh/setup-uv@v4
388
+ uses: astral-sh/setup-uv@v7
352
389
  with:
353
390
  version: "latest"
354
391
 
@@ -7,6 +7,7 @@ on:
7
7
  paths:
8
8
  - 'docs/**'
9
9
  - 'package.json'
10
+ - 'CHANGELOG.md'
10
11
  - '.github/workflows/deploy.yml'
11
12
 
12
13
  jobs:
@@ -27,6 +28,13 @@ jobs:
27
28
  - name: Install dependencies
28
29
  run: npm ci
29
30
 
31
+ - name: Sync CHANGELOG to docs
32
+ run: |
33
+ # 复制 CHANGELOG.md 到中英文文档目录
34
+ cp CHANGELOG.md docs/zh/community/changelog.md
35
+ cp CHANGELOG.md docs/en/community/changelog.md
36
+ echo "✅ CHANGELOG.md synced to docs directories"
37
+
30
38
  - name: Build VitePress site
31
39
  run: npm run docs:build
32
40
 
@@ -7,6 +7,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ---
9
9
 
10
+ ## [0.1.0] - 2025-12-17
11
+
12
+ <!-- Release notes generated using configuration in .github/release.yml at main -->
13
+
14
+ ## What's Changed
15
+ ### ✨ 新特性 / Features
16
+ * Update docs and tutorials && Add ONNX quantization utilities and enhance export by @1985312383 in https://github.com/datawhalechina/torch-rechub/pull/150
17
+ * REFACTOR+FEATURE: Standardize retrieval backends (ANNOY/FAISS/Milvus) by @ywuenthought in https://github.com/datawhalechina/torch-rechub/pull/151
18
+
19
+
20
+ **Full Changelog**: https://github.com/datawhalechina/torch-rechub/compare/v0.0.6...v0.1.0
21
+
22
+ ---
23
+
24
+
25
+
26
+ ## [0.0.6] - 2025-12-11
27
+
28
+ <!-- Release notes generated using configuration in .github/release.yml at main -->
29
+
30
+ ## What's Changed
31
+ ### ✨ 新特性 / Features
32
+ * FEATURE: Support Streaming Parquet Dataset by @ywuenthought in https://github.com/datawhalechina/torch-rechub/pull/143
33
+ * Docs & tracking polish: logger docstrings, README refresh, dependency tweak by @1985312383 in https://github.com/datawhalechina/torch-rechub/pull/146
34
+ ### 📝 文档更新 / Documentation
35
+ * Refator Chinese documentation structure by @1985312383 in https://github.com/datawhalechina/torch-rechub/pull/145
36
+
37
+ ## New Contributors
38
+ * @ywuenthought made their first contribution in https://github.com/datawhalechina/torch-rechub/pull/143
39
+
40
+ **Full Changelog**: https://github.com/datawhalechina/torch-rechub/compare/v0.0.5...v0.0.6
41
+
42
+ ---
43
+
44
+
45
+
10
46
  ## [0.0.5] - 2025-12-05
11
47
 
12
48
  <!-- Release notes generated using configuration in .github/release.yml at main -->
@@ -143,25 +143,32 @@ def test_deepfm_forward():
143
143
  - Include code examples
144
144
  - Provide clear step-by-step instructions
145
145
  - Keep both English and Chinese versions synchronized
146
- - Follow Google-style docstrings for Python code
146
+ - Follow scikit-learn style docstrings (NumPy/SciPy convention) for Python code
147
147
 
148
148
  ### Docstring Example
149
149
 
150
150
  ```python
151
151
  def train_model(model, data_loader, optimizer):
152
152
  """Train a recommendation model.
153
-
154
- Args:
155
- model (torch.nn.Module): The model to train
156
- data_loader (DataLoader): Training data loader
157
- optimizer (torch.optim.Optimizer): Optimizer for training
158
-
159
- Returns:
160
- float: Training loss
161
-
162
- Example:
163
- >>> model = DeepFM(features, mlp_params)
164
- >>> loss = train_model(model, train_loader, optimizer)
153
+
154
+ Parameters
155
+ ----------
156
+ model : torch.nn.Module
157
+ Model to train.
158
+ data_loader : DataLoader
159
+ Training data loader.
160
+ optimizer : torch.optim.Optimizer
161
+ Optimizer for training.
162
+
163
+ Returns
164
+ -------
165
+ float
166
+ Training loss.
167
+
168
+ Examples
169
+ --------
170
+ >>> model = DeepFM(features, mlp_params)
171
+ >>> loss = train_model(model, train_loader, optimizer)
165
172
  """
166
173
  # Implementation here
167
174
  ```
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: torch-rechub
3
- Version: 0.0.5
3
+ Version: 0.1.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
@@ -28,19 +28,33 @@ Requires-Dist: scikit-learn>=0.24.0
28
28
  Requires-Dist: torch>=1.10.0
29
29
  Requires-Dist: tqdm>=4.60.0
30
30
  Requires-Dist: transformers>=4.46.3
31
+ Provides-Extra: annoy
32
+ Requires-Dist: annoy>=1.17.2; extra == 'annoy'
33
+ Provides-Extra: bigdata
34
+ Requires-Dist: pyarrow~=21.0; extra == 'bigdata'
31
35
  Provides-Extra: dev
32
36
  Requires-Dist: bandit>=1.7.0; extra == 'dev'
33
37
  Requires-Dist: flake8>=3.8.0; extra == 'dev'
34
38
  Requires-Dist: isort==5.13.2; extra == 'dev'
35
39
  Requires-Dist: mypy>=0.800; extra == 'dev'
36
40
  Requires-Dist: pre-commit>=2.20.0; extra == 'dev'
41
+ Requires-Dist: pyarrow-stubs>=20.0; extra == 'dev'
37
42
  Requires-Dist: pytest-cov>=2.0; extra == 'dev'
38
43
  Requires-Dist: pytest>=6.0; extra == 'dev'
39
44
  Requires-Dist: toml>=0.10.2; extra == 'dev'
40
45
  Requires-Dist: yapf==0.43.0; extra == 'dev'
46
+ Provides-Extra: faiss
47
+ Requires-Dist: faiss-cpu==1.13.0; extra == 'faiss'
48
+ Provides-Extra: milvus
49
+ Requires-Dist: pymilvus>=2.6.5; extra == 'milvus'
41
50
  Provides-Extra: onnx
42
- Requires-Dist: onnx>=1.12.0; extra == 'onnx'
43
- Requires-Dist: onnxruntime>=1.12.0; extra == 'onnx'
51
+ Requires-Dist: onnx>=1.14.0; extra == 'onnx'
52
+ Requires-Dist: onnxconverter-common>=1.14.0; extra == 'onnx'
53
+ Requires-Dist: onnxruntime>=1.14.0; extra == 'onnx'
54
+ Provides-Extra: tracking
55
+ Requires-Dist: swanlab>=0.1.0; extra == 'tracking'
56
+ Requires-Dist: tensorboardx>=2.5; extra == 'tracking'
57
+ Requires-Dist: wandb>=0.13.0; extra == 'tracking'
44
58
  Provides-Extra: visualization
45
59
  Requires-Dist: graphviz>=0.20; extra == 'visualization'
46
60
  Requires-Dist: torchview>=0.2.6; extra == 'visualization'
@@ -89,7 +103,8 @@ Description-Content-Type: text/markdown
89
103
  * **易于配置:** 通过配置文件或命令行参数轻松调整实验设置。
90
104
  * **可复现性:** 旨在确保实验结果的可复现性。
91
105
  * **ONNX 导出:** 支持将训练好的模型导出为 ONNX 格式,便于部署到生产环境。
92
- * **其他特性:** 例如,支持负采样、多任务学习等。
106
+ * **跨引擎数据处理:** 现已支持基于 PySpark 的数据处理与转换,方便在大数据管道中落地。
107
+ * **实验可视化与跟踪:** 内置 WandB、SwanLab、TensorBoardX 三种可视化/追踪工具的统一集成。
93
108
 
94
109
  ## 📖 目录
95
110
 
@@ -399,4 +414,4 @@ ctr_trainer.visualization(save_path="model.pdf", dpi=300) # 保存为高清 PDF
399
414
 
400
415
  ---
401
416
 
402
- *最后更新: [2025-12-04]*
417
+ *最后更新: [2025-12-11]*
@@ -41,7 +41,8 @@
41
41
  * **易于配置:** 通过配置文件或命令行参数轻松调整实验设置。
42
42
  * **可复现性:** 旨在确保实验结果的可复现性。
43
43
  * **ONNX 导出:** 支持将训练好的模型导出为 ONNX 格式,便于部署到生产环境。
44
- * **其他特性:** 例如,支持负采样、多任务学习等。
44
+ * **跨引擎数据处理:** 现已支持基于 PySpark 的数据处理与转换,方便在大数据管道中落地。
45
+ * **实验可视化与跟踪:** 内置 WandB、SwanLab、TensorBoardX 三种可视化/追踪工具的统一集成。
45
46
 
46
47
  ## 📖 目录
47
48
 
@@ -351,4 +352,4 @@ ctr_trainer.visualization(save_path="model.pdf", dpi=300) # 保存为高清 PDF
351
352
 
352
353
  ---
353
354
 
354
- *最后更新: [2025-12-04]*
355
+ *最后更新: [2025-12-11]*
@@ -41,6 +41,8 @@ English | [简体中文](README.md)
41
41
  * **Easy Configuration:** Adjust experiment settings via config files or command-line arguments.
42
42
  * **Reproducibility:** Designed to ensure reproducible experimental results.
43
43
  * **ONNX Export:** Export trained models to ONNX format for production deployment.
44
+ * **Cross-engine data processing:** PySpark-based data processing and conversion supported for large-scale pipelines.
45
+ * **Experiment visualization & tracking:** Unified integration of WandB, SwanLab, and TensorBoardX.
44
46
  * **Additional Features:** Negative sampling, multi-task learning, etc.
45
47
 
46
48
  ## 📖 Table of Contents
@@ -342,4 +344,4 @@ If you use this framework in your research or work, please consider citing:
342
344
 
343
345
  ---
344
346
 
345
- *Last updated: [2025-12-04]*
347
+ *Last updated: [2025-12-11]*
@@ -0,0 +1,214 @@
1
+ import { defineConfig } from 'vitepress'
2
+
3
+ export default defineConfig({
4
+ title: "torch-rechub",
5
+ description: "A Lighting Pytorch Framework for Recommendation Models, Easy-to-use and Easy-to-extend.",
6
+ head: [
7
+ ['link', { rel: 'icon', href: '/torch-rechub/favicon.ico' }]
8
+ ],
9
+
10
+ base: '/torch-rechub/',
11
+
12
+ // 路径重写: 假设你的源文件都在 docs/en/ 下,但访问路径去掉 en
13
+ rewrites: {
14
+ 'en/:rest*': ':rest*'
15
+ },
16
+
17
+ themeConfig: {
18
+ logo: '/img/logo.png',
19
+ search: { provider: 'local' },
20
+ socialLinks: [
21
+ { icon: 'github', link: 'https://github.com/datawhalechina/torch-rechub' }
22
+ ]
23
+ },
24
+
25
+ locales: {
26
+ // ====================================================
27
+ // 🇬🇧 English (Root)
28
+ // ====================================================
29
+ root: {
30
+ label: 'English',
31
+ lang: 'en',
32
+ themeConfig: {
33
+ nav: [
34
+ { text: '🏠 Home', link: '/' },
35
+ { text: '🚀 Getting Started', link: '/guide/intro' },
36
+ { text: '⚙️ Core', link: '/core/intro' },
37
+ { text: '🏰 Models', link: '/models/intro' },
38
+ { text: '🛠️ Tools', link: '/tools/intro' },
39
+ { text: '🚀 Serving', link: '/serving/intro' },
40
+ { text: '📖 Tutorials', link: '/tutorials/intro' },
41
+ { text: 'ℹ️ API', link: '/api/api' },
42
+ { text: '👥 Community', link: '/community/faq' }
43
+ ],
44
+
45
+ sidebar: {
46
+ '/guide/': [
47
+ {
48
+ text: '🚀 Getting Started',
49
+ items: [
50
+ { text: 'Overview', link: '/guide/intro' },
51
+ { text: 'Installation', link: '/guide/install' },
52
+ { text: 'Quick Start', link: '/guide/quick_start' }
53
+ ]
54
+ }
55
+ ],
56
+ '/core/': [{
57
+ text: '⚙️ Core Components', items: [
58
+ { text: 'Overview', link: '/core/intro' },
59
+ { text: 'Feature Columns', link: '/core/features' },
60
+ { text: 'Data Pipeline', link: '/core/data' },
61
+ { text: 'Training & Eval', link: '/core/evaluation' }
62
+ ]
63
+ }],
64
+ '/models/': [{
65
+ text: '🏰 Model Zoo', items: [
66
+ { text: 'Overview', link: '/models/intro' },
67
+ { text: 'Ranking Models', link: '/models/ranking' },
68
+ { text: 'Matching Models', link: '/models/matching' },
69
+ { text: 'Multi-Task Models', link: '/models/mtl' },
70
+ { text: 'Generative Models', link: '/models/generative' }
71
+ ]
72
+ }],
73
+ '/tools/': [{
74
+ text: '🛠️ Dev Tools', items: [
75
+ { text: 'Overview', link: '/tools/intro' },
76
+ { text: 'Visualization', link: '/tools/visualization' },
77
+ { text: 'Experiment Tracking', link: '/tools/tracking' },
78
+ { text: 'Callbacks', link: '/tools/callbacks' }
79
+ ]
80
+ }],
81
+ '/serving/': [{
82
+ text: '🚀 Serving', items: [
83
+ { text: 'Overview', link: '/serving/intro' },
84
+ { text: 'ONNX & Quantization', link: '/serving/onnx' },
85
+ { text: 'Vector Indexing', link: '/serving/vector_index' },
86
+ { text: 'Serving Demo', link: '/serving/demo' }
87
+ ]
88
+ }],
89
+ '/tutorials/': [{
90
+ text: '📖 Tutorials', items: [
91
+ { text: 'Overview', link: '/tutorials/intro' },
92
+ { text: 'CTR Pipeline', link: '/tutorials/ctr' },
93
+ { text: 'Retrieval System', link: '/tutorials/retrieval' },
94
+ { text: 'Big Data Pipeline', link: '/tutorials/pipeline' }
95
+ ]
96
+ }],
97
+
98
+ '/api/': [
99
+ {
100
+ text: 'ℹ️ API Reference',
101
+ items: [
102
+ { text: 'Main API', link: '/api/api' },
103
+ ]
104
+ }
105
+ ],
106
+ '/community/': [
107
+ {
108
+ text: '📘 Community',
109
+ items: [
110
+ { text: 'FAQ', link: '/community/faq' },
111
+ { text: 'Contributing', link: '/community/contributing' },
112
+ { text: 'Changelog', link: '/community/changelog' }
113
+ ]
114
+ }
115
+ ]
116
+ }
117
+ }
118
+ },
119
+
120
+ // ====================================================
121
+ // 🇨🇳 中文 (Zh)
122
+ // ====================================================
123
+ zh: {
124
+ label: '中文',
125
+ lang: 'zh-CN',
126
+ link: '/zh/',
127
+ themeConfig: {
128
+ nav: [
129
+ { text: '🏠 首页', link: '/zh/' },
130
+ { text: '🚀 快速入门', link: '/zh/guide/intro' },
131
+ { text: '⚙️ 核心组件', link: '/zh/core/intro' },
132
+ { text: '🏰 模型库', link: '/zh/models/intro' },
133
+ { text: '🛠️ 研发工具', link: '/zh/tools/intro' },
134
+ { text: '🚀 生产部署', link: '/zh/serving/intro' },
135
+ { text: '📖 场景教程', link: '/zh/tutorials/intro' },
136
+ { text: 'ℹ️ API', link: '/zh/api/api' },
137
+ { text: '👥 社区', link: '/zh/community/faq' }
138
+ ],
139
+
140
+ sidebar: {
141
+ '/zh/guide/': [
142
+ {
143
+ text: '🚀 快速入门',
144
+ items: [
145
+ { text: '导览 (Overview)', link: '/zh/guide/intro' },
146
+ { text: '安装指南', link: '/zh/guide/install' },
147
+ { text: '3分钟上手', link: '/zh/guide/quick_start' }
148
+ ]
149
+ }
150
+ ],
151
+ '/zh/core/': [{
152
+ text: '⚙️ 核心组件', items: [
153
+ { text: '导览 (Overview)', link: '/zh/core/intro' },
154
+ { text: '特征定义 (Features)', link: '/zh/core/features' },
155
+ { text: '数据流水线 (Data)', link: '/zh/core/data' },
156
+ { text: '训练与评估 (Eval)', link: '/zh/core/evaluation' }
157
+ ]
158
+ }],
159
+ '/zh/models/': [{
160
+ text: '🏰 模型库', items: [
161
+ { text: '导览 (Overview)', link: '/zh/models/intro' },
162
+ { text: '排序模型 (Ranking)', link: '/zh/models/ranking' },
163
+ { text: '召回模型 (Matching)', link: '/zh/models/matching' },
164
+ { text: '多任务模型 (MTL)', link: '/zh/models/mtl' },
165
+ { text: '生成式模型 (Generative)', link: '/zh/models/generative' }
166
+ ]
167
+ }],
168
+ '/zh/tools/': [{
169
+ text: '🛠️ 研发工具', items: [
170
+ { text: '导览 (Overview)', link: '/zh/tools/intro' },
171
+ { text: '可视化监控', link: '/zh/tools/visualization' },
172
+ { text: '实验追踪', link: '/zh/tools/tracking' },
173
+ { text: '回调函数', link: '/zh/tools/callbacks' }
174
+ ]
175
+ }],
176
+ '/zh/serving/': [{
177
+ text: '🚀 生产部署', items: [
178
+ { text: '导览 (Overview)', link: '/zh/serving/intro' },
179
+ { text: 'ONNX 导出与量化', link: '/zh/serving/onnx' },
180
+ { text: '向量检索封装', link: '/zh/serving/vector_index' },
181
+ { text: '在线服务示例', link: '/zh/serving/demo' }
182
+ ]
183
+ }],
184
+ '/zh/tutorials/': [{
185
+ text: '📖 场景教程', items: [
186
+ { text: '导览 (Overview)', link: '/zh/tutorials/intro' },
187
+ { text: 'CTR 预估流程', link: '/zh/tutorials/ctr' },
188
+ { text: '召回系统搭建', link: '/zh/tutorials/retrieval' },
189
+ { text: '全链路流水线', link: '/zh/tutorials/pipeline' }
190
+ ]
191
+ }],
192
+ '/zh/api/': [
193
+ {
194
+ text: 'ℹ️ API Reference',
195
+ items: [
196
+ { text: 'API 参考', link: '/zh/api/api' },
197
+ ]
198
+ }
199
+ ],
200
+ '/zh/community/': [
201
+ {
202
+ text: '📘 社区信息',
203
+ items: [
204
+ { text: '常见问题 (FAQ)', link: '/zh/community/faq' },
205
+ { text: '贡献指南 (Contributing)', link: '/zh/community/contributing' },
206
+ { text: '版本日志 (Changelog)', link: '/zh/community/changelog' }
207
+ ]
208
+ }
209
+ ]
210
+ }
211
+ }
212
+ }
213
+ }
214
+ })
File without changes
@@ -0,0 +1,86 @@
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
+ ## Typical Flow
78
+
79
+ 1. Define features (Dense/Sparse/Sequence).
80
+ 2. Load raw data.
81
+ 3. Encode categorical features (e.g., LabelEncoder).
82
+ 4. Process sequences (pad/truncate).
83
+ 5. Construct samples (e.g., negative sampling).
84
+ 6. Use DataGenerator / MatchDataGenerator to build dataloaders.
85
+ 7. Train models with the trainers.
86
+