lecrapaud 0.18.1__py3-none-any.whl → 0.18.2__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.
- lecrapaud/feature_engineering.py +3 -0
- lecrapaud/utils.py +9 -3
- {lecrapaud-0.18.1.dist-info → lecrapaud-0.18.2.dist-info}/METADATA +1 -1
- {lecrapaud-0.18.1.dist-info → lecrapaud-0.18.2.dist-info}/RECORD +6 -6
- {lecrapaud-0.18.1.dist-info → lecrapaud-0.18.2.dist-info}/LICENSE +0 -0
- {lecrapaud-0.18.1.dist-info → lecrapaud-0.18.2.dist-info}/WHEEL +0 -0
lecrapaud/feature_engineering.py
CHANGED
|
@@ -231,6 +231,9 @@ class FeatureEngineeringEngine:
|
|
|
231
231
|
for group_cols, stat, target_col in product(
|
|
232
232
|
columns_te_groupby, statistics, columns_te_target
|
|
233
233
|
):
|
|
234
|
+
df[target_col] = pd.to_numeric(
|
|
235
|
+
df[target_col].replace("", "0"), errors="coerce"
|
|
236
|
+
).fillna(0)
|
|
234
237
|
col_name = f"{target_col}_{'_'.join(group_cols)}_{stat.upper()}"
|
|
235
238
|
new_feature_cols[col_name] = df.groupby(group_cols)[target_col].transform(
|
|
236
239
|
stat
|
lecrapaud/utils.py
CHANGED
|
@@ -10,21 +10,27 @@ import unicodedata
|
|
|
10
10
|
import re
|
|
11
11
|
import string
|
|
12
12
|
import sys
|
|
13
|
+
import tomllib
|
|
14
|
+
|
|
13
15
|
from lecrapaud.directories import logger_dir
|
|
14
16
|
from lecrapaud.config import LOGGING_LEVEL, PYTHON_ENV, LECRAPAUD_LOCAL
|
|
15
17
|
|
|
18
|
+
|
|
16
19
|
_LECRAPAUD_LOGGER_ALREADY_CONFIGURED = False
|
|
17
20
|
|
|
18
21
|
|
|
19
22
|
def setup_logger():
|
|
20
23
|
|
|
24
|
+
with open("pyproject.toml", "rb") as f:
|
|
25
|
+
pyproject_data = tomllib.load(f)
|
|
26
|
+
name = pyproject_data["project"]["name"]
|
|
27
|
+
|
|
21
28
|
global _LECRAPAUD_LOGGER_ALREADY_CONFIGURED
|
|
22
29
|
if _LECRAPAUD_LOGGER_ALREADY_CONFIGURED: # ← bail out if done before
|
|
23
|
-
|
|
24
|
-
return logging.getLogger("lecrapaud" if PYTHON_ENV != "Worker" else "")
|
|
30
|
+
return logging.getLogger(name if PYTHON_ENV != "Worker" else "")
|
|
25
31
|
|
|
26
32
|
print(
|
|
27
|
-
f"Setting up logger
|
|
33
|
+
f"Setting up logger for {name} with PYTHON_ENV {PYTHON_ENV} and LOGGING_LEVEL {LOGGING_LEVEL}"
|
|
28
34
|
)
|
|
29
35
|
# ------------------------------------------------------------------ #
|
|
30
36
|
# Real configuration happens only on the FIRST call #
|
|
@@ -26,7 +26,7 @@ lecrapaud/db/models/utils.py,sha256=-a-nWWmpJ2XzidIxo2COVUTrGZIPYCfBzjhcszJj_bM,
|
|
|
26
26
|
lecrapaud/db/session.py,sha256=E93WXcFFILFAIeH61ft2Egs7D-6caqs0oi4zCkO5Lq4,2822
|
|
27
27
|
lecrapaud/directories.py,sha256=0LrANuDgbuneSLker60c6q2hmGnQ3mKHIztTGzTx6Gw,826
|
|
28
28
|
lecrapaud/experiment.py,sha256=1xLWjOrqAxJh9CdXOx9ppQuRFRRj0GH-xYZqg-ty9hI,2463
|
|
29
|
-
lecrapaud/feature_engineering.py,sha256=
|
|
29
|
+
lecrapaud/feature_engineering.py,sha256=fqvYuGDGb7oZJYPq1WgJlrXs5XLk8AwvqfCiyapK7Yc,39115
|
|
30
30
|
lecrapaud/feature_selection.py,sha256=6ry-oVPQHbipm1XSE5YsH7AY0lQFt4CFbWiHiRs1nxg,43593
|
|
31
31
|
lecrapaud/integrations/openai_integration.py,sha256=hHLF3fk5Bps8KNbNrEL3NUFa945jwClE6LrLpuMZOd4,7459
|
|
32
32
|
lecrapaud/jobs/__init__.py,sha256=ZkrsyTOR21c_wN7RY8jPhm8jCrL1oCEtTsf3VFIlQiE,292
|
|
@@ -39,8 +39,8 @@ lecrapaud/misc/test-gpu-resnet.ipynb,sha256=27Vu7nYwujYeh3fOxBNCnKJn3MXNPKZU-U8o
|
|
|
39
39
|
lecrapaud/misc/test-gpu-transformers.ipynb,sha256=k6MBSs_Um1h4PykvE-LTBcdpbWLbIFST_xl_AFW2jgI,8444
|
|
40
40
|
lecrapaud/model_selection.py,sha256=QOwOsn1WEBzR-2ZpHvhzv9Qz47delkBdNziHy-auY3o,72302
|
|
41
41
|
lecrapaud/search_space.py,sha256=-JkzuMhaomdwiWi4HvVQY5hiw3-oREemJA16tbwEIp4,34854
|
|
42
|
-
lecrapaud/utils.py,sha256=
|
|
43
|
-
lecrapaud-0.18.
|
|
44
|
-
lecrapaud-0.18.
|
|
45
|
-
lecrapaud-0.18.
|
|
46
|
-
lecrapaud-0.18.
|
|
42
|
+
lecrapaud/utils.py,sha256=eMnNVKWTqzXCLaaxSbKLBrThkOWoJrieifr9PNqFD5Y,8375
|
|
43
|
+
lecrapaud-0.18.2.dist-info/LICENSE,sha256=MImCryu0AnqhJE_uAZD-PIDKXDKb8sT7v0i1NOYeHTM,11350
|
|
44
|
+
lecrapaud-0.18.2.dist-info/METADATA,sha256=6cd1hmfZhbG1E0Tu23mexomMsMwiVbCeWrRYyN9mrpM,11081
|
|
45
|
+
lecrapaud-0.18.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
46
|
+
lecrapaud-0.18.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|