lecrapaud 0.6.2__tar.gz → 0.7.1__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.6.2 → lecrapaud-0.7.1}/PKG-INFO +1 -1
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/api.py +16 -3
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/config.py +1 -1
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/feature_engineering.py +2 -2
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/feature_selection.py +1 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/jobs/tasks.py +2 -2
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/model_selection.py +2 -2
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/pyproject.toml +1 -1
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/LICENSE +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/README.md +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/__init__.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/__init__.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/alembic/README +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/alembic/env.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/alembic/script.py.mako +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/alembic/versions/2025_06_23_1748-f089dfb7e3ba_.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/alembic/versions/2025_06_24_1216-c62251b129ed_.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/alembic/versions/2025_06_24_1711-86457e2f333f_.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/alembic.ini +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/models/__init__.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/models/base.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/models/experiment.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/models/feature.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/models/feature_selection.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/models/feature_selection_rank.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/models/model.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/models/model_selection.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/models/model_training.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/models/score.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/models/target.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/session.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/directories.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/experiment.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/integrations/openai_integration.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/jobs/__init__.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/jobs/config.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/jobs/scheduler.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/search_space.py +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/speed_tests/test-gpu-bilstm.ipynb +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/speed_tests/test-gpu-resnet.ipynb +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/speed_tests/test-gpu-transformers.ipynb +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/speed_tests/tests.ipynb +0 -0
- {lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/utils.py +0 -0
|
@@ -48,13 +48,13 @@ class LeCrapaud:
|
|
|
48
48
|
init_db(uri=uri)
|
|
49
49
|
|
|
50
50
|
def create_experiment(self, data: pd.DataFrame, **kwargs):
|
|
51
|
-
return
|
|
51
|
+
return ExperimentEngine(data=data, **kwargs)
|
|
52
52
|
|
|
53
53
|
def get_experiment(self, id: int, **kwargs):
|
|
54
|
-
return
|
|
54
|
+
return ExperimentEngine(id=id, **kwargs)
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
class
|
|
57
|
+
class ExperimentEngine:
|
|
58
58
|
def __init__(self, id=None, data=None, **kwargs):
|
|
59
59
|
if id:
|
|
60
60
|
self.experiment = Experiment.get(id)
|
|
@@ -285,3 +285,16 @@ class App:
|
|
|
285
285
|
plot=self.plot,
|
|
286
286
|
preserve_model=self.preserve_model,
|
|
287
287
|
)
|
|
288
|
+
|
|
289
|
+
def get_scores(self, target_number: int):
|
|
290
|
+
return pd.read_csv(
|
|
291
|
+
f"{self.experiment.path}/TARGET_{target_number}/scores_tracking.csv"
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
def get_prediction(self, target_number: int, model_name: str):
|
|
295
|
+
return pd.read_csv(
|
|
296
|
+
f"{self.experiment.path}/TARGET_{target_number}/{model_name}/prediction.csv"
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
def get_feature_summary(self):
|
|
300
|
+
return pd.read_csv(f"{self.experiment.path}/feature_summary.csv")
|
|
@@ -5,7 +5,7 @@ load_dotenv(override=False)
|
|
|
5
5
|
|
|
6
6
|
PYTHON_ENV = os.getenv("PYTHON_ENV")
|
|
7
7
|
REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379")
|
|
8
|
-
|
|
8
|
+
EXPERIMENT_ID = os.getenv("EXPERIMENT_ID")
|
|
9
9
|
LOGGING_LEVEL = os.getenv("LOGGING_LEVEL", "INFO")
|
|
10
10
|
|
|
11
11
|
DB_USER = (
|
|
@@ -358,8 +358,8 @@ class PreprocessFeature:
|
|
|
358
358
|
|
|
359
359
|
# PCA
|
|
360
360
|
train, pcas = self.add_pca_features(train)
|
|
361
|
-
val, _ = self.add_pca_features(
|
|
362
|
-
test, _ = self.add_pca_features(
|
|
361
|
+
val, _ = self.add_pca_features(val, pcas=pcas)
|
|
362
|
+
test, _ = self.add_pca_features(test, pcas=pcas)
|
|
363
363
|
|
|
364
364
|
joblib.dump(pcas, f"{self.preprocessing_dir}/pcas.pkl")
|
|
365
365
|
|
|
@@ -1140,6 +1140,7 @@ def get_features_by_types(df: pd.DataFrame, sample_categorical_threshold: int =
|
|
|
1140
1140
|
for col in df.columns
|
|
1141
1141
|
if df[col].nunique() <= sample_categorical_threshold
|
|
1142
1142
|
and df[col].dtype in ["int64", "Int64"]
|
|
1143
|
+
and (df[col] >= 0).all()
|
|
1143
1144
|
]
|
|
1144
1145
|
df_categorical = df[categorical_features]
|
|
1145
1146
|
logger.info(f"Number of categorical features: {len(categorical_features)}")
|
|
@@ -2,7 +2,7 @@ from lecrapaud.jobs import app
|
|
|
2
2
|
|
|
3
3
|
# from honeybadger import honeybadger
|
|
4
4
|
from lecrapaud.send_daily_emails import send_daily_emails
|
|
5
|
-
from lecrapaud.config import
|
|
5
|
+
from lecrapaud.config import EXPERIMENT_ID, RECEIVER_EMAIL
|
|
6
6
|
from lecrapaud.training import run_training
|
|
7
7
|
from lecrapaud.constants import stock_list_3
|
|
8
8
|
from lecrapaud.search_space import get_models_idx
|
|
@@ -18,7 +18,7 @@ from lecrapaud.search_space import get_models_idx
|
|
|
18
18
|
def task_send_daily_emails(self):
|
|
19
19
|
try:
|
|
20
20
|
print(f"[Attempt #{self.request.retries}] task_send_daily_emails")
|
|
21
|
-
experiment_id = int(
|
|
21
|
+
experiment_id = int(EXPERIMENT_ID)
|
|
22
22
|
email = RECEIVER_EMAIL
|
|
23
23
|
return send_daily_emails(email, experiment_id)
|
|
24
24
|
except Exception as e:
|
|
@@ -1015,7 +1015,7 @@ class ModelSelectionEngine:
|
|
|
1015
1015
|
|
|
1016
1016
|
# Save validation predictions
|
|
1017
1017
|
best_pred.to_csv(
|
|
1018
|
-
f"{self.results_dir}/
|
|
1018
|
+
f"{self.results_dir}/prediction.csv",
|
|
1019
1019
|
index=True,
|
|
1020
1020
|
header=True,
|
|
1021
1021
|
index_label="ID",
|
|
@@ -1636,7 +1636,7 @@ def get_pred_distribution(training_target_dir: str, model_name="linear"):
|
|
|
1636
1636
|
Look at prediction distributions
|
|
1637
1637
|
"""
|
|
1638
1638
|
prediction = pd.read_csv(
|
|
1639
|
-
f"{training_target_dir}/{model_name}/
|
|
1639
|
+
f"{training_target_dir}/{model_name}/prediction.csv",
|
|
1640
1640
|
index_col="ID",
|
|
1641
1641
|
)
|
|
1642
1642
|
prediction.describe()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/alembic/versions/2025_06_23_1748-f089dfb7e3ba_.py
RENAMED
|
File without changes
|
{lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/alembic/versions/2025_06_24_1216-c62251b129ed_.py
RENAMED
|
File without changes
|
{lecrapaud-0.6.2 → lecrapaud-0.7.1}/lecrapaud/db/alembic/versions/2025_06_24_1711-86457e2f333f_.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
|