lecrapaud 0.16.1__py3-none-any.whl → 0.16.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.

Potentially problematic release.


This version of lecrapaud might be problematic. Click here for more details.

lecrapaud/api.py CHANGED
@@ -88,7 +88,7 @@ class LeCrapaud:
88
88
  """
89
89
  return ExperimentEngine(id=id, **kwargs)
90
90
 
91
- def get_last_experiement_by_name(self, name: str, **kwargs) -> "ExperimentEngine":
91
+ def get_last_experiment_by_name(self, name: str, **kwargs) -> "ExperimentEngine":
92
92
  """Retrieve the last experiment by name."""
93
93
  return ExperimentEngine(id=Experiment.get_last_by_name(name).id, **kwargs)
94
94
 
@@ -131,7 +131,6 @@ class ExperimentEngine:
131
131
  experiment_dir = f"{tmp_dir}/{self.experiment.name}"
132
132
  preprocessing_dir = f"{experiment_dir}/preprocessing"
133
133
  data_dir = f"{experiment_dir}/data"
134
- os.makedirs(experiment_dir, exist_ok=True)
135
134
  os.makedirs(preprocessing_dir, exist_ok=True)
136
135
  os.makedirs(data_dir, exist_ok=True)
137
136
  else:
@@ -488,10 +487,10 @@ class ExperimentEngine:
488
487
  if threshold is not None:
489
488
  tmp_pred = prediction[["TARGET", "PRED", class_label]].copy()
490
489
  tmp_pred.rename(columns={class_label: 1}, inplace=True)
491
- logger.info(f"Class {class_label}:")
490
+ print(f"Class {class_label}:")
492
491
  plot_threshold(tmp_pred, threshold, precision, recall)
493
492
  else:
494
- logger.info(f"No threshold found for class {class_label}")
493
+ print(f"No threshold found for class {class_label}")
495
494
 
496
495
  def get_best_params(self, target_number: int = None) -> dict:
497
496
  """
lecrapaud/experiment.py CHANGED
@@ -47,7 +47,6 @@ def create_experiment(
47
47
  experiment_dir = f"{tmp_dir}/{experiment_name}"
48
48
  preprocessing_dir = f"{experiment_dir}/preprocessing"
49
49
  data_dir = f"{experiment_dir}/data"
50
- os.makedirs(experiment_dir, exist_ok=True)
51
50
  os.makedirs(preprocessing_dir, exist_ok=True)
52
51
  os.makedirs(data_dir, exist_ok=True)
53
52
 
@@ -883,7 +883,7 @@ class ModelSelectionEngine:
883
883
  model_best_params = json_dict[model_name]
884
884
  except Exception:
885
885
  raise FileNotFoundError(
886
- f"Could not find {model_name} in current data. Try to run an hyperoptimization by setting `perform_hyperopt` to true, pass `best_params`"
886
+ f"Could not find {model_name} in current data. Try to run an hyperoptimization by setting `perform_hyperopt` to true, or pass `best_params`"
887
887
  )
888
888
 
889
889
  # save best params
@@ -1133,6 +1133,27 @@ class ModelSelectionEngine:
1133
1133
 
1134
1134
  storage_path = f"{self.results_dir}/ray_results"
1135
1135
 
1136
+ # Initialize Ray with the runtime environment
1137
+ ray.init(
1138
+ runtime_env={
1139
+ "excludes": [
1140
+ ".git/**/*",
1141
+ "**/*.pyc",
1142
+ "**/__pycache__",
1143
+ "**/data/*",
1144
+ "**/notebooks/*",
1145
+ "**/tests/*",
1146
+ "**/docs/*",
1147
+ "**/.pytest_cache/*",
1148
+ "**/venv/*",
1149
+ "**/.venv/*",
1150
+ "**/build/*",
1151
+ "**/dist/*",
1152
+ "**/*.egg-info/*",
1153
+ ]
1154
+ }
1155
+ )
1156
+
1136
1157
  tuner = Tuner(
1137
1158
  trainable=with_parameters(
1138
1159
  trainable,
@@ -1789,7 +1810,7 @@ def plot_threshold(prediction, threshold, precision, recall):
1789
1810
  per_predicted_positive = predicted_positive / len(y_pred_proba)
1790
1811
  per_predicted_negative = predicted_negative / len(y_pred_proba)
1791
1812
 
1792
- logger.info(
1813
+ print(
1793
1814
  f"""Threshold: {threshold*100:.2f}
1794
1815
  Precision: {precision*100:.2f}
1795
1816
  Recall: {recall*100:.2f}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lecrapaud
3
- Version: 0.16.1
3
+ Version: 0.16.3
4
4
  Summary: Framework for machine and deep learning, with regression, classification and time series analysis
5
5
  License: Apache License
6
6
  Author: Pierre H. Gallet
@@ -1,5 +1,5 @@
1
1
  lecrapaud/__init__.py,sha256=oCxbtw_nk8rlOXbXbWo0RRMlsh6w-hTiZ6e5PRG_wp0,28
2
- lecrapaud/api.py,sha256=oC64qv4jjfhO6Nn8rS92_xPwT71isSOIBCwyuxyIdqE,20368
2
+ lecrapaud/api.py,sha256=qPswq6faq3bhCmcFUqukQesS3BGlXL35fPbeqlpx6ng,20300
3
3
  lecrapaud/config.py,sha256=N8kQS1bNEXp6loIw7_X2_OjrbY4_a7UZhZcT1XgsYAs,1121
4
4
  lecrapaud/db/__init__.py,sha256=82o9fMfaqKXPh2_rt44EzNRVZV1R4LScEnQYvj_TjK0,34
5
5
  lecrapaud/db/alembic/README,sha256=MVlc9TYmr57RbhXET6QxgyCcwWP7w-vLkEsirENqiIQ,38
@@ -24,7 +24,7 @@ lecrapaud/db/models/target.py,sha256=DKnfeaLU8eT8J_oh_vuFo5-o1CaoXR13xBbswme6Bgk
24
24
  lecrapaud/db/models/utils.py,sha256=-a-nWWmpJ2XzidIxo2COVUTrGZIPYCfBzjhcszJj_bM,1109
25
25
  lecrapaud/db/session.py,sha256=K9dTyXmO-aF_2r9RRHsDsbW9_zLNDaOcchXlpiv7cSo,2719
26
26
  lecrapaud/directories.py,sha256=0LrANuDgbuneSLker60c6q2hmGnQ3mKHIztTGzTx6Gw,826
27
- lecrapaud/experiment.py,sha256=u1whBtRFEhjM2OtKwHuUAp6T_7JXZhf_90luUiV4nD8,2514
27
+ lecrapaud/experiment.py,sha256=1xLWjOrqAxJh9CdXOx9ppQuRFRRj0GH-xYZqg-ty9hI,2463
28
28
  lecrapaud/feature_engineering.py,sha256=2HaWn5UnZzczJBo7EyY1m1SGPmI6TpGXcwF58h_9wBE,32580
29
29
  lecrapaud/feature_selection.py,sha256=6ry-oVPQHbipm1XSE5YsH7AY0lQFt4CFbWiHiRs1nxg,43593
30
30
  lecrapaud/integrations/openai_integration.py,sha256=hHLF3fk5Bps8KNbNrEL3NUFa945jwClE6LrLpuMZOd4,7459
@@ -36,10 +36,10 @@ lecrapaud/misc/tabpfn_tests.ipynb,sha256=VkgsCUJ30d8jaL2VaWtQAgb8ngHPNtPgnXLs7QQ
36
36
  lecrapaud/misc/test-gpu-bilstm.ipynb,sha256=4nLuZRJVe2kn6kEmauhRiz5wkWT9AVrYhI9CEk_dYUY,9608
37
37
  lecrapaud/misc/test-gpu-resnet.ipynb,sha256=27Vu7nYwujYeh3fOxBNCnKJn3MXNPKZU-U8oDDUbymg,4944
38
38
  lecrapaud/misc/test-gpu-transformers.ipynb,sha256=k6MBSs_Um1h4PykvE-LTBcdpbWLbIFST_xl_AFW2jgI,8444
39
- lecrapaud/model_selection.py,sha256=vV2oO_fhhJ4dozOQCn_ySJzQT5gMVtQbLR4Wf59bi3A,67885
39
+ lecrapaud/model_selection.py,sha256=l3ClaTeoz9wQak7nah3wsA_rlu7R1OChUAUk-ce5MjU,68509
40
40
  lecrapaud/search_space.py,sha256=-JkzuMhaomdwiWi4HvVQY5hiw3-oREemJA16tbwEIp4,34854
41
41
  lecrapaud/utils.py,sha256=JdBB1NvbNIx4y0Una-kSZdo1_ZEocc5hwyYFIZKHmGg,8305
42
- lecrapaud-0.16.1.dist-info/LICENSE,sha256=MImCryu0AnqhJE_uAZD-PIDKXDKb8sT7v0i1NOYeHTM,11350
43
- lecrapaud-0.16.1.dist-info/METADATA,sha256=Owc-t3_MFAf9Dnz9jNm2U7M6G-sdStbASPV7g6EXiQA,11081
44
- lecrapaud-0.16.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
45
- lecrapaud-0.16.1.dist-info/RECORD,,
42
+ lecrapaud-0.16.3.dist-info/LICENSE,sha256=MImCryu0AnqhJE_uAZD-PIDKXDKb8sT7v0i1NOYeHTM,11350
43
+ lecrapaud-0.16.3.dist-info/METADATA,sha256=UvUfHYr9HNMOluhg9QNbdcFZ9f_I_cwT2Fk5kkAPP_8,11081
44
+ lecrapaud-0.16.3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
45
+ lecrapaud-0.16.3.dist-info/RECORD,,