nextrec 0.4.32__py3-none-any.whl → 0.4.34__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.
@@ -1,26 +1,26 @@
1
1
  nextrec/__init__.py,sha256=_M3oUqyuvQ5k8Th_3wId6hQ_caclh7M5ad51XN09m98,235
2
- nextrec/__version__.py,sha256=W0DtmvTLu6FQL6tby9DrJltesCOu7Q36WFhsT2wLrgM,23
3
- nextrec/cli.py,sha256=hFDL_HlukJxdp4FU486g977Rix9OkGdEPGBj2HxqCGo,25393
2
+ nextrec/__version__.py,sha256=lEcP5iYKQN3Lr-tUbNBN0qjKzIg4RjGwnIQfJt42ids,23
3
+ nextrec/cli.py,sha256=ct6tnDRK3_M_dIjCt0W_KpEJdNgXBXY68SvGHsAgwU4,25874
4
4
  nextrec/basic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- nextrec/basic/activation.py,sha256=uekcJsOy8SiT0_NaDO2VNSStyYFzVikDFVLDk-VrjwQ,2949
6
- nextrec/basic/asserts.py,sha256=U1EKovV_OT7_Mm99zFvdfF2hccFREp3gdDaeRjfiBwQ,2249
7
- nextrec/basic/callback.py,sha256=7geza5iMMlMojlrIKH5A7nzvCe4IYwgUaMRh_xpblWk,12585
8
- nextrec/basic/features.py,sha256=zLijBNkKwCXv9TKxSWwvmt7aVfWn2D5JvfwukeIRqec,9174
9
- nextrec/basic/heads.py,sha256=BshykLxD41KxKuZaBxf4Fmy1Mc52b3ioJliN1BVaGlk,3374
10
- nextrec/basic/layers.py,sha256=tr8XFOcTvUHEZ6T3zJwmtKMA-u_xfzHloIkItGs821U,40084
11
- nextrec/basic/loggers.py,sha256=LAfnhdSNEzHybrXaKxCWoAML1c2A-FJF6atpfrrm_Kw,13840
12
- nextrec/basic/metrics.py,sha256=CPzENDcpO6QTDZLBtQlfAGKUYYQc0FT-eaMKJ4MURFo,23396
13
- nextrec/basic/model.py,sha256=uAC3wFKJcRUAgsvfc9hXhhfp1iILqvTSbA7Ryohn-bc,111590
5
+ nextrec/basic/activation.py,sha256=2A4sgkXzPUsGzBqu9kfGEw3IY2Z3MB22gXh12dAR-U8,2896
6
+ nextrec/basic/asserts.py,sha256=eaB4FZJ7Sbh9S8PLJZNiYd7Zi98ca2rDi4S7wSYCaEw,1473
7
+ nextrec/basic/callback.py,sha256=H1C7EdkLTRLtPrKwCk1Gwq41m7I6tmtUWEST5Ih9fHI,12648
8
+ nextrec/basic/features.py,sha256=hVbEEtEYFer5OLkqNEc0N0vK9QkkWE9Il8FOW0hejZQ,8528
9
+ nextrec/basic/heads.py,sha256=WqvavaH6Y8Au8dLaoUfH2AaOOWgYvjZI5US8avkQNsQ,4009
10
+ nextrec/basic/layers.py,sha256=ta2tLCERCoWXRzADb5ziGkxA2iftdiSB1bYJhdy55WQ,39526
11
+ nextrec/basic/loggers.py,sha256=jJUzUt_kMpjpV2Mqr7qBENWA1olEutTI7dFnpmndUUw,13845
12
+ nextrec/basic/metrics.py,sha256=nVz3AkKwsxj_M97CoZWyQj8_Y9ZM_Icvw_QCM6c33Bc,26262
13
+ nextrec/basic/model.py,sha256=uKq74cZ7OvO6I9fHA3-ztpiD7xw-jevVKJicf-A_M9A,111999
14
14
  nextrec/basic/session.py,sha256=mrIsjRJhmvcAfoO1pXX-KB3SK5CCgz89wH8XDoAiGEI,4475
15
- nextrec/basic/summary.py,sha256=b6jLo70gqZj_bQ4eb5yb8SXmr2ilZlKNN293EyVnkyc,17759
15
+ nextrec/basic/summary.py,sha256=hCDVB8127GSGtlfFnfEFHWXuvW5qjCSTwowNoA1i1xE,19815
16
16
  nextrec/data/__init__.py,sha256=YZQjpty1pDCM7q_YNmiA2sa5kbujUw26ObLHWjMPjKY,1194
17
17
  nextrec/data/batch_utils.py,sha256=TbnXYqYlmK51dJthaL6dO7LTn4wyp8221I-kdgvpvDE,3542
18
18
  nextrec/data/data_processing.py,sha256=lhuwYxWp4Ts2bbuLGDt2LmuPrOy7pNcKczd2uVcQ4ss,6476
19
19
  nextrec/data/data_utils.py,sha256=0Ls1cnG9lBz0ovtyedw5vwp7WegGK_iF-F8e_3DEddo,880
20
20
  nextrec/data/dataloader.py,sha256=2sXwoiWxupKE-V1QYeZlXjK1yJyxhDtlOhknAnJF8Wk,19727
21
- nextrec/data/preprocessor.py,sha256=n2ZDR4o_-5nouBgCluWlVrXRkA9AoRaO7EvXPZAQvJg,66734
21
+ nextrec/data/preprocessor.py,sha256=SsXkO5exQsXDZ2gx1Qwc4K58u0rG_K6lev8PbGipV58,68518
22
22
  nextrec/loss/__init__.py,sha256=rualGsY-IBvmM52q9eOBk0MyKcMkpkazcscOeDXi_SM,774
23
- nextrec/loss/grad_norm.py,sha256=YoE_XSIN1HOUcNq1dpfkIlWtMaB5Pu-SEWDaNgtRw1M,8316
23
+ nextrec/loss/grad_norm.py,sha256=I4jAs0f84I7MWmYZOMC0JRUNvBHZzhgpuox0hOtYWDg,7435
24
24
  nextrec/loss/listwise.py,sha256=mluxXQt9XiuWGvXA1nk4I0miqaKB6_GPVQqxLhAiJKs,5999
25
25
  nextrec/loss/pairwise.py,sha256=9fyH9p2u-N0-jAnNTq3X5Dje0ipj1dob8wp-yQKRra4,3493
26
26
  nextrec/loss/pointwise.py,sha256=09nzI1L5eP9raXnj3Q49bD9Clp_JmsSWUvEj7bkTzSw,7474
@@ -37,9 +37,9 @@ nextrec/models/multi_task/esmm.py,sha256=iTRMcjCznyKlwJMGWgqXl9CkQrvGTsfjEjpU_5X
37
37
  nextrec/models/multi_task/hmoe.py,sha256=Ge0AC7oLcEwvt75AwGG5MtClCX6L46H7HRDqD9h-kpQ,7584
38
38
  nextrec/models/multi_task/mmoe.py,sha256=vc19O4N4_64-_oucOGI-P_LaxsQaGvrYGg5Z2sxP49w,7609
39
39
  nextrec/models/multi_task/pepnet.py,sha256=I0MXLXAKBRTN1Vp1QOZD47IrljDDB3UOPHZYUH1cghU,13526
40
- nextrec/models/multi_task/ple.py,sha256=tr8mendvt87u7a4P54lQBYCHtsWDae7VrN9fOqHcXXo,12154
40
+ nextrec/models/multi_task/ple.py,sha256=h8xPqd7BFM76GbQL6RzEbi2EAB8igrkFGS4zqhtWDEc,12155
41
41
  nextrec/models/multi_task/poso.py,sha256=jr-RaLl5UnZc1HcEIK3HrNnc_g17BImyJb43d4rEXpE,18218
42
- nextrec/models/multi_task/share_bottom.py,sha256=NYK2B9k7BaXxzX4VN3dE0_quwsOQGM7JElm2tBdb9MY,5237
42
+ nextrec/models/multi_task/share_bottom.py,sha256=yM5--iqwEFQwpeQy_SmY8Vdo8a1Exi0-LNKSYeJz3hc,5238
43
43
  nextrec/models/ranking/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
44
  nextrec/models/ranking/afm.py,sha256=2IylgCi7DBZzF7bdWFWvsEBlnRmyradxdyJiz5P4Nwg,9397
45
45
  nextrec/models/ranking/autoint.py,sha256=5g0tMtvkt3FiCjqmU76K7w7z-h3nMJbP0eVt5Ph4bbU,7259
@@ -58,13 +58,7 @@ nextrec/models/ranking/pnn.py,sha256=NU537ySMMXtndtPuiwCCQhZhBpGk6X6PRDa55GFdqt0
58
58
  nextrec/models/ranking/widedeep.py,sha256=i37lqEUZUtxNXSkkhQjBF9QP6yreGdV_jcphofHOzW4,4267
59
59
  nextrec/models/ranking/xdeepfm.py,sha256=vqDZRlrY9tgoqvnTXWe8xUbFx_28VztgVVc6ukzevRc,7507
60
60
  nextrec/models/representation/__init__.py,sha256=O3QHMMXBszwM-mTl7bA3wawNZvDGet-QIv6Ys5GHGJ8,190
61
- nextrec/models/representation/autorec.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
- nextrec/models/representation/bpr.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
- nextrec/models/representation/cl4srec.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
64
- nextrec/models/representation/lightgcn.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
65
- nextrec/models/representation/mf.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
61
  nextrec/models/representation/rqvae.py,sha256=ytSXblWj3iYo76y_8mATm5w6C_YSAh2tq4MUFG-ngBc,29296
67
- nextrec/models/representation/s3rec.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
68
62
  nextrec/models/retrieval/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
69
63
  nextrec/models/retrieval/dssm.py,sha256=AmXDr62M6tivBg1P4MQ8f4cZnl1TGHxRBvZj05zWw64,6887
70
64
  nextrec/models/retrieval/dssm_v2.py,sha256=5ZH3dfNfRCDE69k8KG8BZJixaGOSVvQHB9uIDPMLPk4,5953
@@ -72,24 +66,22 @@ nextrec/models/retrieval/mind.py,sha256=I0qVj39ApweRGW3qDNLca5vsNtJwRe7gBLh1peds
72
66
  nextrec/models/retrieval/sdm.py,sha256=1Y2gidG7WKuuGFaaQ8BcBGhQYoyyLPyhpRTo_xE1pmc,9987
73
67
  nextrec/models/retrieval/youtube_dnn.py,sha256=hLyR4liuusJIjRg4vuaSoSEecYgDICipXnNFiA3o3oY,6351
74
68
  nextrec/models/sequential/hstu.py,sha256=iZcYLp44r23nHYNhGwD25JfH85DBrFwHOTg1WpHvLe8,18983
75
- nextrec/models/sequential/sasrec.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
76
69
  nextrec/models/tree_base/__init__.py,sha256=ssGpU1viVidr1tgKCyvmkUXe32bUmwb5qPEkTh7ce70,342
77
- nextrec/models/tree_base/base.py,sha256=6aXYM_nA1XkKfo3KfWSYBoO6IqPIafLrdzJ334ZBaZY,26558
70
+ nextrec/models/tree_base/base.py,sha256=HcxUkctNgizY9LOBh2qXY6gUiYoy2JXA7j11NwUfWT4,26562
78
71
  nextrec/models/tree_base/catboost.py,sha256=hXINyx7iianwDxOZx3SLm0i-YP1jiC3HcAeqP9A2i4A,3434
79
72
  nextrec/models/tree_base/lightgbm.py,sha256=VilMU7SgfHR5LAaaoQo-tY1vkzpSvWovIrgaSeuJ1-A,2263
80
73
  nextrec/models/tree_base/xgboost.py,sha256=thOmDIC_nitno_k2mcH2cj2VcS07f9veTG01FMOO-28,1957
81
- nextrec/utils/__init__.py,sha256=Td-TC1IoTeb0KV-EgPy_vTHmmxmE6tO9q7Gmgsk1p-A,2672
82
- nextrec/utils/config.py,sha256=SUKVgWrsCkJvKLBwcHQHls859jhdPzXk7_3DYoyIXzE,20481
83
- nextrec/utils/console.py,sha256=RA3ZTjtUQXvueouSmXJNLkRjeUGQZesphwWjFMTbV4I,13577
74
+ nextrec/utils/__init__.py,sha256=a29_8gjGzTj1A8r4oOi6LUyFhC97v4ePLOPKbNtCJ6M,2702
75
+ nextrec/utils/config.py,sha256=Ngd_u8ZS5br4lIqrBJ_ecLquMF4KJi6TPAGqLZg8H4s,20485
76
+ nextrec/utils/console.py,sha256=RnSUplJnyanSQ6TyMQkP7S1j2rGMver1DbFVqNH6_1k,13581
84
77
  nextrec/utils/data.py,sha256=pSL96mWjWfW_RKE-qlUSs9vfiYnFZAaRirzA6r7DB6s,24994
85
78
  nextrec/utils/embedding.py,sha256=akAEc062MG2cD7VIOllHaqtwzAirQR2gq5iW7oKpGAU,1449
86
- nextrec/utils/feature.py,sha256=E3NOFIW8gAoRXVrDhCSonzg8k7nMUZyZzMfCq9k73_A,623
87
79
  nextrec/utils/loss.py,sha256=GBWQGpDaYkMJySpdG078XbeUNXUC34PVqFy0AqNS9N0,4578
88
80
  nextrec/utils/model.py,sha256=PI9y8oWz1lhktgapZsiXb8rTr2NrFFlc80tr4yOFHik,5334
89
- nextrec/utils/torch_utils.py,sha256=UQpWS7F3nITYqvx2KRBaQJc9oTowRkIvowhuQLt6NFM,11953
90
- nextrec/utils/types.py,sha256=G88DHXFv-mbg-XY-7Xwwh1qvh6WM9jpAsBjw5VuBcio,1559
91
- nextrec-0.4.32.dist-info/METADATA,sha256=QkHGZMQg5HZLeO0PpByGa-FiNAeclrEeLinbF_K0Jik,23188
92
- nextrec-0.4.32.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
93
- nextrec-0.4.32.dist-info/entry_points.txt,sha256=NN-dNSdfMRTv86bNXM7d3ZEPW2BQC6bRi7QP7i9cIps,45
94
- nextrec-0.4.32.dist-info/licenses/LICENSE,sha256=COP1BsqnEUwdx6GCkMjxOo5v3pUe4-Go_CdmQmSfYXM,1064
95
- nextrec-0.4.32.dist-info/RECORD,,
81
+ nextrec/utils/torch_utils.py,sha256=fxViD6Pah0qnXtpvem6ncuLV7y58Q_gyktfvkZQo_JI,12207
82
+ nextrec/utils/types.py,sha256=LFwYCBRo5WeYUh5LSCuyP1Lg9ez0Ih00Es3fUttGAFw,2273
83
+ nextrec-0.4.34.dist-info/METADATA,sha256=2EpwNICyqgNVBUW2DNSMqzJR741TiCb-SrqZZx2VYtQ,23188
84
+ nextrec-0.4.34.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
85
+ nextrec-0.4.34.dist-info/entry_points.txt,sha256=NN-dNSdfMRTv86bNXM7d3ZEPW2BQC6bRi7QP7i9cIps,45
86
+ nextrec-0.4.34.dist-info/licenses/LICENSE,sha256=COP1BsqnEUwdx6GCkMjxOo5v3pUe4-Go_CdmQmSfYXM,1064
87
+ nextrec-0.4.34.dist-info/RECORD,,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
nextrec/utils/feature.py DELETED
@@ -1,29 +0,0 @@
1
- """
2
- Feature processing utilities for NextRec
3
-
4
- Date: create on 03/12/2025
5
- Checkpoint: edit on 27/12/2025
6
- Author: Yang Zhou, zyaztec@gmail.com
7
- """
8
-
9
- import numbers
10
- from typing import Any
11
-
12
-
13
- def to_list(value: str | list[str] | None) -> list[str]:
14
- if value is None:
15
- return []
16
- if isinstance(value, str):
17
- return [value]
18
- return list(value)
19
-
20
-
21
- def as_float(value: Any) -> float | None:
22
- if isinstance(value, numbers.Number):
23
- return float(value)
24
- if hasattr(value, "item"):
25
- try:
26
- return float(value.item())
27
- except Exception:
28
- return None
29
- return None