lecrapaud 0.18.2__tar.gz → 0.18.3__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.
Potentially problematic release.
This version of lecrapaud might be problematic. Click here for more details.
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/PKG-INFO +1 -1
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/feature_engineering.py +1 -1
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/model_selection.py +7 -4
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/pyproject.toml +1 -1
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/LICENSE +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/README.md +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/__init__.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/api.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/config.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/__init__.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/alembic/README +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/alembic/env.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/alembic/script.py.mako +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/alembic/versions/2025_06_23_1748-f089dfb7e3ba_.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/alembic/versions/2025_06_24_1216-c62251b129ed_.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/alembic/versions/2025_06_24_1711-86457e2f333f_.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/alembic/versions/2025_06_25_1759-72aa496ca65b_.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/alembic/versions/2025_08_25_1434-7ed9963e732f_add_best_score_to_model_selection.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/alembic.ini +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/models/__init__.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/models/base.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/models/experiment.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/models/feature.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/models/feature_selection.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/models/feature_selection_rank.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/models/model.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/models/model_selection.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/models/model_training.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/models/score.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/models/target.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/models/utils.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/session.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/directories.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/experiment.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/feature_selection.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/integrations/openai_integration.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/jobs/__init__.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/jobs/config.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/jobs/scheduler.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/jobs/tasks.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/misc/tabpfn_tests.ipynb +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/misc/test-gpu-bilstm.ipynb +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/misc/test-gpu-resnet.ipynb +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/misc/test-gpu-transformers.ipynb +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/search_space.py +0 -0
- {lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/utils.py +0 -0
|
@@ -220,7 +220,7 @@ class FeatureEngineeringEngine:
|
|
|
220
220
|
Returns:
|
|
221
221
|
pd.DataFrame: Original dataframe with new encoded columns added
|
|
222
222
|
"""
|
|
223
|
-
|
|
223
|
+
# TODO: target encoding needs to be fit / transform based at inference time.
|
|
224
224
|
df: pd.DataFrame = self.data
|
|
225
225
|
columns_te_groupby: list[list[str]] = self.columns_te_groupby
|
|
226
226
|
columns_te_target: list[str] = self.columns_te_target
|
|
@@ -12,6 +12,7 @@ import glob
|
|
|
12
12
|
from pathlib import Path
|
|
13
13
|
import pickle
|
|
14
14
|
from pydantic import BaseModel
|
|
15
|
+
import ast
|
|
15
16
|
|
|
16
17
|
os.environ["COVERAGE_FILE"] = str(Path(".coverage").resolve())
|
|
17
18
|
|
|
@@ -122,6 +123,7 @@ class ModelEngine:
|
|
|
122
123
|
plot: bool = False,
|
|
123
124
|
log_dir: str = None,
|
|
124
125
|
):
|
|
126
|
+
self.threshold = None
|
|
125
127
|
self.path = path
|
|
126
128
|
if path:
|
|
127
129
|
self.load()
|
|
@@ -152,8 +154,6 @@ class ModelEngine:
|
|
|
152
154
|
else:
|
|
153
155
|
self.scaler_y = None
|
|
154
156
|
|
|
155
|
-
self.threshold = None
|
|
156
|
-
|
|
157
157
|
def fit(self, *args):
|
|
158
158
|
if self.recurrent:
|
|
159
159
|
fit = self.fit_recurrent
|
|
@@ -1070,7 +1070,7 @@ class ModelSelectionEngine:
|
|
|
1070
1070
|
best_score_overall = scores_tracking.iloc[0, :]
|
|
1071
1071
|
best_model_name = best_score_overall["MODEL_NAME"]
|
|
1072
1072
|
if self.target_type == "classification":
|
|
1073
|
-
best_thresholds = best_score_overall["THRESHOLDS"]
|
|
1073
|
+
best_thresholds = ast.literal_eval(best_score_overall["THRESHOLDS"])
|
|
1074
1074
|
joblib.dump(best_thresholds, f"{self.target_dir}/thresholds.pkl")
|
|
1075
1075
|
else:
|
|
1076
1076
|
best_thresholds = None
|
|
@@ -1852,7 +1852,9 @@ def apply_thresholds(
|
|
|
1852
1852
|
"""
|
|
1853
1853
|
|
|
1854
1854
|
# Case 1: Per-class thresholds
|
|
1855
|
-
if isinstance(threshold,
|
|
1855
|
+
if not isinstance(threshold, int):
|
|
1856
|
+
if isinstance(threshold, str):
|
|
1857
|
+
threshold = ast.literal_eval(threshold)
|
|
1856
1858
|
class_predictions = []
|
|
1857
1859
|
class_probabilities = []
|
|
1858
1860
|
|
|
@@ -1862,6 +1864,7 @@ def apply_thresholds(
|
|
|
1862
1864
|
metrics.get("threshold") if isinstance(metrics, dict) else metrics[0]
|
|
1863
1865
|
)
|
|
1864
1866
|
if _threshold is not None:
|
|
1867
|
+
class_label = int(class_label)
|
|
1865
1868
|
if class_label not in pred_proba.columns:
|
|
1866
1869
|
continue # skip missing class
|
|
1867
1870
|
col = pred_proba[class_label]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/alembic/versions/2025_06_23_1748-f089dfb7e3ba_.py
RENAMED
|
File without changes
|
{lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/alembic/versions/2025_06_24_1216-c62251b129ed_.py
RENAMED
|
File without changes
|
{lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/alembic/versions/2025_06_24_1711-86457e2f333f_.py
RENAMED
|
File without changes
|
{lecrapaud-0.18.2 → lecrapaud-0.18.3}/lecrapaud/db/alembic/versions/2025_06_25_1759-72aa496ca65b_.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|