nextrec 0.1.10__py3-none-any.whl → 0.1.11__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.
nextrec/__version__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.1.10"
1
+ __version__ = "0.1.11"
nextrec/basic/model.py CHANGED
@@ -50,6 +50,7 @@ class BaseModel(nn.Module):
50
50
  embedding_l2_reg: float = 0.0,
51
51
  dense_l2_reg: float = 0.0,
52
52
  early_stop_patience: int = 20,
53
+ model_path: str = './',
53
54
  model_id: str = 'baseline'):
54
55
 
55
56
  super(BaseModel, self).__init__()
@@ -85,12 +86,12 @@ class BaseModel(nn.Module):
85
86
  self.early_stop_patience = early_stop_patience
86
87
  self._max_gradient_norm = 1.0 # Maximum gradient norm for gradient clipping
87
88
 
88
- project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
89
89
  self.model_id = model_id
90
-
91
- checkpoint_dir = os.path.abspath(os.path.join(project_root, "..", "checkpoints"))
90
+
91
+ model_path = os.path.abspath(os.getcwd() if model_path in [None, './'] else model_path)
92
+ checkpoint_dir = os.path.join(model_path, "checkpoints", self.model_id)
92
93
  os.makedirs(checkpoint_dir, exist_ok=True)
93
- self.checkpoint = os.path.join(checkpoint_dir, f"{self.model_name}_{self.model_id}_{datetime.datetime.now().strftime('%Y%m%d_%H%M%S')}.model")
94
+ self.checkpoint = os.path.join(checkpoint_dir, f"{self.model_name}_{datetime.datetime.now().strftime('%Y%m%d_%H%M%S')}.model")
94
95
  self.best = os.path.join(checkpoint_dir, f"{self.model_name}_{self.model_id}_best.model")
95
96
 
96
97
  self._logger_initialized = False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nextrec
3
- Version: 0.1.10
3
+ Version: 0.1.11
4
4
  Summary: A comprehensive recommendation library with match, ranking, and multi-task learning models
5
5
  Project-URL: Homepage, https://github.com/zerolovesea/NextRec
6
6
  Project-URL: Repository, https://github.com/zerolovesea/NextRec
@@ -61,9 +61,9 @@ Description-Content-Type: text/markdown
61
61
  ![Python](https://img.shields.io/badge/Python-3.10+-blue.svg)
62
62
  ![PyTorch](https://img.shields.io/badge/PyTorch-1.10+-ee4c2c.svg)
63
63
  ![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)
64
- ![Version](https://img.shields.io/badge/Version-0.1.0-orange.svg)
64
+ ![Version](https://img.shields.io/badge/Version-0.1.11-orange.svg)
65
65
 
66
- [中文版](README_zh.md)
66
+ English | [中文版](README_zh.md)
67
67
 
68
68
  **A Unified, Efficient, and Scalable Recommendation System Framework**
69
69
 
@@ -269,7 +269,6 @@ NextRec is inspired by the following great open-source projects:
269
269
  - **torch-rechub** - A Lighting Pytorch Framework for Recommendation Models, Easy-to-use and Easy-to-extend.
270
270
  - **FuxiCTR** — Configurable and reproducible CTR prediction library
271
271
  - **RecBole** — Unified and efficient recommendation library
272
- - **PaddleRec** — Large-scale recommendation algorithm library
273
272
 
274
273
  Special thanks to all open-source contributors!
275
274
 
@@ -1,5 +1,5 @@
1
1
  nextrec/__init__.py,sha256=CvocnY2uBp0cjNkhrT6ogw0q2bN9s1GNp754FLO-7lo,1117
2
- nextrec/__version__.py,sha256=z0zCHFTcKSR0tJ6h5qrpNmRVP21QIPP8N0p7quCnnm0,23
2
+ nextrec/__version__.py,sha256=nllDrH0jyChMuuYrK0CC55iTBKUNTUjejtcwxyUF2EQ,23
3
3
  nextrec/basic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  nextrec/basic/activation.py,sha256=XJDTFzmacpLq8DMNbFVhZ3WhlOmKDE88vp0udnVpXtE,2808
5
5
  nextrec/basic/callback.py,sha256=c0QeolbPJzCYhJnPf9rrZwFU13zmLxg59nvQGbpetNo,1039
@@ -8,7 +8,7 @@ nextrec/basic/features.py,sha256=wJbiDqE_qWA5gArUm-NYHaLgk7AMxpA7loaovf84dSU,252
8
8
  nextrec/basic/layers.py,sha256=dvMir_0PJQfZv0uCUeqyiJpb-QOz0f2CUu2Cuuxh7iA,38300
9
9
  nextrec/basic/loggers.py,sha256=0fupxPiHrKcBEJTBm0Sjcim0rU-n0gYKuy6IiCYX1Bw,3480
10
10
  nextrec/basic/metrics.py,sha256=p79-IRRprLcXjjicrG41vM0zwRGtUY5tTPoybpvz-io,20402
11
- nextrec/basic/model.py,sha256=Z6U4p5i-lNY0ypZWoR3PAcQc1d3XyiEAasUl6Z3AQf4,65859
11
+ nextrec/basic/model.py,sha256=HeExyUkhihiARJvCXfLztkMDfUELR9WGJKtn26QAfPc,65879
12
12
  nextrec/data/__init__.py,sha256=vvBNAdHcVO54aaaT-SyYHWsPHhoH8GvrlZ2hMRjqyF8,524
13
13
  nextrec/data/data_utils.py,sha256=rpcj5CIWw8RlLn1NYva_gEOlpYG1cy65rB1BSv23XAM,4113
14
14
  nextrec/data/preprocessor.py,sha256=0gYc_nH6ek3QxgncSZ8B8KyYmIYdCFMx9rSEdo4-aFw,26442
@@ -45,7 +45,7 @@ nextrec/utils/common.py,sha256=-LrRY1MFAhgeyZkKyqdVQGxev6eH3gigNtlRKw5f8Iw,214
45
45
  nextrec/utils/embedding.py,sha256=Xl5bXAdxdGc0FV3FthNqJe9MP0M_rZI1uaOlPi3vLj8,478
46
46
  nextrec/utils/initializer.py,sha256=ka5sgXWqAb9x5hQS6ypgonR93OUajBVUAwO7q-JPjIE,1660
47
47
  nextrec/utils/optimizer.py,sha256=g9IETUdflM89YKSzInP_iS_hTnDy_cjpm6Wcq9V9_vE,2468
48
- nextrec-0.1.10.dist-info/METADATA,sha256=ceK9svB6AP5q8eCGuqUcSXrGzk5-7klH-1hXPgKlFAY,11481
49
- nextrec-0.1.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
50
- nextrec-0.1.10.dist-info/licenses/LICENSE,sha256=2fQfVKeafywkni7MYHyClC6RGGC3laLTXCNBx-ubtp0,1064
51
- nextrec-0.1.10.dist-info/RECORD,,
48
+ nextrec-0.1.11.dist-info/METADATA,sha256=DNNd7XuW1MZH4fa4tLqQsxKfcveloyR6Oo1YMBIr34A,11425
49
+ nextrec-0.1.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
50
+ nextrec-0.1.11.dist-info/licenses/LICENSE,sha256=2fQfVKeafywkni7MYHyClC6RGGC3laLTXCNBx-ubtp0,1064
51
+ nextrec-0.1.11.dist-info/RECORD,,