warprec 2.1.0__tar.gz → 2.1.2__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 (285) hide show
  1. {warprec-2.1.0 → warprec-2.1.2}/PKG-INFO +1 -1
  2. {warprec-2.1.0 → warprec-2.1.2}/pyproject.toml +1 -1
  3. {warprec-2.1.0 → warprec-2.1.2}/warprec/common/initialize.py +9 -4
  4. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/entities/sessions.py +7 -16
  5. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/splitting/splitter.py +19 -14
  6. {warprec-2.1.0 → warprec-2.1.2}/warprec/pipelines/common.py +6 -5
  7. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/config.py +32 -4
  8. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/helpers.py +25 -9
  9. {warprec-2.1.0 → warprec-2.1.2}/LICENSE +0 -0
  10. {warprec-2.1.0 → warprec-2.1.2}/README.md +0 -0
  11. {warprec-2.1.0 → warprec-2.1.2}/warprec/__init__.py +0 -0
  12. {warprec-2.1.0 → warprec-2.1.2}/warprec/common/__init__.py +0 -0
  13. {warprec-2.1.0 → warprec-2.1.2}/warprec/common/run_state.py +0 -0
  14. {warprec-2.1.0 → warprec-2.1.2}/warprec/common/std_logs.py +0 -0
  15. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/__init__.py +0 -0
  16. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/dataset.py +0 -0
  17. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/entities/__init__.py +0 -0
  18. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/entities/common.py +0 -0
  19. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/entities/context.py +0 -0
  20. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/entities/interactions.py +0 -0
  21. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/entities/knowledge.py +0 -0
  22. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/entities/multimodal.py +0 -0
  23. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/entities/train_structures/__init__.py +0 -0
  24. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/entities/train_structures/custom_collate_fn.py +0 -0
  25. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/entities/train_structures/interaction_structures.py +0 -0
  26. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/entities/train_structures/session_structures.py +0 -0
  27. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/entities/transactions.py +0 -0
  28. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/eval_loaders.py +0 -0
  29. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/filtering.py +0 -0
  30. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/ranking.py +0 -0
  31. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/reader/__init__.py +0 -0
  32. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/reader/azureblob_reader.py +0 -0
  33. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/reader/base_reader.py +0 -0
  34. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/reader/local_reader.py +0 -0
  35. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/schema.py +0 -0
  36. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/splitting/__init__.py +0 -0
  37. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/splitting/strategies.py +0 -0
  38. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/writer/__init__.py +0 -0
  39. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/writer/azureblob_writer.py +0 -0
  40. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/writer/base_writer.py +0 -0
  41. {warprec-2.1.0 → warprec-2.1.2}/warprec/data/writer/local_writer.py +0 -0
  42. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/__init__.py +0 -0
  43. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/evaluator.py +0 -0
  44. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/factory.py +0 -0
  45. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/__init__.py +0 -0
  46. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/accuracy/__init__.py +0 -0
  47. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/accuracy/auc.py +0 -0
  48. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/accuracy/f1.py +0 -0
  49. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/accuracy/gauc.py +0 -0
  50. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/accuracy/hit_rate.py +0 -0
  51. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/accuracy/lauc.py +0 -0
  52. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/accuracy/logloss.py +0 -0
  53. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/accuracy/map.py +0 -0
  54. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/accuracy/mar.py +0 -0
  55. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/accuracy/mrr.py +0 -0
  56. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/accuracy/ndcg.py +0 -0
  57. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/accuracy/precision.py +0 -0
  58. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/accuracy/recall.py +0 -0
  59. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/base_metric.py +0 -0
  60. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/bias/__init__.py +0 -0
  61. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/bias/aclt.py +0 -0
  62. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/bias/aplt.py +0 -0
  63. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/bias/arp.py +0 -0
  64. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/bias/long_tail.py +0 -0
  65. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/bias/pop_reo.py +0 -0
  66. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/bias/pop_rsp.py +0 -0
  67. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/coverage/__init__.py +0 -0
  68. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/coverage/item_coverage.py +0 -0
  69. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/coverage/numretrieved.py +0 -0
  70. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/coverage/user_coverage.py +0 -0
  71. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/coverage/user_coverage_at_n.py +0 -0
  72. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/debiased/__init__.py +0 -0
  73. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/debiased/base.py +0 -0
  74. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/debiased/dcg.py +0 -0
  75. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/debiased/recall.py +0 -0
  76. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/diversity/__init__.py +0 -0
  77. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/diversity/gini_index.py +0 -0
  78. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/diversity/shannon_entropy.py +0 -0
  79. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/diversity/srecall.py +0 -0
  80. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/fairness/__init__.py +0 -0
  81. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/fairness/biasdisparitybd.py +0 -0
  82. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/fairness/biasdisparitybr.py +0 -0
  83. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/fairness/biasdisparitybs.py +0 -0
  84. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/fairness/itemmadranking.py +0 -0
  85. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/fairness/itemmadrating.py +0 -0
  86. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/fairness/reo.py +0 -0
  87. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/fairness/rsp.py +0 -0
  88. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/fairness/usermadranking.py +0 -0
  89. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/fairness/usermadrating.py +0 -0
  90. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/multiobjective/__init__.py +0 -0
  91. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/multiobjective/euclideandistance.py +0 -0
  92. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/multiobjective/hypervolume.py +0 -0
  93. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/novelty/__init__.py +0 -0
  94. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/novelty/efd.py +0 -0
  95. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/novelty/epc.py +0 -0
  96. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/novelty/novelty_profile.py +0 -0
  97. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/rating/__init__.py +0 -0
  98. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/rating/mae.py +0 -0
  99. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/rating/mse.py +0 -0
  100. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/metrics/rating/rmse.py +0 -0
  101. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/propensity.py +0 -0
  102. {warprec-2.1.0 → warprec-2.1.2}/warprec/evaluation/statistical_significance.py +0 -0
  103. {warprec-2.1.0 → warprec-2.1.2}/warprec/pipelines/__init__.py +0 -0
  104. {warprec-2.1.0 → warprec-2.1.2}/warprec/pipelines/design.py +0 -0
  105. {warprec-2.1.0 → warprec-2.1.2}/warprec/pipelines/estimate.py +0 -0
  106. {warprec-2.1.0 → warprec-2.1.2}/warprec/pipelines/eval.py +0 -0
  107. {warprec-2.1.0 → warprec-2.1.2}/warprec/pipelines/remotes/__init__.py +0 -0
  108. {warprec-2.1.0 → warprec-2.1.2}/warprec/pipelines/remotes/data.py +0 -0
  109. {warprec-2.1.0 → warprec-2.1.2}/warprec/pipelines/remotes/ml.py +0 -0
  110. {warprec-2.1.0 → warprec-2.1.2}/warprec/pipelines/swarm.py +0 -0
  111. {warprec-2.1.0 → warprec-2.1.2}/warprec/pipelines/train.py +0 -0
  112. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/__init__.py +0 -0
  113. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/base_recommender.py +0 -0
  114. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/callbacks.py +0 -0
  115. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/__init__.py +0 -0
  116. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/autoencoder/__init__.py +0 -0
  117. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/autoencoder/cdae.py +0 -0
  118. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/autoencoder/diffrec.py +0 -0
  119. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/autoencoder/ease.py +0 -0
  120. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/autoencoder/elsa.py +0 -0
  121. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/autoencoder/macridvae.py +0 -0
  122. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/autoencoder/multidae.py +0 -0
  123. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/autoencoder/multivae.py +0 -0
  124. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/autoencoder/sansa.py +0 -0
  125. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/__init__.py +0 -0
  126. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/dgcf.py +0 -0
  127. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/egcf.py +0 -0
  128. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/esigcf.py +0 -0
  129. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/gcmc.py +0 -0
  130. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/graph_utils.py +0 -0
  131. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/lightccf.py +0 -0
  132. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/lightgcl.py +0 -0
  133. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/lightgcn.py +0 -0
  134. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/lightgcnpp.py +0 -0
  135. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/lightgode.py +0 -0
  136. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/macrgcn.py +0 -0
  137. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/mixrec.py +0 -0
  138. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/ngcf.py +0 -0
  139. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/paac.py +0 -0
  140. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/popdcl.py +0 -0
  141. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/recdcl.py +0 -0
  142. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/rp3beta.py +0 -0
  143. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/sgcl.py +0 -0
  144. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/sgl.py +0 -0
  145. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/simgcl.py +0 -0
  146. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/simrec.py +0 -0
  147. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/ultragcn.py +0 -0
  148. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/graph_based/xsimgcl.py +0 -0
  149. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/knn/__init__.py +0 -0
  150. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/knn/itemknn.py +0 -0
  151. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/knn/itemknntd.py +0 -0
  152. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/knn/userknn.py +0 -0
  153. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/knn/userknntd.py +0 -0
  154. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/latent_factor/__init__.py +0 -0
  155. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/latent_factor/admmslim.py +0 -0
  156. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/latent_factor/bpr.py +0 -0
  157. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/latent_factor/fism.py +0 -0
  158. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/latent_factor/ials.py +0 -0
  159. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/latent_factor/ials2008.py +0 -0
  160. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/latent_factor/macrmf.py +0 -0
  161. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/latent_factor/slim.py +0 -0
  162. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/neural/__init__.py +0 -0
  163. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/neural/convncf.py +0 -0
  164. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/neural/neumf.py +0 -0
  165. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/collaborative_filtering_recommender/neural/twotower.py +0 -0
  166. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/content_based_recommender/__init__.py +0 -0
  167. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/content_based_recommender/vsm.py +0 -0
  168. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/context_aware_recommender/__init__.py +0 -0
  169. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/context_aware_recommender/afm.py +0 -0
  170. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/context_aware_recommender/dcn.py +0 -0
  171. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/context_aware_recommender/dcnv2.py +0 -0
  172. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/context_aware_recommender/deepfm.py +0 -0
  173. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/context_aware_recommender/fm.py +0 -0
  174. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/context_aware_recommender/nfm.py +0 -0
  175. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/context_aware_recommender/wideanddeep.py +0 -0
  176. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/context_aware_recommender/xdeepfm.py +0 -0
  177. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/hybrid_recommender/__init__.py +0 -0
  178. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/hybrid_recommender/addease.py +0 -0
  179. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/hybrid_recommender/attributeitemknn.py +0 -0
  180. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/hybrid_recommender/attributeuserknn.py +0 -0
  181. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/hybrid_recommender/cease.py +0 -0
  182. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/knowledge_aware_recommender/__init__.py +0 -0
  183. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/knowledge_aware_recommender/cke.py +0 -0
  184. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/knowledge_aware_recommender/kahfm.py +0 -0
  185. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/knowledge_aware_recommender/kgat.py +0 -0
  186. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/knowledge_aware_recommender/kgcn.py +0 -0
  187. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/knowledge_aware_recommender/kgflex.py +0 -0
  188. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/knowledge_aware_recommender/kgin.py +0 -0
  189. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/knowledge_aware_recommender/knowledge_utils.py +0 -0
  190. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/knowledge_aware_recommender/ripplenet.py +0 -0
  191. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/layers.py +0 -0
  192. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/losses.py +0 -0
  193. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/lr_scheduler_wrapper.py +0 -0
  194. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/multimodal_recommender/__init__.py +0 -0
  195. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/multimodal_recommender/bm3.py +0 -0
  196. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/multimodal_recommender/freedom.py +0 -0
  197. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/multimodal_recommender/lattice.py +0 -0
  198. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/multimodal_recommender/mgcn.py +0 -0
  199. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/multimodal_recommender/mmgcn.py +0 -0
  200. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/multimodal_recommender/multimodal_utils.py +0 -0
  201. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/multimodal_recommender/vbpr.py +0 -0
  202. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/optimizer_wrapper.py +0 -0
  203. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/proxy.py +0 -0
  204. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/reranking/__init__.py +0 -0
  205. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/reranking/base.py +0 -0
  206. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/reranking/calibration.py +0 -0
  207. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/reranking/factory.py +0 -0
  208. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/reranking/mmr.py +0 -0
  209. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/sequential_recommender/__init__.py +0 -0
  210. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/sequential_recommender/bert4rec.py +0 -0
  211. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/sequential_recommender/bsarec.py +0 -0
  212. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/sequential_recommender/caser.py +0 -0
  213. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/sequential_recommender/cl4srec.py +0 -0
  214. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/sequential_recommender/core.py +0 -0
  215. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/sequential_recommender/duorec.py +0 -0
  216. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/sequential_recommender/esasrec.py +0 -0
  217. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/sequential_recommender/fossil.py +0 -0
  218. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/sequential_recommender/gru4rec.py +0 -0
  219. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/sequential_recommender/gsasrec.py +0 -0
  220. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/sequential_recommender/lightsans.py +0 -0
  221. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/sequential_recommender/linrec.py +0 -0
  222. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/sequential_recommender/narm.py +0 -0
  223. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/sequential_recommender/sasrec.py +0 -0
  224. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/sequential_recommender/stan.py +0 -0
  225. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/similarities.py +0 -0
  226. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/trainer/__init__.py +0 -0
  227. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/trainer/dashboard_callbacks.py +0 -0
  228. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/trainer/logger_callbacks.py +0 -0
  229. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/trainer/objectives.py +0 -0
  230. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/trainer/runtime.py +0 -0
  231. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/trainer/scheduler_wrapper.py +0 -0
  232. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/trainer/search_algorithm_wrapper.py +0 -0
  233. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/trainer/trainer.py +0 -0
  234. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/unpersonalized_recommender/__init__.py +0 -0
  235. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/unpersonalized_recommender/pop.py +0 -0
  236. {warprec-2.1.0 → warprec-2.1.2}/warprec/recommenders/unpersonalized_recommender/random.py +0 -0
  237. {warprec-2.1.0 → warprec-2.1.2}/warprec/run.py +0 -0
  238. {warprec-2.1.0 → warprec-2.1.2}/warprec/serve.py +0 -0
  239. {warprec-2.1.0 → warprec-2.1.2}/warprec/serving/__init__.py +0 -0
  240. {warprec-2.1.0 → warprec-2.1.2}/warprec/serving/api.py +0 -0
  241. {warprec-2.1.0 → warprec-2.1.2}/warprec/serving/app.py +0 -0
  242. {warprec-2.1.0 → warprec-2.1.2}/warprec/serving/catalogue.py +0 -0
  243. {warprec-2.1.0 → warprec-2.1.2}/warprec/serving/context.py +0 -0
  244. {warprec-2.1.0 → warprec-2.1.2}/warprec/serving/deployments.py +0 -0
  245. {warprec-2.1.0 → warprec-2.1.2}/warprec/serving/errors.py +0 -0
  246. {warprec-2.1.0 → warprec-2.1.2}/warprec/serving/mcp.py +0 -0
  247. {warprec-2.1.0 → warprec-2.1.2}/warprec/serving/payload.py +0 -0
  248. {warprec-2.1.0 → warprec-2.1.2}/warprec/serving/schemas.py +0 -0
  249. {warprec-2.1.0 → warprec-2.1.2}/warprec/serving/servable.py +0 -0
  250. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/__init__.py +0 -0
  251. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/callback.py +0 -0
  252. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/__init__.py +0 -0
  253. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/common.py +0 -0
  254. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/dashboard_configuration.py +0 -0
  255. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/estimate_configuration.py +0 -0
  256. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/evaluation_configuration.py +0 -0
  257. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/general_configuration.py +0 -0
  258. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/model_configuration.py +0 -0
  259. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/reader_configuration.py +0 -0
  260. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/recommender_model_config/__init__.py +0 -0
  261. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/recommender_model_config/collaborative_filtering_config/__init__.py +0 -0
  262. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/recommender_model_config/collaborative_filtering_config/autoencoder_config.py +0 -0
  263. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/recommender_model_config/collaborative_filtering_config/graph_based_config.py +0 -0
  264. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/recommender_model_config/collaborative_filtering_config/knn_config.py +0 -0
  265. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/recommender_model_config/collaborative_filtering_config/latent_factor_config.py +0 -0
  266. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/recommender_model_config/collaborative_filtering_config/neural_config.py +0 -0
  267. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/recommender_model_config/content_based_config.py +0 -0
  268. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/recommender_model_config/context_aware_config.py +0 -0
  269. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/recommender_model_config/hybrid_config.py +0 -0
  270. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/recommender_model_config/knowledge_aware_config.py +0 -0
  271. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/recommender_model_config/multimodal_config.py +0 -0
  272. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/recommender_model_config/sequential_model_config.py +0 -0
  273. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/recommender_model_config/unpersonalized_config.py +0 -0
  274. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/rerank_configuration.py +0 -0
  275. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/run_configuration.py +0 -0
  276. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/search_space_wrapper.py +0 -0
  277. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/serving_configuration.py +0 -0
  278. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/splitter_configuration.py +0 -0
  279. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/training_configuration.py +0 -0
  280. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/config/writer_configuration.py +0 -0
  281. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/enums.py +0 -0
  282. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/logger/__init__.py +0 -0
  283. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/logger/logger.py +0 -0
  284. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/pause.py +0 -0
  285. {warprec-2.1.0 → warprec-2.1.2}/warprec/utils/registry.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: warprec
3
- Version: 2.1.0
3
+ Version: 2.1.2
4
4
  Summary: Unifying Academic Rigor and Industrial Scale for Responsible, Reproducible, and Efficient Recommendation
5
5
  Author: MarcoWV
6
6
  Author-email: marco.avolio@wideverse.com
@@ -61,7 +61,7 @@ warprec = "warprec.run:main"
61
61
  "warprec.serve" = "warprec.serve:main"
62
62
 
63
63
  [tool.poetry]
64
- version = "2.1.0"
64
+ version = "2.1.2"
65
65
 
66
66
  [tool.poetry.dependencies]
67
67
  python = "^3.12"
@@ -234,10 +234,15 @@ def initialize_datasets(
234
234
  test_data = _align_set_on_train(train_data, test_data, "Test")
235
235
  if val_data is not None:
236
236
  if isinstance(val_data, list):
237
- for idx, (val_train, val_set) in enumerate(val_data):
238
- val_data[idx] = _align_set_on_train(
239
- train_data, val_set, "Validation"
237
+ # A fold is trained on its own train set, so that is the
238
+ # one its validation set has to be aligned with.
239
+ val_data = [
240
+ (
241
+ val_train,
242
+ _align_set_on_train(val_train, val_set, "Validation"),
240
243
  )
244
+ for val_train, val_set in val_data
245
+ ]
241
246
  else:
242
247
  val_data = _align_set_on_train(train_data, val_data, "Validation")
243
248
  else:
@@ -337,7 +342,7 @@ def initialize_datasets(
337
342
  specific_config["id_type"],
338
343
  common_cluster_type,
339
344
  ]
340
- dtype_map = zip(column_names, dtypes_list)
345
+ dtype_map = dict(zip(column_names, dtypes_list))
341
346
 
342
347
  # Read data using the custom reader
343
348
  file_format = specific_config["file_format"]
@@ -129,23 +129,14 @@ class Sessions:
129
129
  self._flat_users = df.select(self.user_label).to_numpy().flatten()
130
130
  self._flat_items = df.select(self.item_label).to_numpy().flatten()
131
131
 
132
- # Calculate Offsets
133
- # unique_users are sorted because df is sorted by user
134
- unique_users, start_indices = np.unique(self._flat_users, return_index=True)
135
-
132
+ # Calculate Offsets. The tape is sorted by user, so a user's rows start
133
+ # where the counts of every lower index end. Counting rather than
134
+ # locating starts gives a user with no rows an empty range wherever it
135
+ # falls, the end of the index space included, which a cold-start
136
+ # protocol produces whenever it holds out the highest indices.
137
+ counts = np.bincount(self._flat_users, minlength=self._nuid)
136
138
  self._user_offsets = np.zeros(self._nuid + 1, dtype=np.int64)
137
-
138
- # Set starts
139
- self._user_offsets[unique_users] = start_indices
140
- # Set ends (start of next user)
141
- self._user_offsets[unique_users + 1] = np.roll(start_indices, -1)
142
- self._user_offsets[-1] = len(self._flat_items)
143
-
144
- # Fill gaps for users with no interactions (propagate previous offset)
145
- # This ensures user_offsets[u] == user_offsets[u+1] for empty users
146
- for i in range(1, len(self._user_offsets)):
147
- if self._user_offsets[i] == 0 and self._user_offsets[i - 1] > 0:
148
- self._user_offsets[i] = self._user_offsets[i - 1]
139
+ np.cumsum(counts, out=self._user_offsets[1:])
149
140
 
150
141
  def get_user_history_sequences(
151
142
  self, user_ids: List[int], max_seq_len: int
@@ -99,31 +99,36 @@ class Splitter:
99
99
  # CASE 1: Only train and test set
100
100
  return (original_train_set, None, test_set)
101
101
 
102
+ # Each validation set is aligned with the train set it validates.
103
+ validation_folds = [
104
+ (
105
+ train,
106
+ self.filter_sets(
107
+ train,
108
+ val_set,
109
+ labels.user_id,
110
+ labels.item_id,
111
+ "Validation",
112
+ cold_dimension=cold,
113
+ ),
114
+ )
115
+ for train, val_set in validation_folds
116
+ ]
117
+
102
118
  if len(validation_folds) == 1:
103
- # CASE 2: Train/Validation/Test
119
+ # CASE 2: Train/Validation/Test. The main model trains on the train
120
+ # set the validation split left, so the test set is aligned with it.
104
121
  train_set, validation_set = validation_folds[0]
105
122
  test_set = self.filter_sets(
106
123
  train_set,
107
124
  test_set,
108
125
  labels.user_id,
109
126
  labels.item_id,
110
- "Validation",
127
+ "Test",
111
128
  cold_dimension=cold,
112
129
  )
113
130
  return (train_set, validation_set, test_set)
114
131
 
115
- # Filter out each validation set based on
116
- # corresponding train set
117
- for train, val_set in validation_folds:
118
- val_set = self.filter_sets(
119
- train,
120
- val_set,
121
- labels.user_id,
122
- labels.item_id,
123
- "Validation",
124
- cold_dimension=cold,
125
- )
126
-
127
132
  # CASE 3: N folds of train and validation + the test set
128
133
  return (original_train_set, validation_folds, test_set)
129
134
 
@@ -1,9 +1,10 @@
1
1
  import time
2
2
  from dataclasses import dataclass
3
- from typing import List, Optional, Tuple
3
+ from typing import Any, List, Optional, Tuple
4
4
 
5
5
  import ray
6
6
 
7
+ import warprec
7
8
  from warprec.common import (
8
9
  RunState,
9
10
  RunStateStore,
@@ -67,10 +68,10 @@ def initialise_ray(config: TrainConfiguration) -> None:
67
68
  Raises:
68
69
  ConnectionError: If unable to connect to the Ray cluster.
69
70
  """
70
- py_modules = (
71
- [] if config.general.custom_modules is None else config.general.custom_modules
72
- )
73
- py_modules.extend(["warprec"]) # type: ignore[union-attr]
71
+ # WarpRec is shipped as the package that is imported here, wherever it is
72
+ # installed, rather than as a path that exists only when WarpRec is run
73
+ # from its own repository. The configured list is copied, not extended.
74
+ py_modules: List[Any] = [*(config.general.custom_modules or []), warprec]
74
75
 
75
76
  try:
76
77
  ray.init(
@@ -6,7 +6,11 @@ from typing import Dict, Any, List
6
6
 
7
7
  import yaml
8
8
  from pydantic import BaseModel, model_validator, Field
9
- from warprec.utils.helpers import load_custom_modules, validation_metric
9
+ from warprec.utils.helpers import (
10
+ is_python_module,
11
+ load_custom_modules,
12
+ validation_metric,
13
+ )
10
14
  from warprec.data.filtering import Filter
11
15
  from warprec.utils.config import (
12
16
  GeneralConfig,
@@ -49,6 +53,33 @@ class WarpRecConfiguration(BaseModel):
49
53
  training: TrainingConfig = Field(default_factory=TrainingConfig)
50
54
  rerank: RerankConfig = Field(default_factory=RerankConfig)
51
55
 
56
+ @model_validator(mode="before")
57
+ @classmethod
58
+ def load_custom_modules_first(cls, data: Any) -> Any:
59
+ """Import the user's modules before any section is validated.
60
+
61
+ Sections check the names they are given against the registries, so a
62
+ model, metric or filter a custom module registers has to be there
63
+ before them. A path that is not a module is left to the 'general'
64
+ section, which rejects it with a message saying so.
65
+
66
+ Args:
67
+ data (Any): The raw configuration.
68
+
69
+ Returns:
70
+ Any: The raw configuration, unchanged.
71
+ """
72
+ if not isinstance(data, dict):
73
+ return data
74
+ general = data.get("general") or {}
75
+ modules = general.get("custom_modules") if isinstance(general, dict) else None
76
+ if isinstance(modules, str):
77
+ modules = [modules]
78
+ load_custom_modules(
79
+ [m for m in modules or [] if isinstance(m, str) and is_python_module(m)]
80
+ )
81
+ return data
82
+
52
83
  @model_validator(mode="after")
53
84
  def migrate_reader_training_options(self) -> "WarpRecConfiguration":
54
85
  """Carry the training options still written under the reader across.
@@ -116,9 +147,6 @@ class WarpRecConfiguration(BaseModel):
116
147
  "Both storage_account_name and container_name must be provided in Azure configuration."
117
148
  )
118
149
 
119
- # Load custom modules if specified
120
- load_custom_modules(self.general.custom_modules)
121
-
122
150
  # Check if the filters have been set correctly
123
151
  if self.filtering is not None:
124
152
  labels = self.reader.labels.model_dump()
@@ -1,4 +1,5 @@
1
1
  import importlib
2
+ import sys
2
3
  import os
3
4
  from typing import Any, Optional, Dict, List, Tuple, TYPE_CHECKING
4
5
  from pathlib import Path
@@ -7,7 +8,6 @@ from torch.utils.data import DataLoader
7
8
 
8
9
  from warprec.utils.config.model_configuration import RecomModel
9
10
  from warprec.utils.registry import params_registry
10
- from warprec.utils.logger import logger
11
11
 
12
12
  if TYPE_CHECKING:
13
13
  from warprec.data.dataset import Dataset
@@ -17,22 +17,38 @@ if TYPE_CHECKING:
17
17
  def load_custom_modules(custom_modules: str | List[str] | None):
18
18
  """Load custom modules dynamically.
19
19
 
20
+ A module is imported under its own name, the file or directory name without
21
+ the extension, with its parent directory made importable. That is also the
22
+ name Ray gives the copy it ships to every worker through the runtime
23
+ environment's py_modules, so the driver and the workers agree on it.
24
+
20
25
  Args:
21
26
  custom_modules (str | List[str] | None): List of custom module paths to import.
22
27
  Each path can either point to a Python file (ending with .py)
23
28
  or a directory containing an __init__.py file.
29
+
30
+ Raises:
31
+ ImportError: If a module cannot be imported. A run that carried on
32
+ without it would only fail later, on a name it does not know.
24
33
  """
25
34
  if isinstance(custom_modules, str):
26
35
  custom_modules = [custom_modules]
27
36
 
28
- # Import custom models dynamically
29
- if custom_modules is not None and len(custom_modules) > 0:
30
- for model_path in custom_modules:
31
- model_path = model_path.removesuffix(".py")
32
- try:
33
- importlib.import_module(model_path)
34
- except ImportError as e:
35
- logger.negative(f"Failed to import custom model {model_path}: {e}")
37
+ for module_path in custom_modules or []:
38
+ path = Path(module_path)
39
+ # On a Ray worker the path may not exist, the module having been shipped
40
+ # rather than copied there, but it is already importable by name.
41
+ if path.exists():
42
+ parent = str(path.resolve().parent)
43
+ if parent not in sys.path:
44
+ sys.path.insert(0, parent)
45
+ name = path.name.removesuffix(".py")
46
+ try:
47
+ importlib.import_module(name)
48
+ except ImportError as e:
49
+ raise ImportError(
50
+ f"Failed to import the custom module '{name}' from '{module_path}': {e}"
51
+ ) from e
36
52
 
37
53
 
38
54
  def is_python_module(path: str | Path) -> bool:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes