lecrapaud 0.9.0__tar.gz → 0.9.2__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.

Files changed (43) hide show
  1. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/PKG-INFO +1 -1
  2. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/models/experiment.py +2 -1
  3. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/feature_engineering.py +26 -6
  4. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/feature_selection.py +8 -4
  5. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/pyproject.toml +1 -1
  6. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/LICENSE +0 -0
  7. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/README.md +0 -0
  8. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/__init__.py +0 -0
  9. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/api.py +0 -0
  10. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/config.py +0 -0
  11. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/__init__.py +0 -0
  12. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/alembic/README +0 -0
  13. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/alembic/env.py +0 -0
  14. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/alembic/script.py.mako +0 -0
  15. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/alembic/versions/2025_06_23_1748-f089dfb7e3ba_.py +0 -0
  16. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/alembic/versions/2025_06_24_1216-c62251b129ed_.py +0 -0
  17. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/alembic/versions/2025_06_24_1711-86457e2f333f_.py +0 -0
  18. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/alembic.ini +0 -0
  19. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/models/__init__.py +0 -0
  20. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/models/base.py +0 -0
  21. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/models/feature.py +0 -0
  22. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/models/feature_selection.py +0 -0
  23. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/models/feature_selection_rank.py +0 -0
  24. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/models/model.py +0 -0
  25. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/models/model_selection.py +0 -0
  26. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/models/model_training.py +0 -0
  27. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/models/score.py +0 -0
  28. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/models/target.py +0 -0
  29. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/db/session.py +0 -0
  30. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/directories.py +0 -0
  31. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/experiment.py +0 -0
  32. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/integrations/openai_integration.py +0 -0
  33. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/jobs/__init__.py +0 -0
  34. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/jobs/config.py +0 -0
  35. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/jobs/scheduler.py +0 -0
  36. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/jobs/tasks.py +0 -0
  37. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/model_selection.py +0 -0
  38. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/search_space.py +0 -0
  39. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/speed_tests/test-gpu-bilstm.ipynb +0 -0
  40. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/speed_tests/test-gpu-resnet.ipynb +0 -0
  41. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/speed_tests/test-gpu-transformers.ipynb +0 -0
  42. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/speed_tests/tests.ipynb +0 -0
  43. {lecrapaud-0.9.0 → lecrapaud-0.9.2}/lecrapaud/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lecrapaud
3
- Version: 0.9.0
3
+ Version: 0.9.2
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
@@ -121,6 +121,7 @@ class Experiment(Base):
121
121
  for fs in self.feature_selections
122
122
  if fs.target_id in target_idx
123
123
  )
124
+ _all_features = list(_all_features)
124
125
 
125
126
  # fallback to path if no features found
126
127
  if len(_all_features) == 0:
@@ -131,7 +132,7 @@ class Experiment(Base):
131
132
  all_features.append(date_column)
132
133
  if group_column:
133
134
  all_features.append(group_column)
134
- all_features += list(_all_features)
135
+ all_features += _all_features
135
136
  all_features = list(dict.fromkeys(all_features))
136
137
 
137
138
  return all_features
@@ -811,14 +811,34 @@ def traditional_descriptive_analysis(df: pd.DataFrame, group_column: str | None
811
811
  # Shape
812
812
  results["Shape"] = f"{df.shape[0]} rows × {df.shape[1]} columns"
813
813
 
814
+ # Create a copy of the DataFrame to avoid modifying the original
815
+ df_check = df.copy()
816
+
817
+ # Convert numpy arrays to tuples for hashing
818
+ for col in df_check.columns:
819
+ if df_check[col].apply(lambda x: isinstance(x, np.ndarray)).any():
820
+ df_check[col] = df_check[col].apply(
821
+ lambda x: tuple(x) if isinstance(x, np.ndarray) else x
822
+ )
823
+
814
824
  # Duplicated rows
815
- results["Duplicated rows"] = int(df.duplicated().sum())
825
+ results["Duplicated rows"] = int(df_check.duplicated().sum())
816
826
 
817
- # Duplicated columns
818
- duplicated_cols = df.T[df.T.duplicated()].index.tolist()
819
- results["Duplicated columns"] = (
820
- ", ".join(duplicated_cols) if len(duplicated_cols) > 0 else "None"
821
- )
827
+ # Check for duplicated columns
828
+ try:
829
+ # Try to find duplicated columns
830
+ duplicated_cols = []
831
+ cols = df_check.columns
832
+ for i, col1 in enumerate(cols):
833
+ for col2 in cols[i+1:]:
834
+ if df_check[col1].equals(df_check[col2]):
835
+ duplicated_cols.append(f"{col1} = {col2}")
836
+
837
+ results["Duplicated columns"] = (
838
+ ", ".join(duplicated_cols) if duplicated_cols else "None"
839
+ )
840
+ except Exception as e:
841
+ results["Duplicated columns"] = f"Could not check: {str(e)}"
822
842
 
823
843
  # Missing values
824
844
  missing = df.isnull().sum()
@@ -899,10 +899,14 @@ class PreprocessModel:
899
899
  self.train = self.train[columns_to_keep]
900
900
 
901
901
  scaler_x = joblib.load(f"{self.preprocessing_dir}/scaler_x.pkl")
902
- scaled_data = scaler_x.transform(self.train)
903
- scaled_data = pd.DataFrame(
904
- scaled_data, columns=self.train.columns, index=self.train.index
905
- )
902
+
903
+ if scaler_x:
904
+ scaled_data = scaler_x.transform(self.train)
905
+ scaled_data = pd.DataFrame(
906
+ scaled_data, columns=self.train.columns, index=self.train.index
907
+ )
908
+ else:
909
+ scaled_data = self.train
906
910
 
907
911
  reshaped_data = None
908
912
  if (
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "lecrapaud"
3
- version = "0.9.0"
3
+ version = "0.9.2"
4
4
  description = "Framework for machine and deep learning, with regression, classification and time series analysis"
5
5
  authors = [
6
6
  {name = "Pierre H. Gallet"}
File without changes
File without changes
File without changes
File without changes
File without changes