lecrapaud 0.11.3__py3-none-any.whl → 0.11.4__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/api.py CHANGED
@@ -28,6 +28,7 @@ Basic Usage:
28
28
  import joblib
29
29
  import pandas as pd
30
30
  import ast
31
+ import os
31
32
  import logging
32
33
  import seaborn as sns
33
34
  import numpy as np
@@ -47,6 +48,7 @@ from lecrapaud.experiment import create_experiment
47
48
  from lecrapaud.db import Experiment
48
49
  from lecrapaud.search_space import normalize_models_idx
49
50
  from lecrapaud.utils import logger
51
+ from lecrapaud.directories import tmp_dir
50
52
 
51
53
 
52
54
  class LeCrapaud:
@@ -109,6 +111,12 @@ class ExperimentEngine:
109
111
  if id:
110
112
  self.experiment = Experiment.get(id)
111
113
  kwargs.update(self.experiment.context)
114
+ experiment_dir = f"{tmp_dir}/{self.experiment.name}"
115
+ preprocessing_dir = f"{experiment_dir}/preprocessing"
116
+ data_dir = f"{experiment_dir}/data"
117
+ os.makedirs(experiment_dir, exist_ok=True)
118
+ os.makedirs(preprocessing_dir, exist_ok=True)
119
+ os.makedirs(data_dir, exist_ok=True)
112
120
  else:
113
121
  if data is None:
114
122
  raise ValueError("Either id or data must be provided")
@@ -15,7 +15,7 @@ config.set_main_option("sqlalchemy.url", DATABASE_URL)
15
15
  # Interpret the config file for Python logging.
16
16
  # This line sets up loggers basically.
17
17
  if config.config_file_name is not None:
18
- fileConfig(config.config_file_name)
18
+ fileConfig(config.config_file_name, disable_existing_loggers=False)
19
19
 
20
20
  # add your model's MetaData object here
21
21
  # for 'autogenerate' support
lecrapaud/db/alembic.ini CHANGED
@@ -84,11 +84,14 @@ sqlalchemy.url = %(DATABASE_URL)s
84
84
  [loggers]
85
85
  keys = root,sqlalchemy,alembic
86
86
 
87
+ [loggers_root]
88
+ disable_existing_loggers = False
89
+
87
90
  [handlers]
88
91
  keys = console
89
92
 
90
93
  [formatters]
91
- keys = generic
94
+ keys = lecrapaud_format
92
95
 
93
96
  [logger_root]
94
97
  level = WARN
@@ -109,8 +112,8 @@ qualname = alembic
109
112
  class = StreamHandler
110
113
  args = (sys.stderr,)
111
114
  level = NOTSET
112
- formatter = generic
115
+ formatter = lecrapaud_format
113
116
 
114
- [formatter_generic]
115
- format = %(levelname)-5.5s [%(name)s] %(message)s
116
- datefmt = %H:%M:%S
117
+ [formatter_lecrapaud_format]
118
+ format = %(asctime)s - %(name)s - %(levelname)s - %(funcName)s - %(message)s
119
+ datefmt = %Y-%m-%d %H:%M:%S
lecrapaud/utils.py CHANGED
@@ -57,11 +57,6 @@ def setup_logger():
57
57
  file_handler.setLevel(log_level)
58
58
  logger.addHandler(file_handler)
59
59
 
60
- stream_handler = logging.StreamHandler(sys.stdout)
61
- stream_handler.setFormatter(formatter)
62
- stream_handler.setLevel(log_level)
63
- logger.addHandler(stream_handler)
64
-
65
60
  _LECRAPAUD_LOGGER_ALREADY_CONFIGURED = True
66
61
  return logger
67
62
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lecrapaud
3
- Version: 0.11.3
3
+ Version: 0.11.4
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
@@ -1,15 +1,15 @@
1
1
  lecrapaud/__init__.py,sha256=oCxbtw_nk8rlOXbXbWo0RRMlsh6w-hTiZ6e5PRG_wp0,28
2
- lecrapaud/api.py,sha256=WbaqDW0gybW3BGgCIGJJ929HKyhXFYswjB-3KdHuVNE,16785
2
+ lecrapaud/api.py,sha256=nh1dRcqDpEnyOMjvayUNg_DR1D26gXCQ7hZpsYENqk0,17178
3
3
  lecrapaud/config.py,sha256=eYnrktVq457xMIMGcUSilJdNxCsaGP_gRAlzCSwd6Vo,1047
4
4
  lecrapaud/db/__init__.py,sha256=82o9fMfaqKXPh2_rt44EzNRVZV1R4LScEnQYvj_TjK0,34
5
5
  lecrapaud/db/alembic/README,sha256=MVlc9TYmr57RbhXET6QxgyCcwWP7w-vLkEsirENqiIQ,38
6
- lecrapaud/db/alembic/env.py,sha256=rseEi8oR_eKXYYW3UwOKiCMuDEwT4lxsT7llySOUpgk,2305
6
+ lecrapaud/db/alembic/env.py,sha256=0VdxHNIxhPCgUHnx6EwlVZLUMLlbqZ_eV7i0Ho2XqeI,2337
7
7
  lecrapaud/db/alembic/script.py.mako,sha256=MEqL-2qATlST9TAOeYgscMn1uy6HUS9NFvDgl93dMj8,635
8
8
  lecrapaud/db/alembic/versions/2025_06_23_1748-f089dfb7e3ba_.py,sha256=MNPyqWaQSHNV8zljD1G9f-LzrVz-nOKlgOhHEE0U8Oo,13060
9
9
  lecrapaud/db/alembic/versions/2025_06_24_1216-c62251b129ed_.py,sha256=g6aLRV6jAKXkPUEcs9FAeGfsYpe9rMTxfqbNib3U0-U,809
10
10
  lecrapaud/db/alembic/versions/2025_06_24_1711-86457e2f333f_.py,sha256=dl6tfvcqErgJ6NKvjve0euu7l0BWyEAKSS-ychsEAl8,1139
11
11
  lecrapaud/db/alembic/versions/2025_06_25_1759-72aa496ca65b_.py,sha256=sBgPLvvqI_HmPqQ0Kime1ZL1AHSeuYJHlmFJOnXWeuU,835
12
- lecrapaud/db/alembic.ini,sha256=zgvur-5jnLsT66_98FaTOTNgjwObGZCE0HqMwRAeJrs,3587
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=CYtof_UjFwX3C7XUifequh_UtLHJ25bU7LCwT501uGE,7508
15
15
  lecrapaud/db/models/experiment.py,sha256=IeS-TWPT-4l9xCMIdR2S2O-foXNt3Ru6WmtPMWToK7c,4035
@@ -37,8 +37,8 @@ lecrapaud/misc/test-gpu-resnet.ipynb,sha256=27Vu7nYwujYeh3fOxBNCnKJn3MXNPKZU-U8o
37
37
  lecrapaud/misc/test-gpu-transformers.ipynb,sha256=k6MBSs_Um1h4PykvE-LTBcdpbWLbIFST_xl_AFW2jgI,8444
38
38
  lecrapaud/model_selection.py,sha256=h4WPtGCUeuWIXDJ8L2-i1I7RwrZlnxAresGW5l8bGwE,63195
39
39
  lecrapaud/search_space.py,sha256=-JkzuMhaomdwiWi4HvVQY5hiw3-oREemJA16tbwEIp4,34854
40
- lecrapaud/utils.py,sha256=TMsVCFLyli6ww3eFnn1G8AB5LRyU-neG_MeGl-nsTPA,8481
41
- lecrapaud-0.11.3.dist-info/LICENSE,sha256=MImCryu0AnqhJE_uAZD-PIDKXDKb8sT7v0i1NOYeHTM,11350
42
- lecrapaud-0.11.3.dist-info/METADATA,sha256=PXjjkqxmNlvhMKgplcTUy8P9ZPeE_Guk7ela4IyUq-c,11017
43
- lecrapaud-0.11.3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
44
- lecrapaud-0.11.3.dist-info/RECORD,,
40
+ lecrapaud/utils.py,sha256=JdBB1NvbNIx4y0Una-kSZdo1_ZEocc5hwyYFIZKHmGg,8305
41
+ lecrapaud-0.11.4.dist-info/LICENSE,sha256=MImCryu0AnqhJE_uAZD-PIDKXDKb8sT7v0i1NOYeHTM,11350
42
+ lecrapaud-0.11.4.dist-info/METADATA,sha256=3O_6bcQaCfragLXVyAsZWVpP9lvxEziUo9DqWzRE1r4,11017
43
+ lecrapaud-0.11.4.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
44
+ lecrapaud-0.11.4.dist-info/RECORD,,