lecrapaud 0.18.3__tar.gz → 0.18.4__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.
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/PKG-INFO +1 -1
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/models/experiment.py +19 -10
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/pyproject.toml +1 -1
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/LICENSE +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/README.md +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/__init__.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/api.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/config.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/__init__.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/alembic/README +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/alembic/env.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/alembic/script.py.mako +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/alembic/versions/2025_06_23_1748-f089dfb7e3ba_.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/alembic/versions/2025_06_24_1216-c62251b129ed_.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/alembic/versions/2025_06_24_1711-86457e2f333f_.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/alembic/versions/2025_06_25_1759-72aa496ca65b_.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/alembic/versions/2025_08_25_1434-7ed9963e732f_add_best_score_to_model_selection.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/alembic.ini +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/models/__init__.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/models/base.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/models/feature.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/models/feature_selection.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/models/feature_selection_rank.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/models/model.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/models/model_selection.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/models/model_training.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/models/score.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/models/target.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/models/utils.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/session.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/directories.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/experiment.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/feature_engineering.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/feature_selection.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/integrations/openai_integration.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/jobs/__init__.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/jobs/config.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/jobs/scheduler.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/jobs/tasks.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/misc/tabpfn_tests.ipynb +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/misc/test-gpu-bilstm.ipynb +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/misc/test-gpu-resnet.ipynb +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/misc/test-gpu-transformers.ipynb +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/model_selection.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/search_space.py +0 -0
- {lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/utils.py +0 -0
|
@@ -25,7 +25,7 @@ from lecrapaud.db.models.score import Score
|
|
|
25
25
|
|
|
26
26
|
from lecrapaud.db.models.base import Base, with_db
|
|
27
27
|
from lecrapaud.db.models.utils import create_association_table
|
|
28
|
-
from lecrapaud.utils import logger
|
|
28
|
+
from lecrapaud.utils import logger, contains_best
|
|
29
29
|
|
|
30
30
|
# jointures
|
|
31
31
|
lecrapaud_experiment_target_association = create_association_table(
|
|
@@ -237,13 +237,27 @@ class Experiment(Base):
|
|
|
237
237
|
Returns:
|
|
238
238
|
Experiment or None: The experiment with the best score or None if not found
|
|
239
239
|
"""
|
|
240
|
+
experiments = db.query(cls).filter(cls.name.ilike(f"%{name}%")).all()
|
|
241
|
+
if not experiments:
|
|
242
|
+
logger.error(f"No experiments found with the given name: {name}")
|
|
243
|
+
return None
|
|
244
|
+
|
|
245
|
+
experiments = [
|
|
246
|
+
exp
|
|
247
|
+
for exp in experiments
|
|
248
|
+
if all(
|
|
249
|
+
[contains_best(f"{exp.path}/{target.name}") for target in exp.targets]
|
|
250
|
+
)
|
|
251
|
+
]
|
|
252
|
+
if not experiments:
|
|
253
|
+
logger.error(
|
|
254
|
+
f"No fully trained experiments found with the given name: {name}"
|
|
255
|
+
)
|
|
256
|
+
return None
|
|
257
|
+
|
|
240
258
|
if metric == "both":
|
|
241
259
|
# Calculate a combined score: average of normalized RMSE and LogLoss
|
|
242
260
|
# This ensures we're comparing apples to apples by normalizing the scores
|
|
243
|
-
experiments = db.query(cls).filter(cls.name.ilike(f"%{name}%")).all()
|
|
244
|
-
if not experiments:
|
|
245
|
-
logger.error(f"No experiments found with the given name: {name}")
|
|
246
|
-
return None
|
|
247
261
|
|
|
248
262
|
# Get all scores
|
|
249
263
|
rmse_scores = [e.avg_rmse for e in experiments if e.avg_rmse is not None]
|
|
@@ -284,11 +298,6 @@ class Experiment(Base):
|
|
|
284
298
|
|
|
285
299
|
elif metric == "rmse" or metric == "logloss":
|
|
286
300
|
# For single metric case (rmse or logloss)
|
|
287
|
-
# Need to get all experiments first to evaluate instance properties
|
|
288
|
-
experiments = db.query(cls).filter(cls.name.ilike(f"%{name}%")).all()
|
|
289
|
-
|
|
290
|
-
if not experiments:
|
|
291
|
-
return None
|
|
292
301
|
|
|
293
302
|
# Filter out experiments without scores and sort by the selected metric
|
|
294
303
|
filtered_experiments = []
|
|
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.3 → lecrapaud-0.18.4}/lecrapaud/db/alembic/versions/2025_06_23_1748-f089dfb7e3ba_.py
RENAMED
|
File without changes
|
{lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/alembic/versions/2025_06_24_1216-c62251b129ed_.py
RENAMED
|
File without changes
|
{lecrapaud-0.18.3 → lecrapaud-0.18.4}/lecrapaud/db/alembic/versions/2025_06_24_1711-86457e2f333f_.py
RENAMED
|
File without changes
|
{lecrapaud-0.18.3 → lecrapaud-0.18.4}/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
|
|
File without changes
|