dragon-ml-toolbox 12.10.0__tar.gz → 12.11.0__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.
Files changed (46) hide show
  1. {dragon_ml_toolbox-12.10.0/dragon_ml_toolbox.egg-info → dragon_ml_toolbox-12.11.0}/PKG-INFO +1 -1
  2. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0/dragon_ml_toolbox.egg-info}/PKG-INFO +1 -1
  3. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/custom_logger.py +1 -1
  4. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/serde.py +5 -13
  5. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/pyproject.toml +1 -1
  6. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/LICENSE +0 -0
  7. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/LICENSE-THIRD-PARTY.md +0 -0
  8. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/README.md +0 -0
  9. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/dragon_ml_toolbox.egg-info/SOURCES.txt +0 -0
  10. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/dragon_ml_toolbox.egg-info/dependency_links.txt +0 -0
  11. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/dragon_ml_toolbox.egg-info/requires.txt +0 -0
  12. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/dragon_ml_toolbox.egg-info/top_level.txt +0 -0
  13. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/ETL_cleaning.py +0 -0
  14. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/ETL_engineering.py +0 -0
  15. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/GUI_tools.py +0 -0
  16. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/MICE_imputation.py +0 -0
  17. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/ML_callbacks.py +0 -0
  18. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/ML_datasetmaster.py +0 -0
  19. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/ML_evaluation.py +0 -0
  20. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/ML_evaluation_multi.py +0 -0
  21. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/ML_inference.py +0 -0
  22. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/ML_models.py +0 -0
  23. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/ML_optimization.py +0 -0
  24. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/ML_scaler.py +0 -0
  25. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/ML_simple_optimization.py +0 -0
  26. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/ML_trainer.py +0 -0
  27. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/ML_utilities.py +0 -0
  28. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/PSO_optimization.py +0 -0
  29. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/RNN_forecast.py +0 -0
  30. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/SQL.py +0 -0
  31. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/VIF_factor.py +0 -0
  32. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/__init__.py +0 -0
  33. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/_logger.py +0 -0
  34. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/_script_info.py +0 -0
  35. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/constants.py +0 -0
  36. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/data_exploration.py +0 -0
  37. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/ensemble_evaluation.py +0 -0
  38. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/ensemble_inference.py +0 -0
  39. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/ensemble_learning.py +0 -0
  40. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/handle_excel.py +0 -0
  41. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/keys.py +0 -0
  42. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/math_utilities.py +0 -0
  43. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/optimization_tools.py +0 -0
  44. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/path_manager.py +0 -0
  45. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/ml_tools/utilities.py +0 -0
  46. {dragon_ml_toolbox-12.10.0 → dragon_ml_toolbox-12.11.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dragon-ml-toolbox
3
- Version: 12.10.0
3
+ Version: 12.11.0
4
4
  Summary: A collection of tools for data science and machine learning projects.
5
5
  Author-email: "Karl L. Loza Vidaurre" <luigiloza@gmail.com>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dragon-ml-toolbox
3
- Version: 12.10.0
3
+ Version: 12.11.0
4
4
  Summary: A collection of tools for data science and machine learning projects.
5
5
  Author-email: "Karl L. Loza Vidaurre" <luigiloza@gmail.com>
6
6
  License-Expression: MIT
@@ -221,7 +221,7 @@ def compare_lists(
221
221
  - If True: Compares only the `type()` of the items.
222
222
 
223
223
  Returns:
224
- A dictionary detailing the differences. (saved to `save_dir`).
224
+ dict: A dictionary detailing the differences. (saved to `save_dir`).
225
225
  """
226
226
  MISSING_A_KEY = "missing_in_A"
227
227
  MISSING_B_KEY = "missing_in_B"
@@ -83,8 +83,7 @@ def deserialize_object(
83
83
  filepath: Union[str, Path],
84
84
  expected_type: Optional[Type[T]] = None,
85
85
  verbose: bool = True,
86
- raise_on_error: bool = True
87
- ) -> Optional[T]:
86
+ ) -> T:
88
87
  """
89
88
  Loads a serialized object from a .joblib file.
90
89
 
@@ -96,22 +95,17 @@ def deserialize_object(
96
95
  like `list[str]` by checking the base type (e.g., `list`).
97
96
  Defaults to None, which skips the type check.
98
97
  verbose (bool): If True, logs success messages.
99
- raise_on_error (bool): If True, raises exceptions on errors. If False, returns None instead.
100
98
 
101
99
  Returns:
102
- (Any | None): The deserialized Python object, which will match the
103
- `expected_type` if provided. Returns None if an error
104
- occurs and `raise_on_error` is False.
100
+ (Any): The deserialized Python object, which will match the `expected_type` if provided.
105
101
  """
106
- true_filepath = make_fullpath(filepath)
102
+ true_filepath = make_fullpath(filepath, enforce="file")
107
103
 
108
104
  try:
109
105
  obj = joblib.load(true_filepath)
110
106
  except (IOError, OSError, EOFError, TypeError, ValueError) as e:
111
107
  _LOGGER.error(f"Failed to deserialize object from '{true_filepath}'.")
112
- if raise_on_error:
113
- raise e
114
- return None
108
+ raise e
115
109
  else:
116
110
  # --- Type Validation Step ---
117
111
  if expected_type:
@@ -126,9 +120,7 @@ def deserialize_object(
126
120
  f"but found '{type(obj)}' in '{true_filepath}'."
127
121
  )
128
122
  _LOGGER.error(error_msg)
129
- if raise_on_error:
130
- raise TypeError()
131
- return None
123
+ raise TypeError()
132
124
 
133
125
  if verbose:
134
126
  _LOGGER.info(f"Loaded object of type '{type(obj)}' from '{true_filepath}'.")
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dragon-ml-toolbox"
3
- version = "12.10.0"
3
+ version = "12.11.0"
4
4
  description = "A collection of tools for data science and machine learning projects."
5
5
  authors = [
6
6
  { name = "Karl L. Loza Vidaurre", email = "luigiloza@gmail.com" }