zenml-nightly 0.80.1.dev20250401__py3-none-any.whl → 0.80.1.dev20250403__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.
zenml/VERSION CHANGED
@@ -1 +1 @@
1
- 0.80.1.dev20250401
1
+ 0.80.1.dev20250403
@@ -63,7 +63,7 @@ class MlflowIntegration(Integration):
63
63
 
64
64
 
65
65
  reqs = [
66
- "mlflow>=2.1.1,<2.21.0",
66
+ "mlflow>=2.1.1,<3",
67
67
  # TODO: remove this requirement once rapidjson is fixed
68
68
  "python-rapidjson<1.15",
69
69
  # When you do:
@@ -13,8 +13,10 @@
13
13
  # permissions and limitations under the License.
14
14
  """Implementation of the MLflow model registry for ZenML."""
15
15
 
16
+ import os
16
17
  from datetime import datetime
17
18
  from typing import Any, Dict, List, Optional, Tuple, cast
19
+ from urllib.parse import unquote, urlparse
18
20
 
19
21
  import mlflow
20
22
  from mlflow import MlflowClient
@@ -47,6 +49,51 @@ from zenml.stack.stack_validator import StackValidator
47
49
  logger = get_logger(__name__)
48
50
 
49
51
 
52
+ def _remove_file_scheme(uri: str) -> str:
53
+ """Parse a URI and remove the file:// scheme if present.
54
+
55
+ Args:
56
+ uri: The URI to remove the file scheme from.
57
+
58
+ Returns:
59
+ The decoded file path, preserving network hostnames.
60
+ """
61
+ # Parse the URI
62
+ parsed = urlparse(uri)
63
+
64
+ # Check if it uses the file scheme
65
+ if parsed.scheme == "file":
66
+ # Get the path and handle any URL encoding
67
+ path = unquote(parsed.path)
68
+
69
+ # Handle network paths with hostname
70
+ if parsed.netloc:
71
+ # Create a proper network path with the hostname
72
+ network_path = f"//{parsed.netloc}{path}"
73
+
74
+ # On Windows, you might want to convert to backslashes
75
+ if os.name == "nt":
76
+ network_path = network_path.replace("/", "\\")
77
+
78
+ return network_path
79
+
80
+ # Handle local paths (no hostname)
81
+ else:
82
+ # On Windows, file:///C:/path becomes /C:/path after parsing
83
+ if (
84
+ path.startswith("/")
85
+ and len(path) > 1
86
+ and path[2] == ":"
87
+ and path[1].isalpha()
88
+ ):
89
+ # This is a Windows path with a drive letter
90
+ return path[1:] # Remove the leading slash
91
+ return path
92
+ else:
93
+ # Not a file URI, return the original
94
+ return uri
95
+
96
+
50
97
  class MLFlowModelRegistry(BaseModelRegistry):
51
98
  """Register models using MLflow."""
52
99
 
@@ -737,7 +784,9 @@ class MLFlowModelRegistry(BaseModelRegistry):
737
784
  from mlflow.models import get_model_info
738
785
 
739
786
  model_library = (
740
- get_model_info(model_uri=mlflow_model_version.source)
787
+ get_model_info(
788
+ model_uri=_remove_file_scheme(mlflow_model_version.source)
789
+ )
741
790
  .flavors.get("python_function", {})
742
791
  .get("loader_module")
743
792
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: zenml-nightly
3
- Version: 0.80.1.dev20250401
3
+ Version: 0.80.1.dev20250403
4
4
  Summary: ZenML: Write production-ready ML code.
5
5
  License: Apache-2.0
6
6
  Keywords: machine learning,production,pipeline,mlops,devops
@@ -1,5 +1,5 @@
1
1
  zenml/README.md,sha256=827dekbOWAs1BpW7VF1a4d7EbwPbjwccX-2zdXBENZo,1777
2
- zenml/VERSION,sha256=cUdRWGuMppYBvD9m95WTtdZz_Cxt53WVPydhixSDg_E,19
2
+ zenml/VERSION,sha256=aWwg-fBqgZ9oDR6dhHJc5o2EySW_O7NhHPKAZD1QVv4,19
3
3
  zenml/__init__.py,sha256=CKEyepFK-7akXYiMrNVh92Nb01Cjs23w4_YyI6sgdc8,2242
4
4
  zenml/actions/__init__.py,sha256=mrt6wPo73iKRxK754_NqsGyJ3buW7RnVeIGXr1xEw8Y,681
5
5
  zenml/actions/base_action.py,sha256=UcaHev6BTuLDwuswnyaPjdA8AgUqB5xPZ-lRtuvf2FU,25553
@@ -379,7 +379,7 @@ zenml/integrations/llama_index/__init__.py,sha256=go2bEZ1dzjUtgFWb22op3MABRBLezy
379
379
  zenml/integrations/llama_index/materializers/__init__.py,sha256=OEtWarp07nDpbSnV5Y9f8Gk1-Ufa7AINiz4e7H22rDQ,963
380
380
  zenml/integrations/llama_index/materializers/document_materializer.py,sha256=NqSEP4YbaAr8har4dGFARG7EX2Tr_Gky4-sEsKGwFAE,2355
381
381
  zenml/integrations/llama_index/materializers/gpt_index_materializer.py,sha256=4CL9f_kGrK8zAlo4K03xKOomZRNd3SQeISwLOG7J1G4,4774
382
- zenml/integrations/mlflow/__init__.py,sha256=TgCTmNZBbxGB2nIKmuuB676FN6m4X6TChMfkPLg3J-A,4207
382
+ zenml/integrations/mlflow/__init__.py,sha256=eQ7mapet2-CDBlVnmSgqUHM95Li10o8f6PI8rKkU7Rk,4202
383
383
  zenml/integrations/mlflow/experiment_trackers/__init__.py,sha256=foDnjpi4vkH9adjaA01c-utb0mRYybQfdR75PDK9CAQ,775
384
384
  zenml/integrations/mlflow/experiment_trackers/mlflow_experiment_tracker.py,sha256=OhvcZgGfawv_sN4zs1I68jFgvWmrPTfC7gQ-Ldj8PHY,14315
385
385
  zenml/integrations/mlflow/flavors/__init__.py,sha256=hMKgndBdmMghG9d3o4sJNVXG4mrZiTcA6hBeL0BirOY,1305
@@ -390,7 +390,7 @@ zenml/integrations/mlflow/mlflow_utils.py,sha256=TQYeR9THJQR7tsoB17QuP2aTvxdZKUq
390
390
  zenml/integrations/mlflow/model_deployers/__init__.py,sha256=QqeQKA2KHOEFKkn_ucVprSACsNuBc-UoB51kmEnOKNs,813
391
391
  zenml/integrations/mlflow/model_deployers/mlflow_model_deployer.py,sha256=s2R5yTszazfzbI8GlOPZrKH-FyN1MHT0XtxUj_nOw9Q,10191
392
392
  zenml/integrations/mlflow/model_registries/__init__.py,sha256=vxR8IsJjB2u7z-_1MP0csZarp5J0OwGMvYngxN99_cs,813
393
- zenml/integrations/mlflow/model_registries/mlflow_model_registry.py,sha256=dQKeTqATyC_lsJxAWiSTsJaMBzc9chjeG5zfv3RyFMQ,26867
393
+ zenml/integrations/mlflow/model_registries/mlflow_model_registry.py,sha256=rttQL7RNMdEzU5GaElE_Y8Oq9cv2O96OHO-h8IiKr3k,28347
394
394
  zenml/integrations/mlflow/services/__init__.py,sha256=GnXApvQbsBU0M303i58-G3JDGnuDhJ0EuHrmPdvkzJo,791
395
395
  zenml/integrations/mlflow/services/mlflow_deployment.py,sha256=kFouyBcK8wYfzm_QW6si9add3WyftqFKLvth3aGsXJI,11141
396
396
  zenml/integrations/mlflow/steps/__init__.py,sha256=5IXeipGRfBjtqr0ZdbQLliuQNr5GXsm7xkhpqfOg6qI,770
@@ -1310,8 +1310,8 @@ zenml/zen_stores/secrets_stores/sql_secrets_store.py,sha256=nEO0bAPlULBLxLVk-UTR
1310
1310
  zenml/zen_stores/sql_zen_store.py,sha256=ldyC1uhMnmX5ojnqY9d_L2S-iC-eaNUwsexTkdPtqr4,440204
1311
1311
  zenml/zen_stores/template_utils.py,sha256=GWBP5QEOyvhzndS_MLPmvh28sQaOPpPoZFXCIX9CRL4,9065
1312
1312
  zenml/zen_stores/zen_store_interface.py,sha256=fF_uL_FplnvGvM5o3jOQ8i1zHXhuhKLL2n4nvIKSR7E,92090
1313
- zenml_nightly-0.80.1.dev20250401.dist-info/LICENSE,sha256=wbnfEnXnafPbqwANHkV6LUsPKOtdpsd-SNw37rogLtc,11359
1314
- zenml_nightly-0.80.1.dev20250401.dist-info/METADATA,sha256=ZOZxY3_UgQAQv7q8JXVO1FHqLdWxyriYQcp5MnFeGtQ,24219
1315
- zenml_nightly-0.80.1.dev20250401.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
1316
- zenml_nightly-0.80.1.dev20250401.dist-info/entry_points.txt,sha256=QK3ETQE0YswAM2mWypNMOv8TLtr7EjnqAFq1br_jEFE,43
1317
- zenml_nightly-0.80.1.dev20250401.dist-info/RECORD,,
1313
+ zenml_nightly-0.80.1.dev20250403.dist-info/LICENSE,sha256=wbnfEnXnafPbqwANHkV6LUsPKOtdpsd-SNw37rogLtc,11359
1314
+ zenml_nightly-0.80.1.dev20250403.dist-info/METADATA,sha256=p2L6CBN_1i1UQ4BoPZS7fAbYx6DR-8cXP4TQcsZ3TQQ,24219
1315
+ zenml_nightly-0.80.1.dev20250403.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
1316
+ zenml_nightly-0.80.1.dev20250403.dist-info/entry_points.txt,sha256=QK3ETQE0YswAM2mWypNMOv8TLtr7EjnqAFq1br_jEFE,43
1317
+ zenml_nightly-0.80.1.dev20250403.dist-info/RECORD,,