zenml-nightly 0.81.0.dev20250424__py3-none-any.whl → 0.81.0.dev20250426__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.81.0.dev20250424
1
+ 0.81.0.dev20250426
zenml/config/compiler.py CHANGED
@@ -395,6 +395,25 @@ class Compiler:
395
395
  f"The settings class {settings_instance.__class__} can not "
396
396
  f"be specified on a {configuration_level.name} level."
397
397
  )
398
+
399
+ if settings_instance.model_extra:
400
+ logger.warning(
401
+ "Ignoring invalid setting attributes `%s` defined for key `%s`.",
402
+ list(settings_instance.model_extra),
403
+ key,
404
+ )
405
+ settings_instance = settings_instance.model_validate(
406
+ settings_instance.model_dump(
407
+ exclude=set(settings_instance.model_extra),
408
+ exclude_unset=True,
409
+ )
410
+ )
411
+
412
+ if not settings_instance.model_fields_set:
413
+ # There are no values defined on the settings instance, don't
414
+ # include them in the deployment
415
+ continue
416
+
398
417
  validated_settings[key] = settings_instance
399
418
 
400
419
  return validated_settings
zenml/constants.py CHANGED
@@ -200,6 +200,7 @@ ENV_ZENML_RUN_SINGLE_STEPS_WITHOUT_STACK = (
200
200
  ENV_ZENML_PREVENT_CLIENT_SIDE_CACHING = "ZENML_PREVENT_CLIENT_SIDE_CACHING"
201
201
  ENV_ZENML_DISABLE_CREDENTIALS_DISK_CACHING = "DISABLE_CREDENTIALS_DISK_CACHING"
202
202
  ENV_ZENML_RUNNER_IMAGE_DISABLE_UV = "ZENML_RUNNER_IMAGE_DISABLE_UV"
203
+ ENV_ZENML_RUNNER_POD_TIMEOUT = "ZENML_RUNNER_POD_TIMEOUT"
203
204
  ENV_ZENML_WORKLOAD_TOKEN_EXPIRATION_LEEWAY = (
204
205
  "ZENML_WORKLOAD_TOKEN_EXPIRATION_LEEWAY"
205
206
  )
@@ -21,7 +21,9 @@ from zenml.constants import (
21
21
  ENV_ZENML_ACTIVE_PROJECT_ID,
22
22
  ENV_ZENML_ACTIVE_STACK_ID,
23
23
  ENV_ZENML_RUNNER_IMAGE_DISABLE_UV,
24
+ ENV_ZENML_RUNNER_POD_TIMEOUT,
24
25
  handle_bool_env_var,
26
+ handle_int_env_var,
25
27
  )
26
28
  from zenml.enums import ExecutionStatus, StackComponentType, StoreType
27
29
  from zenml.logger import get_logger
@@ -192,6 +194,10 @@ def run_template(
192
194
  message="Starting pipeline run.",
193
195
  )
194
196
 
197
+ runner_timeout = handle_int_env_var(
198
+ ENV_ZENML_RUNNER_POD_TIMEOUT, default=60
199
+ )
200
+
195
201
  # could do this same thing with a step operator, but we need some
196
202
  # minor changes to the abstract interface to support that.
197
203
  workload_manager().run(
@@ -200,7 +206,7 @@ def run_template(
200
206
  command=command,
201
207
  arguments=args,
202
208
  environment=environment,
203
- timeout_in_seconds=30,
209
+ timeout_in_seconds=runner_timeout,
204
210
  sync=True,
205
211
  )
206
212
  workload_manager().log(
@@ -450,20 +450,6 @@ class BaseZenStore(
450
450
  """
451
451
  return os.getenv(ENV_ZENML_DEFAULT_PROJECT_NAME, DEFAULT_PROJECT_NAME)
452
452
 
453
- def _get_default_project(self) -> ProjectResponse:
454
- """Get the default project.
455
-
456
- Raises:
457
- KeyError: If the default project doesn't exist.
458
-
459
- Returns:
460
- The default project.
461
- """
462
- try:
463
- return self.get_project(self._default_project_name)
464
- except KeyError:
465
- raise KeyError("Unable to find default project.")
466
-
467
453
  def _get_default_stack(
468
454
  self,
469
455
  ) -> StackResponse:
@@ -1155,19 +1155,7 @@ class SqlZenStore(BaseZenStore):
1155
1155
 
1156
1156
  def _initialize_database(self) -> None:
1157
1157
  """Initialize the database if not already initialized."""
1158
- # When running in a Pro ZenML server, the default project is not
1159
- # created on database initialization but on server onboarding.
1160
- create_default_project = True
1161
- if ENV_ZENML_SERVER in os.environ:
1162
- from zenml.config.server_config import ServerConfiguration
1163
-
1164
- if (
1165
- ServerConfiguration.get_server_config().deployment_type
1166
- == ServerDeploymentType.CLOUD
1167
- ):
1168
- create_default_project = False
1169
-
1170
- if create_default_project:
1158
+ if self._default_project_enabled:
1171
1159
  # Make sure the default project exists
1172
1160
  self._get_or_create_default_project()
1173
1161
  # Make sure the default stack exists
@@ -9440,7 +9428,8 @@ class SqlZenStore(BaseZenStore):
9440
9428
  session=session,
9441
9429
  )
9442
9430
  if (
9443
- existing_project.name == self._default_project_name
9431
+ self._default_project_enabled
9432
+ and existing_project.name == self._default_project_name
9444
9433
  and "name" in project_update.model_fields_set
9445
9434
  and project_update.name != existing_project.name
9446
9435
  ):
@@ -9481,7 +9470,10 @@ class SqlZenStore(BaseZenStore):
9481
9470
  schema_class=ProjectSchema,
9482
9471
  session=session,
9483
9472
  )
9484
- if project.name == self._default_project_name:
9473
+ if (
9474
+ self._default_project_enabled
9475
+ and project.name == self._default_project_name
9476
+ ):
9485
9477
  raise IllegalOperationError(
9486
9478
  "The default project cannot be deleted."
9487
9479
  )
@@ -9542,6 +9534,27 @@ class SqlZenStore(BaseZenStore):
9542
9534
  ProjectRequest(name=default_project_name)
9543
9535
  )
9544
9536
 
9537
+ @property
9538
+ def _default_project_enabled(self) -> bool:
9539
+ """Check if the default project is enabled.
9540
+
9541
+ When running in a Pro ZenML server, the default project is not enabled.
9542
+
9543
+ Returns:
9544
+ True if the default project is enabled, False otherwise.
9545
+ """
9546
+ default_project_enabled = True
9547
+ if ENV_ZENML_SERVER in os.environ:
9548
+ from zenml.config.server_config import ServerConfiguration
9549
+
9550
+ if (
9551
+ ServerConfiguration.get_server_config().deployment_type
9552
+ == ServerDeploymentType.CLOUD
9553
+ ):
9554
+ default_project_enabled = False
9555
+
9556
+ return default_project_enabled
9557
+
9545
9558
  # =======================
9546
9559
  # Internal helper methods
9547
9560
  # =======================
@@ -9915,7 +9928,7 @@ class SqlZenStore(BaseZenStore):
9915
9928
  session=session,
9916
9929
  )
9917
9930
  project_id = project.id
9918
- else:
9931
+ elif self._default_project_enabled:
9919
9932
  # Use the default project as a last resort.
9920
9933
  try:
9921
9934
  project = self._get_schema_by_name_or_id(
@@ -9926,6 +9939,8 @@ class SqlZenStore(BaseZenStore):
9926
9939
  project_id = project.id
9927
9940
  except KeyError:
9928
9941
  raise ValueError("Project scope missing from the filter")
9942
+ else:
9943
+ raise ValueError("Project scope missing from the filter")
9929
9944
 
9930
9945
  filter_model.project = project_id
9931
9946
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: zenml-nightly
3
- Version: 0.81.0.dev20250424
3
+ Version: 0.81.0.dev20250426
4
4
  Summary: ZenML: Write production-ready ML code.
5
5
  License: Apache-2.0
6
6
  Keywords: machine learning,production,pipeline,mlops,devops
@@ -283,7 +283,7 @@ def rag_pipeline() -> str:
283
283
  index = index_generator(embeddings)
284
284
  return index
285
285
  ```
286
- ![Running a ZenML pipeline](/docs/book/.gitbook/assets/readme_simple_pipeline.gif)
286
+ ![Running a ZenML pipeline](docs/book/.gitbook/assets/readme_simple_pipeline.gif)
287
287
 
288
288
  ### Easily provision an MLOps stack or reuse your existing infrastructure
289
289
 
@@ -291,7 +291,7 @@ The framework is a gentle entry point for practitioners to build complex ML pipe
291
291
 
292
292
  ZenML provides different features to aid people to get started quickly on a remote setting as well. If you want to deploy a remote stack from scratch on your selected cloud provider, you can use the 1-click deployment feature either through the dashboard:
293
293
 
294
- ![Running a ZenML pipeline](/docs/book/.gitbook/assets/one-click-deployment.gif)
294
+ ![Running a ZenML pipeline](docs/book/.gitbook/assets/one-click-deployment.gif)
295
295
 
296
296
  Or, through our CLI command:
297
297
 
@@ -329,7 +329,7 @@ def training(...):
329
329
  ...
330
330
  ```
331
331
 
332
- ![Workloads with ZenML](/docs/book/.gitbook/assets/readme_compute.gif)
332
+ ![Workloads with ZenML](docs/book/.gitbook/assets/readme_compute.gif)
333
333
 
334
334
  ### Track models, pipeline, and artifacts
335
335
 
@@ -346,7 +346,7 @@ def deploy_rag(index_id: str) -> str:
346
346
  return deployment_id
347
347
  ```
348
348
 
349
- ![Exploring ZenML Models](/docs/book/.gitbook/assets/readme_mcp.gif)
349
+ ![Exploring ZenML Models](docs/book/.gitbook/assets/readme_mcp.gif)
350
350
 
351
351
  ## 🚀 Key LLMOps Capabilities
352
352
 
@@ -354,7 +354,7 @@ def deploy_rag(index_id: str) -> str:
354
354
  **Build production-ready retrieval systems**
355
355
 
356
356
  <div align="center">
357
- <img src="/docs/book/.gitbook/assets/rag_zenml_home.png" width="800" alt="RAG Pipeline">
357
+ <img src="docs/book/.gitbook/assets/rag_zenml_home.png" width="800" alt="RAG Pipeline">
358
358
  </div>
359
359
 
360
360
  ZenML tracks document ingestion, embedding versions, and query patterns. Implement feedback loops and:
@@ -367,7 +367,7 @@ ZenML tracks document ingestion, embedding versions, and query patterns. Impleme
367
367
  **Confidence in model updates**
368
368
 
369
369
  <div align="center">
370
- <img src="/docs/book/.gitbook/assets/finetune_zenml_home.png" width="800" alt="Finetuning Pipeline">
370
+ <img src="docs/book/.gitbook/assets/finetune_zenml_home.png" width="800" alt="Finetuning Pipeline">
371
371
  </div>
372
372
 
373
373
  Maintain full lineage of SLM/LLM training runs:
@@ -390,7 +390,7 @@ def train_and_deploy(training_df: pd.DataFrame) -> bento.Bento
390
390
  return bento
391
391
  ```
392
392
 
393
- ![Exploring ZenML Integrations](/docs/book/.gitbook/assets/readme_integrations.gif)
393
+ ![Exploring ZenML Integrations](docs/book/.gitbook/assets/readme_integrations.gif)
394
394
 
395
395
  ## 🔄 Your LLM Framework Isn't Enough for Production
396
396
 
@@ -447,7 +447,7 @@ ZenML has a [VS Code extension](https://marketplace.visualstudio.com/items?itemN
447
447
  <details>
448
448
  <summary>🖥️ VS Code Extension in Action!</summary>
449
449
  <div align="center">
450
- <img width="60%" src="/docs/book/.gitbook/assets/zenml-extension-shortened.gif" alt="ZenML Extension">
450
+ <img width="60%" src="docs/book/.gitbook/assets/zenml-extension-shortened.gif" alt="ZenML Extension">
451
451
  </div>
452
452
  </details>
453
453
 
@@ -1,5 +1,5 @@
1
1
  zenml/README.md,sha256=827dekbOWAs1BpW7VF1a4d7EbwPbjwccX-2zdXBENZo,1777
2
- zenml/VERSION,sha256=xC_BFuquXquHB86Esw9B286z8kOV2CSSQJPW27TlBvg,19
2
+ zenml/VERSION,sha256=ZOGvzbsgxYXCW1IR-ANCD5Xgf5KUHEGMNbYPf32lFlo,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
@@ -65,7 +65,7 @@ zenml/code_repositories/local_repository_context.py,sha256=1VyiYkJBDVg0iGusgRQDT
65
65
  zenml/config/__init__.py,sha256=DZEic7euSbwI9Yb3FMRQhTgfhqz-C6OdAiYmOb0-opI,1519
66
66
  zenml/config/base_settings.py,sha256=itoLqc1cOwEYhgSGdZmSKSaBevQkvYH7NQh7PUamazc,1700
67
67
  zenml/config/build_configuration.py,sha256=Jsng7ebpeaRbzXlbszU-uYkaVihgQ4OrD839yWwD3ZY,5126
68
- zenml/config/compiler.py,sha256=y7WEGOOuGvblW7nUD8GzLmBK9Wb7NL2iy7ehbdR8TMs,23384
68
+ zenml/config/compiler.py,sha256=jzyyTmM8nTxtpIVTSjZ-jrVOBJ1roVoJ3fs1A1nwv9M,24130
69
69
  zenml/config/constants.py,sha256=QvSgMwXWxtspcJ45CrFDP1ZY3w6gS3bIhXLOtIDAbZA,713
70
70
  zenml/config/docker_settings.py,sha256=KTUR9FaRn3ivcagzFgpLe4eev8fvd5Wq1oV8wGNMB-g,13322
71
71
  zenml/config/global_config.py,sha256=ZD3WodfcWMBJZOl1FNn3ztzwilGDDv9EKdHClLqSO8s,29562
@@ -85,7 +85,7 @@ zenml/config/step_run_info.py,sha256=KiVRSTtKmZ1GbvseDTap2imr7XwMHD3jSFVpyLNEK1I
85
85
  zenml/config/store_config.py,sha256=Cla5p5dTB6nNlo8_OZDs9hod5hspi64vxwtZj882XgU,3559
86
86
  zenml/config/strict_base_model.py,sha256=iHnO9qOmLUP_eiy9IjRr3JjIs1l1I_CsRQ76EyAneYU,860
87
87
  zenml/console.py,sha256=hj_KerPQKwnyKACj0ehSqUQX0mGVCJBKE1QvCt6ik3A,1160
88
- zenml/constants.py,sha256=DbOD7MmcwOCi1cq-jiF8PhWqHUZanHaQg1jj9W8Jmvk,16373
88
+ zenml/constants.py,sha256=ZVwWVxE2h54cNbJDyujJmhAc8w3J7I9MkWHOfP4HN9A,16431
89
89
  zenml/container_registries/__init__.py,sha256=ZSPbBIOnzhg88kQSpYgKe_POLuru14m629665-kAVAA,2200
90
90
  zenml/container_registries/azure_container_registry.py,sha256=t1sfDa94Vzbyqtb1iPFNutJ2EXV5_p9CUNITasoiQ70,2667
91
91
  zenml/container_registries/base_container_registry.py,sha256=6c2e32wuqxYHJXm5OV2LY1MtX9yopB7WZtes9fmTAz0,7625
@@ -1063,12 +1063,12 @@ zenml/zen_server/routers/webhook_endpoints.py,sha256=KOJsuykv_TMjL3oEItpC4OWWP75
1063
1063
  zenml/zen_server/secure_headers.py,sha256=glh6QujnjyeoH1_FK-tAS-105G-qKS_34AqSzqJ6TRc,4182
1064
1064
  zenml/zen_server/template_execution/__init__.py,sha256=79knXLKfegsvVSVSWecpqrepq6iAavTUA4hKuiDk-WE,613
1065
1065
  zenml/zen_server/template_execution/runner_entrypoint_configuration.py,sha256=Y8aYJhqqs8Kv8I1q-dM1WemS5VBIfyoaaYH_YkzC7iY,1541
1066
- zenml/zen_server/template_execution/utils.py,sha256=nDf7CTY5LQPHczBP3m4TgQAJub4qP-VwVBO-vlNFD18,17354
1066
+ zenml/zen_server/template_execution/utils.py,sha256=UGMFeyVB8Os2awUfXsvKvDLdMiT0uxRj7ErF-8RyhA0,17533
1067
1067
  zenml/zen_server/template_execution/workload_manager_interface.py,sha256=CL9c7z8ajuZE01DaHmdCDCZmsroDcTarvN-nE8jv6qQ,2590
1068
1068
  zenml/zen_server/utils.py,sha256=Jc2Q4UBaYG2ruHdsN9JmbOWfWU_eWD9wTBBEgcGAbqg,17439
1069
1069
  zenml/zen_server/zen_server_api.py,sha256=ALyv5096frXXRNySegEtsmkDbHLLqHd402bbQI7RnII,17941
1070
1070
  zenml/zen_stores/__init__.py,sha256=6LTgH6XwDeDxKqVJ1JTfGhmS8II1NLopPloINGmdyI0,691
1071
- zenml/zen_stores/base_zen_store.py,sha256=kazsQSYD7fl51rBxXPpaXRsrMFOpOo5zCF5nN5qoMkc,16520
1071
+ zenml/zen_stores/base_zen_store.py,sha256=AplsW2NR-G9_CU54XvNTQJo4W0KJ5TJV22cjKW4n2BY,16124
1072
1072
  zenml/zen_stores/migrations/README.md,sha256=x04jsb6EOP6PBEGMQlDELiqKEham2O-iztAs9AylMFc,4898
1073
1073
  zenml/zen_stores/migrations/__init__.py,sha256=N9CHfdz0AZ6KniQ450VCIV3H0CuWtx83AloYy82woho,657
1074
1074
  zenml/zen_stores/migrations/alembic.py,sha256=JDqx7Md6DxnHtP3xrZG1I0cNv6NyTR0oO3tPRUPaS2I,7455
@@ -1313,11 +1313,11 @@ zenml/zen_stores/secrets_stores/hashicorp_secrets_store.py,sha256=NfW1EHIA99lseb
1313
1313
  zenml/zen_stores/secrets_stores/secrets_store_interface.py,sha256=Q2Jbnt2Pp7NGlR-u1YBfRZV2g8su2Fd0ArBMdksAE-Q,2819
1314
1314
  zenml/zen_stores/secrets_stores/service_connector_secrets_store.py,sha256=S87ne23D08PAwtfRVlVnBn8R0ilTpEh6r8blauNV5WQ,6941
1315
1315
  zenml/zen_stores/secrets_stores/sql_secrets_store.py,sha256=nEO0bAPlULBLxLVk-UTRIZiUeVpATggo8qCsKmgEU1E,8788
1316
- zenml/zen_stores/sql_zen_store.py,sha256=7ISpj0CC31xb66ehW1PZZ2Yapk3Sxu-CiuOGZlLqGQA,441658
1316
+ zenml/zen_stores/sql_zen_store.py,sha256=diS6mZwE0A5v2wKf69CDtwCr1Bveot8QSQc-WE44rw4,442103
1317
1317
  zenml/zen_stores/template_utils.py,sha256=GWBP5QEOyvhzndS_MLPmvh28sQaOPpPoZFXCIX9CRL4,9065
1318
1318
  zenml/zen_stores/zen_store_interface.py,sha256=fF_uL_FplnvGvM5o3jOQ8i1zHXhuhKLL2n4nvIKSR7E,92090
1319
- zenml_nightly-0.81.0.dev20250424.dist-info/LICENSE,sha256=wbnfEnXnafPbqwANHkV6LUsPKOtdpsd-SNw37rogLtc,11359
1320
- zenml_nightly-0.81.0.dev20250424.dist-info/METADATA,sha256=JhanTnu1Knd_WiKokvZmb9gEhoSDyiHwP5hl_enzx7w,24312
1321
- zenml_nightly-0.81.0.dev20250424.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
1322
- zenml_nightly-0.81.0.dev20250424.dist-info/entry_points.txt,sha256=QK3ETQE0YswAM2mWypNMOv8TLtr7EjnqAFq1br_jEFE,43
1323
- zenml_nightly-0.81.0.dev20250424.dist-info/RECORD,,
1319
+ zenml_nightly-0.81.0.dev20250426.dist-info/LICENSE,sha256=wbnfEnXnafPbqwANHkV6LUsPKOtdpsd-SNw37rogLtc,11359
1320
+ zenml_nightly-0.81.0.dev20250426.dist-info/METADATA,sha256=Hh6sfwT9wRec5s3iNU0sEPF0dN8AZS-vdtbKLouPnn8,24304
1321
+ zenml_nightly-0.81.0.dev20250426.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
1322
+ zenml_nightly-0.81.0.dev20250426.dist-info/entry_points.txt,sha256=QK3ETQE0YswAM2mWypNMOv8TLtr7EjnqAFq1br_jEFE,43
1323
+ zenml_nightly-0.81.0.dev20250426.dist-info/RECORD,,