sm_data_ml_utils 0.1.1__py3-none-any.whl → 0.1.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.
@@ -1,6 +1,6 @@
1
1
  from typing import Dict
2
2
 
3
- from pydantic_settings import BaseSettings
3
+ from pydantic import BaseSettings
4
4
 
5
5
 
6
6
  class Settings(BaseSettings):
@@ -24,6 +24,7 @@ def read_sql(file_path: str) -> str:
24
24
  """
25
25
  return pathlib.Path(file_path).read_text()
26
26
 
27
+
27
28
  def load_yaml(path: str) -> Dict:
28
29
  """
29
30
  function that loads the settings from the yaml file
@@ -76,6 +76,13 @@ def mlflow_load_artifact(
76
76
  if type_of_artifact not in ("joblib", "pkl", "dict", "yaml"):
77
77
  raise ValueError("Artifact type not supported")
78
78
 
79
+ if type_of_artifact in ("joblib"):
80
+ return load( # noqa: S301
81
+ mlflow.artifacts.download_artifacts(
82
+ artifact_uri=f"{artifact_uri}/{artifact_name}"
83
+ )
84
+ )
85
+
79
86
  if type_of_artifact in ("joblib", "pkl", "dict"):
80
87
  return pd.read_pickle( # noqa: S301
81
88
  mlflow.artifacts.download_artifacts(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sm_data_ml_utils
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Common Python tools and utilities for ML work
5
5
  License: MIT
6
6
  Author: Shuming Peh
@@ -1,15 +1,15 @@
1
1
  sm_data_ml_utils/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- sm_data_ml_utils/core/config.py,sha256=gSdTdbXK-SR4FpRuhaTtR0f7ehyIKPaash463p85BTk,702
3
- sm_data_ml_utils/core/databricks_utils.py,sha256=chpT8-rugsL_i4sDTi0XJqh3RGqEbGnr_JAVj9PhFnQ,2934
2
+ sm_data_ml_utils/core/config.py,sha256=5i05q4R7VnmmdhxM3owYrJGDH3zTza9vYI5KxxW8Ur4,693
3
+ sm_data_ml_utils/core/databricks_utils.py,sha256=YLq88WzSxfUegwJofEfeTwq6lQslLLDzgA7w1F0IKBk,2935
4
4
  sm_data_ml_utils/databricks_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  sm_data_ml_utils/databricks_client/client.py,sha256=IbGBDzGVtCsW9NSx2_GL9hXT0VHWsC3_fEzhZvkU9fA,1416
6
6
  sm_data_ml_utils/databricks_client/databricks-sql.ipynb,sha256=YFH-TqOB_6dkuBl_qu7wlPmCGy5absciFiQV03FZl9k,41487
7
7
  sm_data_ml_utils/mlflow_databricks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- sm_data_ml_utils/mlflow_databricks/mlflow_model_utils.py,sha256=974W4Edh9Kyk84BLDmQMkSWCRxbIqi5n36WhqpCBuVY,11866
8
+ sm_data_ml_utils/mlflow_databricks/mlflow_model_utils.py,sha256=xGRWUfcvVlPfS20w-3AsbkXf30m8W2FcRHrXrI2NQok,12077
9
9
  sm_data_ml_utils/mlflow_databricks/mlflow_prediction_requests.py,sha256=H4Z7LVqNim95ljLtYgIjso6rvBj9wqjYTSy8Xog15x8,2578
10
10
  sm_data_ml_utils/mlflow_databricks/mlflow_serve.py,sha256=1oM9hngT444lMHf_B_J1xpGaztIzF3rpJ3r5EDLaTZM,6818
11
11
  sm_data_ml_utils/mlflow_databricks/mlflow_tracker.py,sha256=TBCDRfEY_yhuet8SPF2U5vNGkGUEzdvEQgkNB_SbMO4,5601
12
- sm_data_ml_utils-0.1.1.dist-info/LICENSE.txt,sha256=jQGhVAgIuNn_aOSzBgcEjOGhbiYFhdZAmmksZ7Uo85U,1071
13
- sm_data_ml_utils-0.1.1.dist-info/METADATA,sha256=9jvpPCm4JNoxYl96pq26lVZCHPYg6fnYkZkRAaL5df8,3841
14
- sm_data_ml_utils-0.1.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
15
- sm_data_ml_utils-0.1.1.dist-info/RECORD,,
12
+ sm_data_ml_utils-0.1.2.dist-info/LICENSE.txt,sha256=jQGhVAgIuNn_aOSzBgcEjOGhbiYFhdZAmmksZ7Uo85U,1071
13
+ sm_data_ml_utils-0.1.2.dist-info/METADATA,sha256=4J2ToisESNAPBwNy9jTQYN4WyUr609xsBxHDLPxCbC0,3841
14
+ sm_data_ml_utils-0.1.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
15
+ sm_data_ml_utils-0.1.2.dist-info/RECORD,,