zenml-nightly 0.70.0.dev20241125__py3-none-any.whl → 0.71.0.dev20241220__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.
- README.md +4 -4
- RELEASE_NOTES.md +112 -0
- zenml/VERSION +1 -1
- zenml/artifact_stores/base_artifact_store.py +2 -2
- zenml/artifacts/artifact_config.py +15 -6
- zenml/artifacts/utils.py +59 -32
- zenml/cli/__init__.py +22 -4
- zenml/cli/base.py +5 -5
- zenml/cli/login.py +26 -0
- zenml/cli/pipeline.py +111 -62
- zenml/cli/server.py +20 -20
- zenml/cli/service_connectors.py +3 -3
- zenml/cli/stack.py +0 -3
- zenml/cli/stack_components.py +0 -1
- zenml/cli/utils.py +0 -5
- zenml/client.py +62 -20
- zenml/config/compiler.py +12 -3
- zenml/config/pipeline_configurations.py +20 -0
- zenml/config/pipeline_run_configuration.py +1 -0
- zenml/config/secret_reference_mixin.py +1 -1
- zenml/config/server_config.py +4 -0
- zenml/config/step_configurations.py +21 -0
- zenml/constants.py +10 -0
- zenml/enums.py +1 -0
- zenml/image_builders/base_image_builder.py +5 -2
- zenml/image_builders/build_context.py +7 -16
- zenml/image_builders/local_image_builder.py +13 -3
- zenml/integrations/__init__.py +1 -0
- zenml/integrations/aws/__init__.py +3 -0
- zenml/integrations/aws/flavors/__init__.py +6 -0
- zenml/integrations/aws/flavors/aws_image_builder_flavor.py +146 -0
- zenml/integrations/aws/image_builders/__init__.py +20 -0
- zenml/integrations/aws/image_builders/aws_image_builder.py +307 -0
- zenml/integrations/aws/orchestrators/sagemaker_orchestrator.py +14 -6
- zenml/integrations/constants.py +1 -0
- zenml/integrations/feast/__init__.py +1 -1
- zenml/integrations/feast/feature_stores/feast_feature_store.py +13 -9
- zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +1 -1
- zenml/integrations/kaniko/image_builders/kaniko_image_builder.py +2 -1
- zenml/integrations/kubernetes/flavors/kubernetes_orchestrator_flavor.py +11 -0
- zenml/integrations/kubernetes/orchestrators/kube_utils.py +46 -2
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator.py +13 -2
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator_entrypoint.py +3 -1
- zenml/integrations/kubernetes/orchestrators/manifest_utils.py +3 -2
- zenml/integrations/kubernetes/step_operators/kubernetes_step_operator.py +3 -2
- zenml/integrations/lightning/flavors/lightning_orchestrator_flavor.py +11 -0
- zenml/integrations/modal/__init__.py +46 -0
- zenml/integrations/modal/flavors/__init__.py +26 -0
- zenml/integrations/modal/flavors/modal_step_operator_flavor.py +125 -0
- zenml/integrations/modal/step_operators/__init__.py +22 -0
- zenml/integrations/modal/step_operators/modal_step_operator.py +242 -0
- zenml/integrations/neptune/experiment_trackers/neptune_experiment_tracker.py +7 -5
- zenml/integrations/neptune/experiment_trackers/run_state.py +69 -53
- zenml/integrations/registry.py +2 -2
- zenml/integrations/skypilot/flavors/skypilot_orchestrator_base_vm_config.py +12 -0
- zenml/integrations/wandb/flavors/wandb_experiment_tracker_flavor.py +13 -5
- zenml/io/filesystem.py +2 -2
- zenml/io/local_filesystem.py +3 -3
- zenml/materializers/built_in_materializer.py +18 -1
- zenml/materializers/structured_string_materializer.py +8 -3
- zenml/model/model.py +23 -101
- zenml/model/utils.py +21 -17
- zenml/models/__init__.py +6 -0
- zenml/models/v2/base/filter.py +26 -30
- zenml/models/v2/base/scoped.py +258 -5
- zenml/models/v2/core/artifact_version.py +21 -29
- zenml/models/v2/core/code_repository.py +1 -12
- zenml/models/v2/core/component.py +5 -68
- zenml/models/v2/core/flavor.py +1 -11
- zenml/models/v2/core/model.py +1 -57
- zenml/models/v2/core/model_version.py +11 -36
- zenml/models/v2/core/model_version_artifact.py +11 -3
- zenml/models/v2/core/model_version_pipeline_run.py +14 -3
- zenml/models/v2/core/pipeline.py +47 -55
- zenml/models/v2/core/pipeline_build.py +67 -12
- zenml/models/v2/core/pipeline_deployment.py +0 -10
- zenml/models/v2/core/pipeline_run.py +110 -32
- zenml/models/v2/core/run_metadata.py +30 -9
- zenml/models/v2/core/run_template.py +21 -29
- zenml/models/v2/core/schedule.py +0 -10
- zenml/models/v2/core/secret.py +0 -14
- zenml/models/v2/core/service.py +9 -16
- zenml/models/v2/core/service_connector.py +0 -11
- zenml/models/v2/core/stack.py +21 -30
- zenml/models/v2/core/step_run.py +24 -18
- zenml/models/v2/core/trigger.py +19 -3
- zenml/models/v2/misc/run_metadata.py +38 -0
- zenml/orchestrators/base_orchestrator.py +13 -1
- zenml/orchestrators/input_utils.py +19 -6
- zenml/orchestrators/output_utils.py +5 -1
- zenml/orchestrators/publish_utils.py +12 -5
- zenml/orchestrators/step_launcher.py +16 -16
- zenml/orchestrators/step_run_utils.py +18 -197
- zenml/orchestrators/step_runner.py +40 -3
- zenml/orchestrators/utils.py +79 -50
- zenml/pipelines/build_utils.py +12 -0
- zenml/pipelines/pipeline_decorator.py +4 -0
- zenml/pipelines/pipeline_definition.py +26 -8
- zenml/pipelines/run_utils.py +9 -5
- zenml/service_connectors/service_connector_utils.py +3 -9
- zenml/stack/stack_component.py +1 -1
- zenml/stack_deployments/aws_stack_deployment.py +22 -0
- zenml/steps/base_step.py +11 -1
- zenml/steps/entrypoint_function_utils.py +7 -3
- zenml/steps/step_decorator.py +4 -0
- zenml/steps/utils.py +23 -7
- zenml/types.py +4 -0
- zenml/utils/archivable.py +65 -36
- zenml/utils/code_utils.py +8 -4
- zenml/utils/docker_utils.py +9 -0
- zenml/utils/metadata_utils.py +186 -153
- zenml/utils/string_utils.py +41 -16
- zenml/utils/visualization_utils.py +4 -1
- zenml/zen_server/auth.py +9 -10
- zenml/zen_server/cloud_utils.py +3 -1
- zenml/zen_server/dashboard/assets/{404-NVXKFp-x.js → 404-Cqu3EDCm.js} +1 -1
- zenml/zen_server/dashboard/assets/{@reactflow-CK0KJUen.js → @reactflow-D2Y7BWwz.js} +1 -1
- zenml/zen_server/dashboard/assets/{AlertDialogDropdownItem-DezXKmDf.js → AlertDialogDropdownItem-BHd71pVS.js} +1 -1
- zenml/zen_server/dashboard/assets/{CodeSnippet-JzR8CEtw.js → CodeSnippet-DIonwetW.js} +1 -1
- zenml/zen_server/dashboard/assets/{CollapsibleCard-DQW_ktMO.js → CollapsibleCard-CDnC97pB.js} +1 -1
- zenml/zen_server/dashboard/assets/{Commands-DL2kwkRd.js → Commands-BVEXKAOj.js} +1 -1
- zenml/zen_server/dashboard/assets/{ComponentBadge-D_g62Wv8.js → ComponentBadge-CrRvovox.js} +1 -1
- zenml/zen_server/dashboard/assets/{CopyButton-LNcWaa14.js → CopyButton-B6wGAhQv.js} +1 -1
- zenml/zen_server/dashboard/assets/{CsvVizualization-DknpE5ej.js → CsvVizualization-CjcT7LMm.js} +5 -5
- zenml/zen_server/dashboard/assets/DeleteAlertDialog-D2ELtM2W.js +1 -0
- zenml/zen_server/dashboard/assets/{DialogItem-Bxf8FuAT.js → DialogItem-DXIMhBgU.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-DYflYyps.js → Error-B8uUfTpL.js} +1 -1
- zenml/zen_server/dashboard/assets/{ExecutionStatus-C7zyIQKZ.js → ExecutionStatus-ibAdY-dG.js} +1 -1
- zenml/zen_server/dashboard/assets/{Helpbox-oYSGpLqd.js → Helpbox-BfAfhKHw.js} +1 -1
- zenml/zen_server/dashboard/assets/{Infobox-Cx4xGoXR.js → Infobox-M_SMOu96.js} +1 -1
- zenml/zen_server/dashboard/assets/{InlineAvatar-DiGOWNKF.js → InlineAvatar-DBA0a0-a.js} +1 -1
- zenml/zen_server/dashboard/assets/{NestedCollapsible-DYbgyKxK.js → NestedCollapsible-DpgmEFKw.js} +1 -1
- zenml/zen_server/dashboard/assets/{Partials-03iZf8-N.js → Partials-D_ldD9if.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProBadge-D_EB8HNo.js → ProBadge-DQbfFotM.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProCta-DqNS4v3x.js → ProCta-Bcpb4rcY.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderIcon-Bki2aw8w.js → ProviderIcon-BZpgPigN.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderRadio-8f43sPD4.js → ProviderRadio-DWPnMuQ1.js} +1 -1
- zenml/zen_server/dashboard/assets/RunSelector-DgRGaAc6.js +1 -0
- zenml/zen_server/dashboard/assets/{RunsBody-07YEO7qI.js → RunsBody-KecfSkjY.js} +1 -1
- zenml/zen_server/dashboard/assets/{SearchField-lp1KgU4e.js → SearchField-n-ILHnaP.js} +1 -1
- zenml/zen_server/dashboard/assets/{SecretTooltip-CgnbyeOx.js → SecretTooltip-B8MrX5yu.js} +1 -1
- zenml/zen_server/dashboard/assets/{SetPassword-CpP418A2.js → SetPassword-B_IVq_wg.js} +1 -1
- zenml/zen_server/dashboard/assets/StackList-TWPBYnkF.js +1 -0
- zenml/zen_server/dashboard/assets/{Tabs-BktHkCJJ.js → Tabs-Rg857zmd.js} +1 -1
- zenml/zen_server/dashboard/assets/{Tick-BlMoIlJT.js → Tick-COg4A-xo.js} +1 -1
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-Sc0A0pP-.js → UpdatePasswordSchemas-C6Aj3hm6.js} +1 -1
- zenml/zen_server/dashboard/assets/{UsageReason-YYduL4fj.js → UsageReason-BTLbx7w4.js} +1 -1
- zenml/zen_server/dashboard/assets/{WizardFooter-dgmizSJC.js → WizardFooter-BCAj69Vj.js} +1 -1
- zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-D-c2G6lV.js → all-pipeline-runs-query-DMXkDrV2.js} +1 -1
- zenml/zen_server/dashboard/assets/code-snippets-CqONne41.js +13 -0
- zenml/zen_server/dashboard/assets/{create-stack-DM_JPgef.js → create-stack-HfdbhLs4.js} +1 -1
- zenml/zen_server/dashboard/assets/dates-3pMLCNrD.js +1 -0
- zenml/zen_server/dashboard/assets/delete-run-DZ4hIXff.js +1 -0
- zenml/zen_server/dashboard/assets/{form-schemas-K6FYKjwa.js → form-schemas-B0AVEd9b.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-BAkC7FXi.js → index-DPqSWjug.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-CEV4Cvaf.js → index-DScjfBRb.js} +1 -1
- zenml/zen_server/dashboard/assets/index-DXvT1_Um.css +1 -0
- zenml/zen_server/dashboard/assets/{index-CCOPpudF.js → index-FO-p0GU7.js} +5 -5
- zenml/zen_server/dashboard/assets/{index-B1mVPYxf.js → index-I3bKUGUj.js} +1 -1
- zenml/zen_server/dashboard/assets/key-icon-aH-QIa5R.js +1 -0
- zenml/zen_server/dashboard/assets/login-command-CkqxPtV3.js +1 -0
- zenml/zen_server/dashboard/assets/{login-mutation-hf-lK87O.js → login-mutation-BQeo4wTY.js} +1 -1
- zenml/zen_server/dashboard/assets/{not-found-BGirLjU-.js → not-found-gAJ5aDdR.js} +1 -1
- zenml/zen_server/dashboard/assets/page-9Y9-gig0.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DjRJCGb3.js → page-AUwiQ14W.js} +1 -1
- zenml/zen_server/dashboard/assets/page-B6XU7yYT.js +2 -0
- zenml/zen_server/dashboard/assets/{page-C00YAkaB.js → page-BKZYc2Zv.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CdMWnQak.js → page-BU9FG4sR.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-D7S3aCbF.js → page-B_Apk3xg.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Djikxq_S.js → page-BdowiCbr.js} +1 -1
- zenml/zen_server/dashboard/assets/page-Bg8OjTRe.js +1 -0
- zenml/zen_server/dashboard/assets/page-BxL4qD4_.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DakHVWXF.js → page-CWxT5K5J.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CXuQufSe.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DLC-bNBP.js → page-CcQr8CPP.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CD-DcWoy.js → page-Ce4Hrjnr.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CiYxgZP_.js +1 -0
- zenml/zen_server/dashboard/assets/page-Cldq1mpe.js +1 -0
- zenml/zen_server/dashboard/assets/{page-BDigxVpo.js → page-D4wdonLm.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-D6uU2ax4.js → page-D8ObrbH8.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DXSTpqRD.js → page-DFuAUGt4.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CbpvrsDL.js → page-DGazBpuP.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-COXXJj1k.js → page-DO1UcqPX.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DRYXdL5o.js +1 -0
- zenml/zen_server/dashboard/assets/{page-Df-Fw0aq.js → page-DYEquBC2.js} +1 -1
- zenml/zen_server/dashboard/assets/page-Dk32IeZm.js +1 -0
- zenml/zen_server/dashboard/assets/{page-yYC9OI-E.js → page-I3nKFGie.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-6m6yHHlE.js → page-M0w-n6vn.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Vcxara9U.js → page-R5dx3xGF.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BR68V0V1.js → page-bT5pOvcB.js} +1 -1
- zenml/zen_server/dashboard/assets/page-hUqK889I.js +6 -0
- zenml/zen_server/dashboard/assets/{page-CjGdWY13.js → page-h_Stveon.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-D01JhjQB.js → page-r8XK5vR7.js} +1 -1
- zenml/zen_server/dashboard/assets/page-u_-ZXBKb.js +1 -0
- zenml/zen_server/dashboard/assets/page-zaMqB_ao.js +1 -0
- zenml/zen_server/dashboard/assets/{persist-GjC8PZoC.js → persist-AppN1B0J.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-Coz7ZWvz.js → persist-DAUi_3za.js} +1 -1
- zenml/zen_server/dashboard/assets/service-BqqeXLEe.js +2 -0
- zenml/zen_server/dashboard/assets/{sharedSchema-CQb14VSr.js → sharedSchema-uXN9FLLk.js} +1 -1
- zenml/zen_server/dashboard/assets/{stack-detail-query-OPEW-cDJ.js → stack-detail-query-XfZBiBP2.js} +1 -1
- zenml/zen_server/dashboard/assets/{update-server-settings-mutation-LwuQfHYn.js → update-server-settings-mutation-BWmgVJwA.js} +1 -1
- zenml/zen_server/dashboard/assets/{url-CkvKAnwF.js → url-BLwMbzES.js} +1 -1
- zenml/zen_server/dashboard/index.html +4 -4
- zenml/zen_server/deploy/helm/Chart.yaml +1 -1
- zenml/zen_server/deploy/helm/README.md +2 -2
- zenml/zen_server/rbac/endpoint_utils.py +6 -4
- zenml/zen_server/rbac/models.py +3 -2
- zenml/zen_server/rbac/rbac_sql_zen_store.py +173 -0
- zenml/zen_server/rbac/utils.py +4 -7
- zenml/zen_server/routers/auth_endpoints.py +22 -11
- zenml/zen_server/routers/steps_endpoints.py +7 -1
- zenml/zen_server/routers/users_endpoints.py +35 -37
- zenml/zen_server/routers/workspaces_endpoints.py +44 -55
- zenml/zen_server/template_execution/utils.py +4 -1
- zenml/zen_server/utils.py +4 -3
- zenml/zen_stores/base_zen_store.py +10 -2
- zenml/zen_stores/migrations/versions/0.71.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/26351d482b9e_add_step_run_unique_constraint.py +37 -0
- zenml/zen_stores/migrations/versions/a1237ba94fd8_add_model_version_producer_run_unique_.py +68 -0
- zenml/zen_stores/migrations/versions/b73bc71f1106_remove_component_spec_path.py +36 -0
- zenml/zen_stores/migrations/versions/cc269488e5a9_separate_run_metadata.py +135 -0
- zenml/zen_stores/migrations/versions/ec6307720f92_simplify_model_version_links.py +7 -6
- zenml/zen_stores/rest_zen_store.py +76 -43
- zenml/zen_stores/schemas/__init__.py +5 -1
- zenml/zen_stores/schemas/artifact_schemas.py +12 -11
- zenml/zen_stores/schemas/component_schemas.py +0 -3
- zenml/zen_stores/schemas/model_schemas.py +55 -17
- zenml/zen_stores/schemas/pipeline_deployment_schemas.py +7 -7
- zenml/zen_stores/schemas/pipeline_run_schemas.py +52 -18
- zenml/zen_stores/schemas/pipeline_schemas.py +5 -0
- zenml/zen_stores/schemas/run_metadata_schemas.py +66 -31
- zenml/zen_stores/schemas/step_run_schemas.py +40 -13
- zenml/zen_stores/schemas/utils.py +47 -3
- zenml/zen_stores/sql_zen_store.py +462 -134
- {zenml_nightly-0.70.0.dev20241125.dist-info → zenml_nightly-0.71.0.dev20241220.dist-info}/METADATA +5 -5
- {zenml_nightly-0.70.0.dev20241125.dist-info → zenml_nightly-0.71.0.dev20241220.dist-info}/RECORD +239 -217
- zenml/utils/cloud_utils.py +0 -40
- zenml/zen_server/dashboard/assets/RunSelector-DkPiIiNr.js +0 -1
- zenml/zen_server/dashboard/assets/StackList-WvuKQusZ.js +0 -1
- zenml/zen_server/dashboard/assets/delete-run-CJdh1P_h.js +0 -1
- zenml/zen_server/dashboard/assets/index-DlGvJQPn.css +0 -1
- zenml/zen_server/dashboard/assets/page-0JE_-Ec1.js +0 -1
- zenml/zen_server/dashboard/assets/page-BRLpxOt0.js +0 -1
- zenml/zen_server/dashboard/assets/page-BU7huvKw.js +0 -6
- zenml/zen_server/dashboard/assets/page-BvqLv2Ky.js +0 -1
- zenml/zen_server/dashboard/assets/page-CwxrFarU.js +0 -1
- zenml/zen_server/dashboard/assets/page-DfbXf_8s.js +0 -1
- zenml/zen_server/dashboard/assets/page-Dnovpa0i.js +0 -3
- zenml/zen_server/dashboard/assets/page-Dot3LPmL.js +0 -1
- zenml/zen_server/dashboard/assets/page-Xynx4btY.js +0 -14
- zenml/zen_server/dashboard/assets/page-YpKAqVSa.js +0 -1
- {zenml_nightly-0.70.0.dev20241125.dist-info → zenml_nightly-0.71.0.dev20241220.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.70.0.dev20241125.dist-info → zenml_nightly-0.71.0.dev20241220.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.70.0.dev20241125.dist-info → zenml_nightly-0.71.0.dev20241220.dist-info}/entry_points.txt +0 -0
zenml/cli/pipeline.py
CHANGED
@@ -40,6 +40,35 @@ from zenml.utils.yaml_utils import write_yaml
|
|
40
40
|
logger = get_logger(__name__)
|
41
41
|
|
42
42
|
|
43
|
+
def _import_pipeline(source: str) -> Pipeline:
|
44
|
+
"""Import a pipeline.
|
45
|
+
|
46
|
+
Args:
|
47
|
+
source: The pipeline source.
|
48
|
+
|
49
|
+
Returns:
|
50
|
+
The pipeline.
|
51
|
+
"""
|
52
|
+
try:
|
53
|
+
pipeline_instance = source_utils.load(source)
|
54
|
+
except ModuleNotFoundError as e:
|
55
|
+
source_root = source_utils.get_source_root()
|
56
|
+
cli_utils.error(
|
57
|
+
f"Unable to import module `{e.name}`. Make sure the source path is "
|
58
|
+
f"relative to your source root `{source_root}`."
|
59
|
+
)
|
60
|
+
except AttributeError as e:
|
61
|
+
cli_utils.error("Unable to load attribute from module: " + str(e))
|
62
|
+
|
63
|
+
if not isinstance(pipeline_instance, Pipeline):
|
64
|
+
cli_utils.error(
|
65
|
+
f"The given source path `{source}` does not resolve to a pipeline "
|
66
|
+
"object."
|
67
|
+
)
|
68
|
+
|
69
|
+
return pipeline_instance
|
70
|
+
|
71
|
+
|
43
72
|
@cli.group(cls=TagGroup, tag=CliCategories.MANAGEMENT_TOOLS)
|
44
73
|
def pipeline() -> None:
|
45
74
|
"""Interact with pipelines, runs and schedules."""
|
@@ -85,22 +114,7 @@ def register_pipeline(
|
|
85
114
|
"source code root."
|
86
115
|
)
|
87
116
|
|
88
|
-
|
89
|
-
pipeline_instance = source_utils.load(source)
|
90
|
-
except ModuleNotFoundError as e:
|
91
|
-
source_root = source_utils.get_source_root()
|
92
|
-
cli_utils.error(
|
93
|
-
f"Unable to import module `{e.name}`. Make sure the source path is "
|
94
|
-
f"relative to your source root `{source_root}`."
|
95
|
-
)
|
96
|
-
except AttributeError as e:
|
97
|
-
cli_utils.error("Unable to load attribute from module: " + str(e))
|
98
|
-
|
99
|
-
if not isinstance(pipeline_instance, Pipeline):
|
100
|
-
cli_utils.error(
|
101
|
-
f"The given source path `{source}` does not resolve to a pipeline "
|
102
|
-
"object."
|
103
|
-
)
|
117
|
+
pipeline_instance = _import_pipeline(source=source)
|
104
118
|
|
105
119
|
parameters: Dict[str, Any] = {}
|
106
120
|
if parameters_path:
|
@@ -176,24 +190,9 @@ def build_pipeline(
|
|
176
190
|
"your source code root."
|
177
191
|
)
|
178
192
|
|
179
|
-
try:
|
180
|
-
pipeline_instance = source_utils.load(source)
|
181
|
-
except ModuleNotFoundError as e:
|
182
|
-
source_root = source_utils.get_source_root()
|
183
|
-
cli_utils.error(
|
184
|
-
f"Unable to import module `{e.name}`. Make sure the source path is "
|
185
|
-
f"relative to your source root `{source_root}`."
|
186
|
-
)
|
187
|
-
except AttributeError as e:
|
188
|
-
cli_utils.error("Unable to load attribute from module: " + str(e))
|
189
|
-
|
190
|
-
if not isinstance(pipeline_instance, Pipeline):
|
191
|
-
cli_utils.error(
|
192
|
-
f"The given source path `{source}` does not resolve to a pipeline "
|
193
|
-
"object."
|
194
|
-
)
|
195
|
-
|
196
193
|
with cli_utils.temporary_active_stack(stack_name_or_id=stack_name_or_id):
|
194
|
+
pipeline_instance = _import_pipeline(source=source)
|
195
|
+
|
197
196
|
pipeline_instance = pipeline_instance.with_options(
|
198
197
|
config_path=config_path
|
199
198
|
)
|
@@ -277,36 +276,21 @@ def run_pipeline(
|
|
277
276
|
"your source code root."
|
278
277
|
)
|
279
278
|
|
280
|
-
try:
|
281
|
-
pipeline_instance = source_utils.load(source)
|
282
|
-
except ModuleNotFoundError as e:
|
283
|
-
source_root = source_utils.get_source_root()
|
284
|
-
cli_utils.error(
|
285
|
-
f"Unable to import module `{e.name}`. Make sure the source path is "
|
286
|
-
f"relative to your source root `{source_root}`."
|
287
|
-
)
|
288
|
-
except AttributeError as e:
|
289
|
-
cli_utils.error("Unable to load attribute from module: " + str(e))
|
290
|
-
|
291
|
-
if not isinstance(pipeline_instance, Pipeline):
|
292
|
-
cli_utils.error(
|
293
|
-
f"The given source path `{source}` does not resolve to a pipeline "
|
294
|
-
"object."
|
295
|
-
)
|
296
|
-
|
297
|
-
build: Union[str, PipelineBuildBase, None] = None
|
298
|
-
if build_path_or_id:
|
299
|
-
if uuid_utils.is_valid_uuid(build_path_or_id):
|
300
|
-
build = build_path_or_id
|
301
|
-
elif os.path.exists(build_path_or_id):
|
302
|
-
build = PipelineBuildBase.from_yaml(build_path_or_id)
|
303
|
-
else:
|
304
|
-
cli_utils.error(
|
305
|
-
f"The specified build {build_path_or_id} is not a valid UUID "
|
306
|
-
"or file path."
|
307
|
-
)
|
308
|
-
|
309
279
|
with cli_utils.temporary_active_stack(stack_name_or_id=stack_name_or_id):
|
280
|
+
pipeline_instance = _import_pipeline(source=source)
|
281
|
+
|
282
|
+
build: Union[str, PipelineBuildBase, None] = None
|
283
|
+
if build_path_or_id:
|
284
|
+
if uuid_utils.is_valid_uuid(build_path_or_id):
|
285
|
+
build = build_path_or_id
|
286
|
+
elif os.path.exists(build_path_or_id):
|
287
|
+
build = PipelineBuildBase.from_yaml(build_path_or_id)
|
288
|
+
else:
|
289
|
+
cli_utils.error(
|
290
|
+
f"The specified build {build_path_or_id} is not a valid UUID "
|
291
|
+
"or file path."
|
292
|
+
)
|
293
|
+
|
310
294
|
pipeline_instance = pipeline_instance.with_options(
|
311
295
|
config_path=config_path,
|
312
296
|
build=build,
|
@@ -315,6 +299,71 @@ def run_pipeline(
|
|
315
299
|
pipeline_instance()
|
316
300
|
|
317
301
|
|
302
|
+
@pipeline.command(
|
303
|
+
"create-run-template",
|
304
|
+
help="Create a run template for a pipeline. The SOURCE argument needs to "
|
305
|
+
"be an importable source path resolving to a ZenML pipeline instance, e.g. "
|
306
|
+
"`my_module.my_pipeline_instance`.",
|
307
|
+
)
|
308
|
+
@click.argument("source")
|
309
|
+
@click.option(
|
310
|
+
"--name",
|
311
|
+
"-n",
|
312
|
+
type=str,
|
313
|
+
required=True,
|
314
|
+
help="Name for the template",
|
315
|
+
)
|
316
|
+
@click.option(
|
317
|
+
"--config",
|
318
|
+
"-c",
|
319
|
+
"config_path",
|
320
|
+
type=click.Path(exists=True, dir_okay=False),
|
321
|
+
required=False,
|
322
|
+
help="Path to configuration file for the build.",
|
323
|
+
)
|
324
|
+
@click.option(
|
325
|
+
"--stack",
|
326
|
+
"-s",
|
327
|
+
"stack_name_or_id",
|
328
|
+
type=str,
|
329
|
+
required=False,
|
330
|
+
help="Name or ID of the stack to use for the build.",
|
331
|
+
)
|
332
|
+
def create_run_template(
|
333
|
+
source: str,
|
334
|
+
name: str,
|
335
|
+
config_path: Optional[str] = None,
|
336
|
+
stack_name_or_id: Optional[str] = None,
|
337
|
+
) -> None:
|
338
|
+
"""Create a run template for a pipeline.
|
339
|
+
|
340
|
+
Args:
|
341
|
+
source: Importable source resolving to a pipeline instance.
|
342
|
+
name: Name of the run template.
|
343
|
+
config_path: Path to pipeline configuration file.
|
344
|
+
stack_name_or_id: Name or ID of the stack for which the template should
|
345
|
+
be created.
|
346
|
+
"""
|
347
|
+
if not Client().root:
|
348
|
+
cli_utils.warning(
|
349
|
+
"You're running the `zenml pipeline create-run-template` command "
|
350
|
+
"without a ZenML repository. Your current working directory will "
|
351
|
+
"be used as the source root relative to which the registered step "
|
352
|
+
"classes will be resolved. To silence this warning, run `zenml "
|
353
|
+
"init` at your source code root."
|
354
|
+
)
|
355
|
+
|
356
|
+
with cli_utils.temporary_active_stack(stack_name_or_id=stack_name_or_id):
|
357
|
+
pipeline_instance = _import_pipeline(source=source)
|
358
|
+
|
359
|
+
pipeline_instance = pipeline_instance.with_options(
|
360
|
+
config_path=config_path
|
361
|
+
)
|
362
|
+
template = pipeline_instance.create_run_template(name=name)
|
363
|
+
|
364
|
+
cli_utils.declare(f"Created run template `{template.id}`.")
|
365
|
+
|
366
|
+
|
318
367
|
@pipeline.command("list", help="List all registered pipelines.")
|
319
368
|
@list_options(PipelineFilter)
|
320
369
|
def list_pipelines(**kwargs: Any) -> None:
|
zenml/cli/server.py
CHANGED
@@ -469,7 +469,7 @@ def logs(
|
|
469
469
|
if server is None:
|
470
470
|
cli_utils.error(
|
471
471
|
"The local ZenML dashboard is not running. Please call `zenml "
|
472
|
-
"
|
472
|
+
"login --local` first to start the ZenML dashboard locally."
|
473
473
|
)
|
474
474
|
|
475
475
|
from zenml.zen_server.deploy.deployer import LocalServerDeployer
|
@@ -587,25 +587,6 @@ def server_list(verbose: bool = False, all: bool = False) -> None:
|
|
587
587
|
accessible_pro_servers = client.tenant.list(member_only=not all)
|
588
588
|
except AuthorizationException as e:
|
589
589
|
cli_utils.warning(f"ZenML Pro authorization error: {e}")
|
590
|
-
else:
|
591
|
-
if not all:
|
592
|
-
accessible_pro_servers = [
|
593
|
-
s
|
594
|
-
for s in accessible_pro_servers
|
595
|
-
if s.status == TenantStatus.AVAILABLE
|
596
|
-
]
|
597
|
-
|
598
|
-
if not accessible_pro_servers:
|
599
|
-
cli_utils.declare(
|
600
|
-
"No ZenML Pro servers that are accessible to the current "
|
601
|
-
"user could be found."
|
602
|
-
)
|
603
|
-
if not all:
|
604
|
-
cli_utils.declare(
|
605
|
-
"Hint: use the `--all` flag to show all ZenML servers, "
|
606
|
-
"including those that the client is not currently "
|
607
|
-
"authorized to access or are not running."
|
608
|
-
)
|
609
590
|
|
610
591
|
# We update the list of stored ZenML Pro servers with the ones that the
|
611
592
|
# client is a member of
|
@@ -633,6 +614,25 @@ def server_list(verbose: bool = False, all: bool = False) -> None:
|
|
633
614
|
stored_server.update_server_info(accessible_server)
|
634
615
|
pro_servers.append(stored_server)
|
635
616
|
|
617
|
+
if not all:
|
618
|
+
accessible_pro_servers = [
|
619
|
+
s
|
620
|
+
for s in accessible_pro_servers
|
621
|
+
if s.status == TenantStatus.AVAILABLE
|
622
|
+
]
|
623
|
+
|
624
|
+
if not accessible_pro_servers:
|
625
|
+
cli_utils.declare(
|
626
|
+
"No ZenML Pro servers that are accessible to the current "
|
627
|
+
"user could be found."
|
628
|
+
)
|
629
|
+
if not all:
|
630
|
+
cli_utils.declare(
|
631
|
+
"Hint: use the `--all` flag to show all ZenML servers, "
|
632
|
+
"including those that the client is not currently "
|
633
|
+
"authorized to access or are not running."
|
634
|
+
)
|
635
|
+
|
636
636
|
elif pro_servers:
|
637
637
|
cli_utils.warning(
|
638
638
|
"The ZenML Pro authentication has expired. Please re-login "
|
zenml/cli/service_connectors.py
CHANGED
@@ -1194,9 +1194,9 @@ to provide access to:
|
|
1194
1194
|
use from an STS token to an AWS secret key. This involves updating some config
|
1195
1195
|
values and deleting others:
|
1196
1196
|
|
1197
|
-
$ zenml service-connector update aws-auto-multi \\
|
1198
|
-
--
|
1199
|
-
--aws_secret_access_key=<aws-secret-key> \\
|
1197
|
+
$ zenml service-connector update aws-auto-multi \\
|
1198
|
+
--aws_access_key_id=<aws-key-id> \\
|
1199
|
+
--aws_secret_access_key=<aws-secret-key> \\
|
1200
1200
|
--remove-attr aws-sts-token
|
1201
1201
|
|
1202
1202
|
- update the foo label to a new value and delete the baz label from a connector:
|
zenml/cli/stack.py
CHANGED
@@ -1129,14 +1129,12 @@ def export_stack(
|
|
1129
1129
|
def _import_stack_component(
|
1130
1130
|
component_type: StackComponentType,
|
1131
1131
|
component_dict: Dict[str, Any],
|
1132
|
-
component_spec_path: Optional[str] = None,
|
1133
1132
|
) -> UUID:
|
1134
1133
|
"""Import a single stack component with given type/config.
|
1135
1134
|
|
1136
1135
|
Args:
|
1137
1136
|
component_type: The type of component to import.
|
1138
1137
|
component_dict: Dict representation of the component to import.
|
1139
|
-
component_spec_path: Path to the component spec file.
|
1140
1138
|
|
1141
1139
|
Returns:
|
1142
1140
|
The ID of the imported component.
|
@@ -1172,7 +1170,6 @@ def _import_stack_component(
|
|
1172
1170
|
component_type=component_type,
|
1173
1171
|
flavor=flavor,
|
1174
1172
|
configuration=config,
|
1175
|
-
component_spec_path=component_spec_path,
|
1176
1173
|
)
|
1177
1174
|
return component.id
|
1178
1175
|
|
zenml/cli/stack_components.py
CHANGED
@@ -573,7 +573,6 @@ def generate_stack_component_copy_command(
|
|
573
573
|
component_type=component_to_copy.type,
|
574
574
|
configuration=component_to_copy.configuration,
|
575
575
|
labels=component_to_copy.labels,
|
576
|
-
component_spec_path=component_to_copy.component_spec_path,
|
577
576
|
)
|
578
577
|
print_model_url(get_component_url(copied_component))
|
579
578
|
|
zenml/cli/utils.py
CHANGED
@@ -711,11 +711,6 @@ def print_stack_component_configuration(
|
|
711
711
|
|
712
712
|
console.print(rich_table)
|
713
713
|
|
714
|
-
if component.component_spec_path:
|
715
|
-
declare(
|
716
|
-
f"Component spec path for `mlstacks`: {component.component_spec_path}"
|
717
|
-
)
|
718
|
-
|
719
714
|
|
720
715
|
def expand_argument_value_from_file(name: str, value: str) -> str:
|
721
716
|
"""Expands the value of an argument pointing to a file into the contents of that file.
|