zenml-nightly 0.80.1.dev20250331__py3-none-any.whl → 0.80.1.dev20250402__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.dev20250331
1
+ 0.80.1.dev20250402
@@ -736,6 +736,9 @@ class VertexOrchestrator(ContainerizedOrchestrator, GoogleCredentialsMixin):
736
736
  "Waiting for the Vertex AI Pipelines job to finish..."
737
737
  )
738
738
  run.wait()
739
+ logger.info(
740
+ "Vertex AI Pipelines job completed successfully."
741
+ )
739
742
 
740
743
  except google_exceptions.ClientError as e:
741
744
  logger.error("Failed to create the Vertex AI Pipelines job: %s", e)
@@ -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
  )
@@ -253,7 +253,12 @@ class StepLogsStorage:
253
253
  return
254
254
 
255
255
  if not self.disabled:
256
- self.buffer.append(text)
256
+ # Add timestamp to the message when it's received
257
+ timestamp = utc_now().strftime("%Y-%m-%d %H:%M:%S")
258
+ formatted_message = (
259
+ f"[{timestamp} UTC] {remove_ansi_escape_codes(text)}"
260
+ )
261
+ self.buffer.append(formatted_message)
257
262
  self.save_to_file()
258
263
 
259
264
  @property
@@ -325,23 +330,13 @@ class StepLogsStorage:
325
330
  "w",
326
331
  ) as file:
327
332
  for message in self.buffer:
328
- timestamp = utc_now().strftime(
329
- "%Y-%m-%d %H:%M:%S"
330
- )
331
- file.write(
332
- f"[{timestamp} UTC] {remove_ansi_escape_codes(message)}\n"
333
- )
333
+ file.write(f"{message}\n")
334
334
  else:
335
335
  with self.artifact_store.open(
336
336
  self.logs_uri, "a"
337
337
  ) as file:
338
338
  for message in self.buffer:
339
- timestamp = utc_now().strftime(
340
- "%Y-%m-%d %H:%M:%S"
341
- )
342
- file.write(
343
- f"[{timestamp} UTC] {remove_ansi_escape_codes(message)}\n"
344
- )
339
+ file.write(f"{message}\n")
345
340
  self.artifact_store._remove_previous_file_versions(
346
341
  self.logs_uri
347
342
  )
@@ -267,7 +267,7 @@ class MigrationUtils(BaseModel):
267
267
  # table creation statement.
268
268
  continue
269
269
 
270
- index_create = str(CreateIndex(index)).strip() # type: ignore[no-untyped-call]
270
+ index_create = str(CreateIndex(index)).strip()
271
271
  index_create = index_create.replace(
272
272
  f"CREATE INDEX {index.name}",
273
273
  f"CREATE INDEX `{index.name}`",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: zenml-nightly
3
- Version: 0.80.1.dev20250331
3
+ Version: 0.80.1.dev20250402
4
4
  Summary: ZenML: Write production-ready ML code.
5
5
  License: Apache-2.0
6
6
  Keywords: machine learning,production,pipeline,mlops,devops
@@ -82,7 +82,7 @@ Requires-Dist: mike (>=1.1.2,<2.0.0) ; extra == "dev"
82
82
  Requires-Dist: mkdocs (>=1.6.1,<2.0.0) ; extra == "dev"
83
83
  Requires-Dist: mkdocs-autorefs (>=1.4.0,<2.0.0) ; extra == "dev"
84
84
  Requires-Dist: mkdocs-awesome-pages-plugin (>=2.10.1,<3.0.0) ; extra == "dev"
85
- Requires-Dist: mkdocs-material (>=9.6.5,<10.0.0) ; extra == "dev"
85
+ Requires-Dist: mkdocs-material (==9.6.8) ; extra == "dev"
86
86
  Requires-Dist: mkdocstrings[python] (>=0.28.1,<0.29.0) ; extra == "dev"
87
87
  Requires-Dist: mypy (==1.7.1) ; extra == "dev"
88
88
  Requires-Dist: orjson (>=3.10.0,<3.11.0) ; extra == "server"
@@ -1,5 +1,5 @@
1
1
  zenml/README.md,sha256=827dekbOWAs1BpW7VF1a4d7EbwPbjwccX-2zdXBENZo,1777
2
- zenml/VERSION,sha256=SFVku8eYE7b6JtekWw-CrBzayMB2rxLl0XADXARs-OM,19
2
+ zenml/VERSION,sha256=30n7-vAhVZVjGkiw9YleCH5MTMe4aMeJsNA_LTaoeMc,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
@@ -269,7 +269,7 @@ zenml/integrations/gcp/google_credentials_mixin.py,sha256=bPy3JYCCcyuTmPiVFqbY81
269
269
  zenml/integrations/gcp/image_builders/__init__.py,sha256=2IvTL6U2YpUoxGQXeXew-6WFoL5hHIxkqr4DaA5Ez9w,786
270
270
  zenml/integrations/gcp/image_builders/gcp_image_builder.py,sha256=5T6BXsHxLhvp1BF_rslXl1oZzykJUPuZ3E_7-9ZZYLk,9019
271
271
  zenml/integrations/gcp/orchestrators/__init__.py,sha256=6xLFJKZKQk73fHPF-XdpbQO87zjQNGTsNHjJjLfG_Kg,805
272
- zenml/integrations/gcp/orchestrators/vertex_orchestrator.py,sha256=TSCl_q-T9FHCh7pPUmkb3GgsLrTjvaV5mShdVcxd0Vw,39212
272
+ zenml/integrations/gcp/orchestrators/vertex_orchestrator.py,sha256=vlQgHysKkg_BfIANTiZSPPlGInQYRoX4k6EYXt-ei90,39341
273
273
  zenml/integrations/gcp/service_connectors/__init__.py,sha256=fdydawaor8KAtMYvRZieiTuA1i5QATxXXgI-yV1lsn8,788
274
274
  zenml/integrations/gcp/service_connectors/gcp_service_connector.py,sha256=JGrFTKkQV4ZDn_yTEqX-AtBMraFasFgzLVws2mvhS64,94915
275
275
  zenml/integrations/gcp/step_operators/__init__.py,sha256=iPkob2LtPIQ-OHszhbNz_ojhoovL6SprmTx37It4EJ8,808
@@ -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
@@ -577,7 +577,7 @@ zenml/io/filesystem_registry.py,sha256=stujDg4a5k983WMwp3rj4Z4puiUco4REyVoIoMIpI
577
577
  zenml/io/local_filesystem.py,sha256=xQTZPT5cpooptUV8KiifxZojS6pWCv1-6UUxitUYb_E,7386
578
578
  zenml/logger.py,sha256=LMV2sMFQ-6JK9xEn6kEt1C9vAoQ0lwuHVM5XHIeKubE,6966
579
579
  zenml/logging/__init__.py,sha256=lnqbOa31wAHwPP5f8vZazOrUwnP2QviLiIVwxoAefD8,975
580
- zenml/logging/step_logging.py,sha256=6QDfn4oN4h7D_M3RxkVre0NBYRou8IeVtk1vyO89tqQ,18551
580
+ zenml/logging/step_logging.py,sha256=KQN9SZO5CQSASctP8OXymBmgNyNNfDT9QkbNwGV-QKM,18272
581
581
  zenml/login/__init__.py,sha256=Evi7hq8tpUn57IM3iX3hYP0r8oIeEWUhS471TAOyVGs,644
582
582
  zenml/login/credentials.py,sha256=RtLmYkFQ5trbprhsO8NCRKwBA136KzGoUWY52dZP9GA,12722
583
583
  zenml/login/credentials_store.py,sha256=m5MaImmQleEi79S0ogPZIVeYvMhWcPO1UWuYns4Zr8E,23673
@@ -1072,7 +1072,7 @@ zenml/zen_stores/migrations/__init__.py,sha256=N9CHfdz0AZ6KniQ450VCIV3H0CuWtx83A
1072
1072
  zenml/zen_stores/migrations/alembic.py,sha256=JDqx7Md6DxnHtP3xrZG1I0cNv6NyTR0oO3tPRUPaS2I,7455
1073
1073
  zenml/zen_stores/migrations/env.py,sha256=hN6GqD2toKL-r9y0FFAf2seJfr79Mzaeqslh5kObcos,1730
1074
1074
  zenml/zen_stores/migrations/script.py.mako,sha256=wTJhgE4DA8I2iVA29sfx74WLfbi3GBnXEwGnH5nNj4s,695
1075
- zenml/zen_stores/migrations/utils.py,sha256=QsWDm-uQNzD0RvIA54CMFnLrEUgXmXGfdQcTnwTdhYI,29560
1075
+ zenml/zen_stores/migrations/utils.py,sha256=_o6qr0_fKrcYYtrVK3kT0ZrjpyqFiMzRGsSmsqRPaZ0,29527
1076
1076
  zenml/zen_stores/migrations/versions/0.21.0_release.py,sha256=5FoOdsRLifIC10GQBx3C7cSthPM3wtuzO4heMXgTbcY,444
1077
1077
  zenml/zen_stores/migrations/versions/0.21.1_release.py,sha256=SLWTKX1s6yN2xUEDe2-9_sRMqBjJPr1Je_I7JZTf1r8,432
1078
1078
  zenml/zen_stores/migrations/versions/0.22.0_release.py,sha256=bxpLvwzqSin2RuT-uYK4DWl1D92ldvhJ_QVdRFub8DE,444
@@ -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.dev20250331.dist-info/LICENSE,sha256=wbnfEnXnafPbqwANHkV6LUsPKOtdpsd-SNw37rogLtc,11359
1314
- zenml_nightly-0.80.1.dev20250331.dist-info/METADATA,sha256=DTVmnbjnu43gscMeYIasIsZ_ytEs5zHpFE8pDFfIBf4,24227
1315
- zenml_nightly-0.80.1.dev20250331.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
1316
- zenml_nightly-0.80.1.dev20250331.dist-info/entry_points.txt,sha256=QK3ETQE0YswAM2mWypNMOv8TLtr7EjnqAFq1br_jEFE,43
1317
- zenml_nightly-0.80.1.dev20250331.dist-info/RECORD,,
1313
+ zenml_nightly-0.80.1.dev20250402.dist-info/LICENSE,sha256=wbnfEnXnafPbqwANHkV6LUsPKOtdpsd-SNw37rogLtc,11359
1314
+ zenml_nightly-0.80.1.dev20250402.dist-info/METADATA,sha256=zl1mde_15G5DhcxZNKCvzi_K-4sdukCQARSLvrol_c4,24219
1315
+ zenml_nightly-0.80.1.dev20250402.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
1316
+ zenml_nightly-0.80.1.dev20250402.dist-info/entry_points.txt,sha256=QK3ETQE0YswAM2mWypNMOv8TLtr7EjnqAFq1br_jEFE,43
1317
+ zenml_nightly-0.80.1.dev20250402.dist-info/RECORD,,