lecrapaud 0.16.1__py3-none-any.whl → 0.16.2__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 +3 -4
- lecrapaud/experiment.py +0 -1
- lecrapaud/model_selection.py +18 -1
- {lecrapaud-0.16.1.dist-info → lecrapaud-0.16.2.dist-info}/METADATA +1 -1
- {lecrapaud-0.16.1.dist-info → lecrapaud-0.16.2.dist-info}/RECORD +7 -7
- {lecrapaud-0.16.1.dist-info → lecrapaud-0.16.2.dist-info}/LICENSE +0 -0
- {lecrapaud-0.16.1.dist-info → lecrapaud-0.16.2.dist-info}/WHEEL +0 -0
lecrapaud/api.py
CHANGED
|
@@ -88,7 +88,7 @@ class LeCrapaud:
|
|
|
88
88
|
"""
|
|
89
89
|
return ExperimentEngine(id=id, **kwargs)
|
|
90
90
|
|
|
91
|
-
def
|
|
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
|
-
|
|
490
|
+
print(f"Class {class_label}:")
|
|
492
491
|
plot_threshold(tmp_pred, threshold, precision, recall)
|
|
493
492
|
else:
|
|
494
|
-
|
|
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
|
|
lecrapaud/model_selection.py
CHANGED
|
@@ -1162,6 +1162,23 @@ class ModelSelectionEngine:
|
|
|
1162
1162
|
stop={"training_iteration": 100},
|
|
1163
1163
|
storage_path=storage_path,
|
|
1164
1164
|
callbacks=[TBXLoggerCallback()],
|
|
1165
|
+
runtime_env={
|
|
1166
|
+
"excludes": [
|
|
1167
|
+
".git/**/*",
|
|
1168
|
+
"**/*.pyc",
|
|
1169
|
+
"**/__pycache__",
|
|
1170
|
+
"**/data/*",
|
|
1171
|
+
"**/notebooks/*",
|
|
1172
|
+
"**/tests/*",
|
|
1173
|
+
"**/docs/*",
|
|
1174
|
+
"**/.pytest_cache/*",
|
|
1175
|
+
"**/venv/*",
|
|
1176
|
+
"**/.venv/*",
|
|
1177
|
+
"**/build/*",
|
|
1178
|
+
"**/dist/*",
|
|
1179
|
+
"**/*.egg-info/*",
|
|
1180
|
+
]
|
|
1181
|
+
},
|
|
1165
1182
|
),
|
|
1166
1183
|
)
|
|
1167
1184
|
try:
|
|
@@ -1789,7 +1806,7 @@ def plot_threshold(prediction, threshold, precision, recall):
|
|
|
1789
1806
|
per_predicted_positive = predicted_positive / len(y_pred_proba)
|
|
1790
1807
|
per_predicted_negative = predicted_negative / len(y_pred_proba)
|
|
1791
1808
|
|
|
1792
|
-
|
|
1809
|
+
print(
|
|
1793
1810
|
f"""Threshold: {threshold*100:.2f}
|
|
1794
1811
|
Precision: {precision*100:.2f}
|
|
1795
1812
|
Recall: {recall*100:.2f}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
lecrapaud/__init__.py,sha256=oCxbtw_nk8rlOXbXbWo0RRMlsh6w-hTiZ6e5PRG_wp0,28
|
|
2
|
-
lecrapaud/api.py,sha256=
|
|
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=
|
|
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=
|
|
39
|
+
lecrapaud/model_selection.py,sha256=dz9gRLUEkaOFo8EneS6t7GJRSJXKyWmbbYRRulIKE1Q,68492
|
|
40
40
|
lecrapaud/search_space.py,sha256=-JkzuMhaomdwiWi4HvVQY5hiw3-oREemJA16tbwEIp4,34854
|
|
41
41
|
lecrapaud/utils.py,sha256=JdBB1NvbNIx4y0Una-kSZdo1_ZEocc5hwyYFIZKHmGg,8305
|
|
42
|
-
lecrapaud-0.16.
|
|
43
|
-
lecrapaud-0.16.
|
|
44
|
-
lecrapaud-0.16.
|
|
45
|
-
lecrapaud-0.16.
|
|
42
|
+
lecrapaud-0.16.2.dist-info/LICENSE,sha256=MImCryu0AnqhJE_uAZD-PIDKXDKb8sT7v0i1NOYeHTM,11350
|
|
43
|
+
lecrapaud-0.16.2.dist-info/METADATA,sha256=TPKjiK_wQekvDhTXf8XXg_TtkIRdizJoJcawSmdrfQY,11081
|
|
44
|
+
lecrapaud-0.16.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
45
|
+
lecrapaud-0.16.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|