torch-rechub 0.0.1__py3-none-any.whl → 0.0.3__py3-none-any.whl

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 (55) hide show
  1. torch_rechub/basic/activation.py +54 -52
  2. torch_rechub/basic/callback.py +32 -32
  3. torch_rechub/basic/features.py +94 -57
  4. torch_rechub/basic/initializers.py +92 -0
  5. torch_rechub/basic/layers.py +720 -240
  6. torch_rechub/basic/loss_func.py +34 -0
  7. torch_rechub/basic/metaoptimizer.py +72 -0
  8. torch_rechub/basic/metric.py +250 -0
  9. torch_rechub/models/matching/__init__.py +11 -0
  10. torch_rechub/models/matching/comirec.py +188 -0
  11. torch_rechub/models/matching/dssm.py +66 -0
  12. torch_rechub/models/matching/dssm_facebook.py +79 -0
  13. torch_rechub/models/matching/dssm_senet.py +75 -0
  14. torch_rechub/models/matching/gru4rec.py +87 -0
  15. torch_rechub/models/matching/mind.py +101 -0
  16. torch_rechub/models/matching/narm.py +76 -0
  17. torch_rechub/models/matching/sasrec.py +140 -0
  18. torch_rechub/models/matching/sine.py +151 -0
  19. torch_rechub/models/matching/stamp.py +83 -0
  20. torch_rechub/models/matching/youtube_dnn.py +71 -0
  21. torch_rechub/models/matching/youtube_sbc.py +98 -0
  22. torch_rechub/models/multi_task/__init__.py +5 -4
  23. torch_rechub/models/multi_task/aitm.py +84 -0
  24. torch_rechub/models/multi_task/esmm.py +55 -45
  25. torch_rechub/models/multi_task/mmoe.py +58 -52
  26. torch_rechub/models/multi_task/ple.py +130 -104
  27. torch_rechub/models/multi_task/shared_bottom.py +45 -44
  28. torch_rechub/models/ranking/__init__.py +11 -3
  29. torch_rechub/models/ranking/afm.py +63 -0
  30. torch_rechub/models/ranking/bst.py +63 -0
  31. torch_rechub/models/ranking/dcn.py +38 -0
  32. torch_rechub/models/ranking/dcn_v2.py +69 -0
  33. torch_rechub/models/ranking/deepffm.py +123 -0
  34. torch_rechub/models/ranking/deepfm.py +41 -41
  35. torch_rechub/models/ranking/dien.py +191 -0
  36. torch_rechub/models/ranking/din.py +91 -81
  37. torch_rechub/models/ranking/edcn.py +117 -0
  38. torch_rechub/models/ranking/fibinet.py +50 -0
  39. torch_rechub/models/ranking/widedeep.py +41 -41
  40. torch_rechub/trainers/__init__.py +2 -1
  41. torch_rechub/trainers/{trainer.py → ctr_trainer.py} +128 -111
  42. torch_rechub/trainers/match_trainer.py +170 -0
  43. torch_rechub/trainers/mtl_trainer.py +206 -144
  44. torch_rechub/utils/__init__.py +0 -0
  45. torch_rechub/utils/data.py +360 -0
  46. torch_rechub/utils/match.py +274 -0
  47. torch_rechub/utils/mtl.py +126 -0
  48. {torch_rechub-0.0.1.dist-info → torch_rechub-0.0.3.dist-info}/LICENSE +21 -21
  49. torch_rechub-0.0.3.dist-info/METADATA +177 -0
  50. torch_rechub-0.0.3.dist-info/RECORD +55 -0
  51. {torch_rechub-0.0.1.dist-info → torch_rechub-0.0.3.dist-info}/WHEEL +1 -1
  52. torch_rechub/basic/utils.py +0 -168
  53. torch_rechub-0.0.1.dist-info/METADATA +0 -105
  54. torch_rechub-0.0.1.dist-info/RECORD +0 -26
  55. {torch_rechub-0.0.1.dist-info → torch_rechub-0.0.3.dist-info}/top_level.txt +0 -0
@@ -1,105 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: torch-rechub
3
- Version: 0.0.1
4
- Summary: A Lighting Pytorch Framework for Recommendation System, Easy-to-use and Easy-to-extend.
5
- Home-page: https://github.com/morningsky/Torch-RecHub
6
- Author: Mincai lai
7
- Author-email: 757387961@qq.com
8
- License: UNKNOWN
9
- Keywords: ctr,click through rate,deep learning,pytorch,recsys,recommendation
10
- Platform: all
11
- Classifier: Intended Audience :: Developers
12
- Classifier: Intended Audience :: Education
13
- Classifier: Intended Audience :: Science/Research
14
- Classifier: Operating System :: OS Independent
15
- Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.7
17
- Classifier: Programming Language :: Python :: 3.8
18
- Classifier: Programming Language :: Python :: 3.9
19
- Classifier: Topic :: Scientific/Engineering
20
- Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
21
- Classifier: Topic :: Software Development :: Libraries
22
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
- Classifier: License :: OSI Approved :: MIT License
24
- Description-Content-Type: text/markdown
25
- License-File: LICENSE
26
- Requires-Dist: numpy (>=1.21.5)
27
- Requires-Dist: torch (>=1.7.0)
28
- Requires-Dist: pandas (>=1.0.5)
29
- Requires-Dist: tqdm (>=4.64.0)
30
- Requires-Dist: scikit-learn (>=0.23.2)
31
-
32
- # Torch-RecHub
33
-
34
- A Lighting Pytorch Framework for Recommendation Models, Easy-to-use and Easy-to-extend.
35
-
36
- ## 安装
37
-
38
- ```python
39
- pip install torch-rechub
40
- ```
41
-
42
- ## 主要特性
43
-
44
- - scikit-learn风格易用的API(fit、predict),即插即用
45
- - 训练过程与模型定义解耦,易拓展,可针对不同类型的模型设置不同的训练机制
46
- - 使用Pytorch原生Dataset、DataLoader,易修改,自定义数据
47
- - 高度模块化,支持常见Layer(MLP、FM、FFM、target-attention、self-attention、transformer等),容易调用组装成新模型
48
- - 支持常见排序模型(WideDeep、DeepFM、DIN、DCN、xDeepFM等)
49
-
50
- - [ ] 支持常见召回模型(DSSM、YoutubeDNN、MIND、SARSRec等)
51
- - 丰富的多任务学习支持
52
- - SharedBottom、ESMM、MMOE、PLE、AITM等模型
53
- - GradNorm、UWL等动态loss加权机制
54
-
55
- - 聚焦更生态化的推荐场景
56
- - [ ] 冷启动
57
- - [ ] 延迟反馈
58
- - [ ] 去偏
59
- - [ ] 支持丰富的训练机制(对比学习、蒸馏学习等)
60
-
61
- - [ ] 第三方高性能开源Trainer支持(Pytorch Lighting等)
62
- - [ ] 更多模型正在开发中
63
-
64
- ## 快速使用
65
-
66
- ```python
67
- from torch_rechub.models import WideDeep, DeepFM, DIN
68
- from torch_rechub.trainers import CTRTrainer
69
- from torch_rechub.basic.utils import DataGenerator
70
-
71
- dg = DataGenerator(x, y)
72
- train_dataloader, val_dataloader, test_dataloader = dg.generate_dataloader()
73
-
74
- model = DeepFM(deep_features=deep_features, fm_features=fm_features, mlp_params={"dims": [256, 128], "dropout": 0.2, "activation": "relu"})
75
-
76
- ctr_trainer = CTRTrainer(model)
77
- ctr_trainer.fit(train_dataloader, val_dataloader)
78
- auc = ctr_trainer.evaluate(ctr_trainer.model, test_dataloader)
79
-
80
-
81
- ```
82
-
83
-
84
-
85
-
86
-
87
- > **Note:**
88
- >
89
- > 所有模型均在大多数论文提及的多个知名公开数据集中测试,达到或者接近论文性能。
90
- >
91
- > 使用案例:[Examples](./examples)
92
- >
93
- > 每个数据集将会提供
94
- >
95
- > - 一个使用脚本,包含样本生成、模型训练与测试,并提供一套测评所用参数。
96
- > - 一个预处理脚本,将原始数据进行预处理,转化成csv。
97
- > - 数据格式参考文件(100条)。
98
- > - 全量数据,统一的csv文件,提供高速网盘下载链接和原始数据链接。
99
-
100
-
101
-
102
- [初步规划TODO清单](https://user-images.githubusercontent.com/11856746/167436396-f9c5de5b-d341-4697-8b91-884d4ae552be.png)
103
-
104
-
105
-
@@ -1,26 +0,0 @@
1
- torch_rechub/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- torch_rechub/basic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- torch_rechub/basic/activation.py,sha256=aIvomPA2X00dl3svv4lU2a4TvvltWxuqy22oML0e5YI,1519
4
- torch_rechub/basic/callback.py,sha256=Z62CIrPF2axyBSTRUnbc--9ADH8oF9YLTvLtxzvsMYE,953
5
- torch_rechub/basic/features.py,sha256=T4mA8I4JgCFZR0BZLrLRxKUdXa0Aaum9tJVlN3pdk_Y,1924
6
- torch_rechub/basic/layers.py,sha256=VCiaK0G4asvvzH4f7TobA7tyVhzgmc3FzvFK783z5yI,9354
7
- torch_rechub/basic/utils.py,sha256=v1NGrWVdj_CZBA7bERPEWqX5TcnQm0rVMDebDGXH17s,6581
8
- torch_rechub/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- torch_rechub/models/matching/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- torch_rechub/models/multi_task/__init__.py,sha256=tfy0NEOZlSkpSv6GSM3IFxPFGTrV3lpEXPAIGfUfvOM,106
11
- torch_rechub/models/multi_task/esmm.py,sha256=h7xSOxegyxfic5VFCEXEXtJLXanuRNBZ_T_rMMKZyyM,2168
12
- torch_rechub/models/multi_task/mmoe.py,sha256=2O4qUcmCMUKUW2gES6R84B2NTuKulgo6V01umhXPRQk,2818
13
- torch_rechub/models/multi_task/ple.py,sha256=m7k2D146Qg2ppKDtbXsPDFwXtSTjpsYO2hAFbFue7zQ,6467
14
- torch_rechub/models/multi_task/shared_bottom.py,sha256=3sBN5oaM912vJ1jzCpzaScnILIxobIA566cvQGS-TWQ,1855
15
- torch_rechub/models/ranking/__init__.py,sha256=k8fO0qs0WdbMcbOft2aV7NhXkmOAmBVTrQ6I1IMX7q4,78
16
- torch_rechub/models/ranking/deepfm.py,sha256=s3dAf5CYfNVHI62wXR2CZujmZ9V3yBdOBG6Y1ZgKOQc,1774
17
- torch_rechub/models/ranking/din.py,sha256=7UxS4ufcAi8ladJY68d3WEbn4986zHre8LaB4s9OVSs,4500
18
- torch_rechub/models/ranking/widedeep.py,sha256=ZpjhmIrrLygThUNP4ZWplgSboizrQjioEdy3SmGt3pM,1634
19
- torch_rechub/trainers/__init__.py,sha256=-HYw87_OnPJtwyDSUFioBNDJ7aiMM-bZNmiqV9vbfpw,67
20
- torch_rechub/trainers/mtl_trainer.py,sha256=yD98xeQuaI6cY6sN3ytDqrl4OQX113UA2kstDLC1rT4,6942
21
- torch_rechub/trainers/trainer.py,sha256=J7GhFed1QzBsUKntJD8qA2gMEtxAnx7haznpiousIk0,5052
22
- torch_rechub-0.0.1.dist-info/LICENSE,sha256=uz-kPWsf6PAphHAysV_p4A_MUcogaJbNrjPlINUC1x4,1067
23
- torch_rechub-0.0.1.dist-info/METADATA,sha256=XOlqfEwVKBuTpR2uXoavaT1hWC8AksgTPNlYy8-rcrk,3622
24
- torch_rechub-0.0.1.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
25
- torch_rechub-0.0.1.dist-info/top_level.txt,sha256=_RPvAnlLHdll9u2d74aFr_oOAj_NxgfLpH02Uifz_YY,13
26
- torch_rechub-0.0.1.dist-info/RECORD,,