lecrapaud 0.14.3__py3-none-any.whl → 0.14.5__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.

@@ -100,19 +100,19 @@ class Experiment(Base):
100
100
  )
101
101
 
102
102
  def get_features(self, target_number: int):
103
- feature_selections = self.feature_selections
104
- target_id = [t for t in self.targets if t.name == f"TARGET_{target_number}"][
105
- 0
106
- ].id
107
- feature_selection = [
108
- fs for fs in feature_selections if fs.target_id == target_id
109
- ][0]
110
- features = [f.name for f in feature_selection.features]
103
+ targets = [t for t in self.targets if t.name == f"TARGET_{target_number}"]
104
+ if targets:
105
+ target_id = targets[0].id
106
+ feature_selection = [
107
+ fs for fs in self.feature_selections if fs.target_id == target_id
108
+ ]
109
+ if feature_selection:
110
+ feature_selection = feature_selection[0]
111
+ features = [f.name for f in feature_selection.features]
112
+ return features
111
113
 
112
114
  # fallback to path if no features found
113
- if len(features) == 0:
114
- features = joblib.load(f"{self.path}/TARGET_{target_number}/features.pkl")
115
-
115
+ features = joblib.load(f"{self.path}/TARGET_{target_number}/features.pkl")
116
116
  return features
117
117
 
118
118
  def get_all_features(self, date_column: str = None, group_column: str = None):
@@ -384,6 +384,9 @@ class PreprocessFeature:
384
384
 
385
385
  def inference(self):
386
386
  data = self.data
387
+
388
+ print(data.shape)
389
+ print(data.columns)
387
390
  # PCA
388
391
  if os.path.exists(f"{self.preprocessing_dir}/pcas.pkl"):
389
392
  pcas = joblib.load(f"{self.preprocessing_dir}/pcas.pkl")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lecrapaud
3
- Version: 0.14.3
3
+ Version: 0.14.5
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
@@ -12,7 +12,7 @@ lecrapaud/db/alembic/versions/2025_06_25_1759-72aa496ca65b_.py,sha256=sBgPLvvqI_
12
12
  lecrapaud/db/alembic.ini,sha256=TXrZB4pWVLn2EUg867yp6paA_19vGeirO95mTPA3nbs,3699
13
13
  lecrapaud/db/models/__init__.py,sha256=Lhyw9fVLdom0Fc6yIP-ip8FjkU1EwVwjae5q2VM815Q,740
14
14
  lecrapaud/db/models/base.py,sha256=J9ew-0z_-tnWAwhVvOmVDys2R6jPF_oSca_ny6wpXQE,7606
15
- lecrapaud/db/models/experiment.py,sha256=29Ea0PfbiEvXx_0IhZBkd14PqY5v2Adx7LaW6c-6xfM,4135
15
+ lecrapaud/db/models/experiment.py,sha256=x7-zTuCCecE401f3wQ9l6u8HyGOKORGc0b4_z-FMriU,4219
16
16
  lecrapaud/db/models/feature.py,sha256=5o77O2FyRObnLOCGNj8kaPSGM3pLv1Ov6mXXHYkmnYY,1136
17
17
  lecrapaud/db/models/feature_selection.py,sha256=epvOkU3eyhSXvEpRePd9Ylxl3feDvMUf_v6-jeU7fRE,3469
18
18
  lecrapaud/db/models/feature_selection_rank.py,sha256=Ydsb_rAT58FoSH13wkGjGPByzsjPx3DITXgJ2jgZmow,2198
@@ -24,7 +24,7 @@ lecrapaud/db/models/target.py,sha256=DKnfeaLU8eT8J_oh_vuFo5-o1CaoXR13xBbswme6Bgk
24
24
  lecrapaud/db/session.py,sha256=K9dTyXmO-aF_2r9RRHsDsbW9_zLNDaOcchXlpiv7cSo,2719
25
25
  lecrapaud/directories.py,sha256=0LrANuDgbuneSLker60c6q2hmGnQ3mKHIztTGzTx6Gw,826
26
26
  lecrapaud/experiment.py,sha256=u1whBtRFEhjM2OtKwHuUAp6T_7JXZhf_90luUiV4nD8,2514
27
- lecrapaud/feature_engineering.py,sha256=2V69qHmbsw9PZiZf64PpMqCL5mDMOukLeAaNsGftq9o,32421
27
+ lecrapaud/feature_engineering.py,sha256=zG7EM428fEIsSwdtqhp08ajNjrL9qmCqDgiYlMjTTj0,32476
28
28
  lecrapaud/feature_selection.py,sha256=6ry-oVPQHbipm1XSE5YsH7AY0lQFt4CFbWiHiRs1nxg,43593
29
29
  lecrapaud/integrations/openai_integration.py,sha256=hHLF3fk5Bps8KNbNrEL3NUFa945jwClE6LrLpuMZOd4,7459
30
30
  lecrapaud/jobs/__init__.py,sha256=ZkrsyTOR21c_wN7RY8jPhm8jCrL1oCEtTsf3VFIlQiE,292
@@ -38,7 +38,7 @@ lecrapaud/misc/test-gpu-transformers.ipynb,sha256=k6MBSs_Um1h4PykvE-LTBcdpbWLbIF
38
38
  lecrapaud/model_selection.py,sha256=5Q7KJ-oKDcW5ILlFzk4MjHyywB8HlNM6txCFNofku18,67796
39
39
  lecrapaud/search_space.py,sha256=-JkzuMhaomdwiWi4HvVQY5hiw3-oREemJA16tbwEIp4,34854
40
40
  lecrapaud/utils.py,sha256=JdBB1NvbNIx4y0Una-kSZdo1_ZEocc5hwyYFIZKHmGg,8305
41
- lecrapaud-0.14.3.dist-info/LICENSE,sha256=MImCryu0AnqhJE_uAZD-PIDKXDKb8sT7v0i1NOYeHTM,11350
42
- lecrapaud-0.14.3.dist-info/METADATA,sha256=WoPUnqxj35FUK2nddUMy7zAx2DhC_DwPdK8m677Ybtc,11047
43
- lecrapaud-0.14.3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
44
- lecrapaud-0.14.3.dist-info/RECORD,,
41
+ lecrapaud-0.14.5.dist-info/LICENSE,sha256=MImCryu0AnqhJE_uAZD-PIDKXDKb8sT7v0i1NOYeHTM,11350
42
+ lecrapaud-0.14.5.dist-info/METADATA,sha256=pJTwfJ_uMxEkAFPsNHf_94yXlCyb3QEApRkV-BDvwAI,11047
43
+ lecrapaud-0.14.5.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
44
+ lecrapaud-0.14.5.dist-info/RECORD,,