dragon-ml-toolbox 3.9.0__py3-none-any.whl → 3.9.1__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 dragon-ml-toolbox might be problematic. Click here for more details.
- {dragon_ml_toolbox-3.9.0.dist-info → dragon_ml_toolbox-3.9.1.dist-info}/METADATA +1 -1
- {dragon_ml_toolbox-3.9.0.dist-info → dragon_ml_toolbox-3.9.1.dist-info}/RECORD +7 -7
- ml_tools/GUI_tools.py +11 -6
- {dragon_ml_toolbox-3.9.0.dist-info → dragon_ml_toolbox-3.9.1.dist-info}/WHEEL +0 -0
- {dragon_ml_toolbox-3.9.0.dist-info → dragon_ml_toolbox-3.9.1.dist-info}/licenses/LICENSE +0 -0
- {dragon_ml_toolbox-3.9.0.dist-info → dragon_ml_toolbox-3.9.1.dist-info}/licenses/LICENSE-THIRD-PARTY.md +0 -0
- {dragon_ml_toolbox-3.9.0.dist-info → dragon_ml_toolbox-3.9.1.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
dragon_ml_toolbox-3.9.
|
|
2
|
-
dragon_ml_toolbox-3.9.
|
|
1
|
+
dragon_ml_toolbox-3.9.1.dist-info/licenses/LICENSE,sha256=2uUFNy7D0TLgHim1K5s3DIJ4q_KvxEXVilnU20cWliY,1066
|
|
2
|
+
dragon_ml_toolbox-3.9.1.dist-info/licenses/LICENSE-THIRD-PARTY.md,sha256=6cfpIeQ6D4Mcs10nkogQrkVyq1T7i2qXjjNHFoUMOyE,1892
|
|
3
3
|
ml_tools/ETL_engineering.py,sha256=yeZsW_7zRvEcuMZbM4E2GV1dxwBoWIeJAcFFk2AK0fY,39502
|
|
4
|
-
ml_tools/GUI_tools.py,sha256=
|
|
4
|
+
ml_tools/GUI_tools.py,sha256=ayLwQMkpkFPoun7TxT2Llq5whVIWDjcHXU_ljENvueM,19118
|
|
5
5
|
ml_tools/MICE_imputation.py,sha256=rYqvwQDVtoAJJ0agXWoGzoZEHedWiA6QzcEKEIkiZ08,11388
|
|
6
6
|
ml_tools/ML_callbacks.py,sha256=OT2zwORLcn49megBEgXsSUxDHoW0Ft0_v7hLEVF3jHM,13063
|
|
7
7
|
ml_tools/ML_evaluation.py,sha256=oiDV6HItQloUUKCUpltV-2pogubWLBieGpc-VUwosAQ,10106
|
|
@@ -20,7 +20,7 @@ ml_tools/handle_excel.py,sha256=lwds7rDLlGSCWiWGI7xNg-Z7kxAepogp0lstSFa0590,1294
|
|
|
20
20
|
ml_tools/logger.py,sha256=UkbiU9ihBhw9VKyn3rZzisdClWV94EBV6B09_D0iUU0,6026
|
|
21
21
|
ml_tools/path_manager.py,sha256=OCpESgdftbi6mOxetDMIaHhazt4N-W8pJx11X3-yNOs,8305
|
|
22
22
|
ml_tools/utilities.py,sha256=HR36Q_vYnaRcpSjpNISnA7lOZ36TouHop38lPLG_twY,23146
|
|
23
|
-
dragon_ml_toolbox-3.9.
|
|
24
|
-
dragon_ml_toolbox-3.9.
|
|
25
|
-
dragon_ml_toolbox-3.9.
|
|
26
|
-
dragon_ml_toolbox-3.9.
|
|
23
|
+
dragon_ml_toolbox-3.9.1.dist-info/METADATA,sha256=u0yfIE9prmFgf-ZVkXsGj67w_B9FiK6zZS6voAfWHAg,3273
|
|
24
|
+
dragon_ml_toolbox-3.9.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
25
|
+
dragon_ml_toolbox-3.9.1.dist-info/top_level.txt,sha256=wm-oxax3ciyez6VoO4zsFd-gSok2VipYXnbg3TH9PtU,9
|
|
26
|
+
dragon_ml_toolbox-3.9.1.dist-info/RECORD,,
|
ml_tools/GUI_tools.py
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import configparser
|
|
2
2
|
from pathlib import Path
|
|
3
|
-
from typing import Optional, Callable, Any
|
|
4
3
|
import traceback
|
|
5
4
|
import FreeSimpleGUI as sg
|
|
6
5
|
from functools import wraps
|
|
7
|
-
from typing import Any, Dict, Tuple, List, Literal
|
|
6
|
+
from typing import Any, Dict, Tuple, List, Literal, Union, Any, Optional
|
|
8
7
|
from .utilities import _script_info
|
|
9
8
|
import numpy as np
|
|
10
9
|
from .logger import _LOGGER
|
|
@@ -185,7 +184,7 @@ class GUIFactory:
|
|
|
185
184
|
}
|
|
186
185
|
return sg.Button(text.title(), key=key, **style_args)
|
|
187
186
|
|
|
188
|
-
def make_frame(self, title: str, layout: List[List[sg.Element]], **kwargs) -> sg.Frame:
|
|
187
|
+
def make_frame(self, title: str, layout: List[List[Union[sg.Element, sg.Column]]], **kwargs) -> sg.Frame:
|
|
189
188
|
"""
|
|
190
189
|
Creates a styled frame around a given layout.
|
|
191
190
|
|
|
@@ -209,7 +208,7 @@ class GUIFactory:
|
|
|
209
208
|
# --- General-Purpose Layout Generators ---
|
|
210
209
|
def generate_continuous_layout(
|
|
211
210
|
self,
|
|
212
|
-
data_dict: Dict[str, Tuple[float, float]],
|
|
211
|
+
data_dict: Dict[str, Optional[Tuple[Union[int,float], Union[int,float]]]],
|
|
213
212
|
is_target: bool = False,
|
|
214
213
|
layout_mode: Literal["grid", "row"] = 'grid',
|
|
215
214
|
features_per_column: int = 4
|
|
@@ -231,7 +230,13 @@ class GUIFactory:
|
|
|
231
230
|
label_font = (cfg.fonts.font_family, cfg.fonts.label_size, cfg.fonts.label_style) # type: ignore
|
|
232
231
|
|
|
233
232
|
columns = []
|
|
234
|
-
for name,
|
|
233
|
+
for name, value in data_dict.items():
|
|
234
|
+
if value is None:
|
|
235
|
+
val_min, val_max = None, None
|
|
236
|
+
if not is_target:
|
|
237
|
+
raise ValueError(f"Feature '{name}' was assigned a 'None' value. It is not defined as a target.")
|
|
238
|
+
else:
|
|
239
|
+
val_min, val_max = value
|
|
235
240
|
key = name
|
|
236
241
|
default_text = "" if is_target else str(val_max)
|
|
237
242
|
|
|
@@ -248,7 +253,7 @@ class GUIFactory:
|
|
|
248
253
|
layout = [[label], [element]]
|
|
249
254
|
else:
|
|
250
255
|
range_font = (cfg.fonts.font_family, cfg.fonts.range_size) # type: ignore
|
|
251
|
-
range_text = sg.Text(f"Range: {int(val_min)}-{int(val_max)}", font=range_font, background_color=bg_color)
|
|
256
|
+
range_text = sg.Text(f"Range: {int(val_min)}-{int(val_max)}", font=range_font, background_color=bg_color) # type: ignore
|
|
252
257
|
layout = [[label], [element], [range_text]]
|
|
253
258
|
|
|
254
259
|
# each feature is wrapped as a column element
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|