zenml-nightly 0.62.0.dev20240729__py3-none-any.whl → 0.64.0.dev20240809__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 +2 -2
- RELEASE_NOTES.md +120 -0
- zenml/VERSION +1 -1
- zenml/__init__.py +0 -4
- zenml/actions/pipeline_run/pipeline_run_action.py +19 -17
- zenml/analytics/enums.py +4 -6
- zenml/cli/__init__.py +28 -76
- zenml/cli/base.py +2 -2
- zenml/cli/pipeline.py +54 -61
- zenml/cli/stack.py +6 -8
- zenml/cli/web_login.py +8 -0
- zenml/client.py +232 -103
- zenml/config/build_configuration.py +43 -17
- zenml/config/compiler.py +14 -22
- zenml/config/docker_settings.py +80 -57
- zenml/config/pipeline_run_configuration.py +3 -0
- zenml/config/server_config.py +3 -0
- zenml/config/source.py +60 -1
- zenml/constants.py +11 -2
- zenml/entrypoints/base_entrypoint_configuration.py +53 -8
- zenml/enums.py +4 -1
- zenml/environment.py +25 -9
- zenml/image_builders/base_image_builder.py +1 -1
- zenml/image_builders/build_context.py +25 -72
- zenml/integrations/aws/orchestrators/sagemaker_orchestrator.py +13 -4
- zenml/integrations/azure/__init__.py +4 -0
- zenml/integrations/azure/flavors/__init__.py +11 -0
- zenml/integrations/azure/flavors/azureml_orchestrator_flavor.py +263 -0
- zenml/{_hub → integrations/azure/orchestrators}/__init__.py +7 -2
- zenml/integrations/azure/orchestrators/azureml_orchestrator.py +544 -0
- zenml/integrations/azure/orchestrators/azureml_orchestrator_entrypoint_config.py +86 -0
- zenml/integrations/azure/step_operators/azureml_step_operator.py +3 -0
- zenml/integrations/databricks/flavors/databricks_orchestrator_flavor.py +20 -2
- zenml/integrations/databricks/orchestrators/databricks_orchestrator.py +19 -13
- zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +7 -2
- zenml/integrations/gcp/service_connectors/gcp_service_connector.py +123 -6
- zenml/integrations/kaniko/image_builders/kaniko_image_builder.py +1 -1
- zenml/integrations/mlflow/__init__.py +1 -1
- zenml/integrations/mlflow/experiment_trackers/mlflow_experiment_tracker.py +3 -1
- zenml/integrations/mlflow/flavors/mlflow_experiment_tracker_flavor.py +3 -0
- zenml/logger.py +13 -0
- zenml/models/__init__.py +26 -22
- zenml/models/v2/base/filter.py +32 -0
- zenml/models/v2/core/pipeline.py +73 -89
- zenml/models/v2/core/pipeline_build.py +15 -11
- zenml/models/v2/core/pipeline_deployment.py +72 -24
- zenml/models/v2/core/pipeline_run.py +65 -1
- zenml/models/v2/core/run_template.py +393 -0
- zenml/models/v2/core/server_settings.py +12 -0
- zenml/models/v2/core/user.py +0 -21
- zenml/models/v2/misc/server_models.py +7 -1
- zenml/models/v2/misc/stack_deployment.py +5 -0
- zenml/models/v2/misc/user_auth.py +0 -7
- zenml/new/pipelines/build_utils.py +220 -89
- zenml/new/pipelines/code_archive.py +157 -0
- zenml/new/pipelines/pipeline.py +46 -78
- zenml/new/pipelines/run_utils.py +79 -1
- zenml/post_execution/pipeline.py +1 -4
- zenml/service_connectors/service_connector_utils.py +18 -2
- zenml/stack_deployments/aws_stack_deployment.py +32 -8
- zenml/stack_deployments/azure_stack_deployment.py +122 -10
- zenml/stack_deployments/gcp_stack_deployment.py +36 -7
- zenml/stack_deployments/stack_deployment.py +23 -7
- zenml/steps/base_step.py +3 -0
- zenml/steps/utils.py +0 -4
- zenml/utils/archivable.py +149 -0
- zenml/utils/code_utils.py +244 -0
- zenml/utils/notebook_utils.py +122 -0
- zenml/utils/package_utils.py +39 -0
- zenml/utils/pipeline_docker_image_builder.py +3 -96
- zenml/utils/source_utils.py +109 -1
- zenml/zen_server/dashboard/assets/{404-B_YdvmwS.js → 404-CRAA_Lew.js} +1 -1
- zenml/zen_server/dashboard/assets/@radix-BXWm7HOa.js +85 -0
- zenml/zen_server/dashboard/assets/{@react-router-CO-OsFwI.js → @react-router-l3lMcXA2.js} +1 -1
- zenml/zen_server/dashboard/assets/{@reactflow-l_1hUr1S.js → @reactflow-CeVxyqYT.js} +2 -2
- zenml/zen_server/dashboard/assets/{@tanstack-DYiOyJUL.js → @tanstack-FmcYZMuX.js} +4 -4
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-ErO9aOgK.js +1 -0
- zenml/zen_server/dashboard/assets/{AwarenessChannel-CFg5iX4Z.js → AwarenessChannel-CLXo5rKM.js} +1 -1
- zenml/zen_server/dashboard/assets/{CodeSnippet-Dvkx_82E.js → CodeSnippet-D0VLxT2A.js} +2 -2
- zenml/zen_server/dashboard/assets/CollapsibleCard-BaUPiVg0.js +1 -0
- zenml/zen_server/dashboard/assets/{Commands-DoN1xrEq.js → Commands-JrcZK-3j.js} +1 -1
- zenml/zen_server/dashboard/assets/CopyButton-Dbo52T1K.js +2 -0
- zenml/zen_server/dashboard/assets/{CsvVizualization-Ck-nZ43m.js → CsvVizualization-D3kAypDj.js} +3 -3
- zenml/zen_server/dashboard/assets/DisplayDate-DizbSeT-.js +1 -0
- zenml/zen_server/dashboard/assets/EditSecretDialog-Bd7mFLS4.js +1 -0
- zenml/zen_server/dashboard/assets/{EmptyState-BMLnFVlB.js → EmptyState-BHblM39I.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-kLtljEOM.js → Error-C6LeJSER.js} +1 -1
- zenml/zen_server/dashboard/assets/{ExecutionStatus-DguLLgTK.js → ExecutionStatus-jH4OrWBq.js} +1 -1
- zenml/zen_server/dashboard/assets/{Helpbox-BXUMP21n.js → Helpbox-aAB2XP-z.js} +1 -1
- zenml/zen_server/dashboard/assets/{Infobox-DSt0O-dm.js → Infobox-BQ0aty32.js} +1 -1
- zenml/zen_server/dashboard/assets/{InlineAvatar-xsrsIGE-.js → InlineAvatar-DpTLgM3Q.js} +1 -1
- zenml/zen_server/dashboard/assets/Lock-CNyJvf2r.js +1 -0
- zenml/zen_server/dashboard/assets/{MarkdownVisualization-xp3hhULl.js → MarkdownVisualization-Bajxn0HY.js} +1 -1
- zenml/zen_server/dashboard/assets/NumberBox-BmKE0qnO.js +1 -0
- zenml/zen_server/dashboard/assets/{PasswordChecker-DUveqlva.js → PasswordChecker-yGGoJSB-.js} +1 -1
- zenml/zen_server/dashboard/assets/ProviderRadio-BBqkIuTd.js +1 -0
- zenml/zen_server/dashboard/assets/RadioItem-xLhXoiFV.js +1 -0
- zenml/zen_server/dashboard/assets/SearchField-C9R0mdaX.js +1 -0
- zenml/zen_server/dashboard/assets/{SetPassword-BXGTWiwj.js → SetPassword-52sNxNiO.js} +1 -1
- zenml/zen_server/dashboard/assets/{SuccessStep-DZC60t0x.js → SuccessStep-DlkItqYG.js} +1 -1
- zenml/zen_server/dashboard/assets/Tick-uxv80Q6a.js +1 -0
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-DGvwFWO1.js → UpdatePasswordSchemas-oN4G3sKz.js} +1 -1
- zenml/zen_server/dashboard/assets/{aws-BgKTfTfx.js → aws-0_3UsPif.js} +1 -1
- zenml/zen_server/dashboard/assets/{check-circle-i56092KI.js → check-circle-1_I207rW.js} +1 -1
- zenml/zen_server/dashboard/assets/chevron-down-BpaF8JqM.js +1 -0
- zenml/zen_server/dashboard/assets/{chevron-right-double-CZBOf6JM.js → chevron-right-double-Dk8e2L99.js} +1 -1
- zenml/zen_server/dashboard/assets/{cloud-only-C_yFCAkP.js → cloud-only-BkUuI0lZ.js} +1 -1
- zenml/zen_server/dashboard/assets/components-Br2ezRib.js +1 -0
- zenml/zen_server/dashboard/assets/{copy-BXNk6BjL.js → copy-f3XGPPxt.js} +1 -1
- zenml/zen_server/dashboard/assets/{database-1xWSgZfO.js → database-cXYNX9tt.js} +1 -1
- zenml/zen_server/dashboard/assets/{docker-CQMVm_4d.js → docker-8uj__HHK.js} +1 -1
- zenml/zen_server/dashboard/assets/dots-horizontal-sKQlWEni.js +1 -0
- zenml/zen_server/dashboard/assets/edit-C0MVvPD2.js +1 -0
- zenml/zen_server/dashboard/assets/{file-text-CqD_iu6l.js → file-text-B9JibxTs.js} +1 -1
- zenml/zen_server/dashboard/assets/{help-bu_DgLKI.js → help-FuHlZwn0.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-rK_Wuy2W.js → index-Bd1xgUQG.js} +1 -1
- zenml/zen_server/dashboard/assets/index-DaGknux4.css +1 -0
- zenml/zen_server/dashboard/assets/{index-BczVOqUf.js → index-DhIZtpxB.js} +5 -5
- zenml/zen_server/dashboard/assets/index.esm-DT4uyn2i.js +1 -0
- zenml/zen_server/dashboard/assets/layout-D6oiSbfd.js +1 -0
- zenml/zen_server/dashboard/assets/{login-mutation-CrHrndTI.js → login-mutation-13A_JSVA.js} +1 -1
- zenml/zen_server/dashboard/assets/{logs-D8k8BVFf.js → logs-CgeE2vZP.js} +1 -1
- zenml/zen_server/dashboard/assets/{not-found-DYa4pC-C.js → not-found-B0Mmb90p.js} +1 -1
- zenml/zen_server/dashboard/assets/package-DdkziX79.js +1 -0
- zenml/zen_server/dashboard/assets/page-7-v2OBm-.js +1 -0
- zenml/zen_server/dashboard/assets/{page-MFQyIJd3.js → page-B3ozwdD1.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BkuQDIf-.js → page-BGwA9B1M.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-1iL8aMqs.js → page-BkjAUyTA.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BnacgBiy.js +1 -0
- zenml/zen_server/dashboard/assets/page-BxF_KMQ3.js +2 -0
- zenml/zen_server/dashboard/assets/page-C4POHC0K.js +1 -0
- zenml/zen_server/dashboard/assets/page-C9kudd44.js +9 -0
- zenml/zen_server/dashboard/assets/page-CA1j3GpJ.js +1 -0
- zenml/zen_server/dashboard/assets/page-CCY6yfmu.js +1 -0
- zenml/zen_server/dashboard/assets/page-CgTe7Bme.js +1 -0
- zenml/zen_server/dashboard/assets/{page-8a4UMKXZ.js → page-Cgn-6v2Y.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CxQmQqDw.js +1 -0
- zenml/zen_server/dashboard/assets/page-D2Goey3H.js +1 -0
- zenml/zen_server/dashboard/assets/page-DLpOnf7u.js +1 -0
- zenml/zen_server/dashboard/assets/{page-BhgCDInH.js → page-DSTQnBk-.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-1h_sD1jz.js → page-DTysUGOy.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-2grKx_MY.js → page-D_EXUFJb.js} +1 -1
- zenml/zen_server/dashboard/assets/page-Db15QzsM.js +1 -0
- zenml/zen_server/dashboard/assets/{page-BDns21Iz.js → page-DugsjcQ_.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-C6-UGEbH.js → page-OFKSPyN7.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BkeAAYwp.js → page-RnG-qhv9.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CCNRIt_f.js → page-T2BtjwPl.js} +1 -1
- zenml/zen_server/dashboard/assets/page-TXe1Eo3Z.js +1 -0
- zenml/zen_server/dashboard/assets/{page-BnaevhnB.js → page-YiF_fNbe.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-uA5prJGY.js → page-hQaiQXfg.js} +1 -1
- zenml/zen_server/dashboard/assets/persist-3-5nOJ6m.js +1 -0
- zenml/zen_server/dashboard/assets/{play-circle-CNtZKDnW.js → play-circle-XSkLR12B.js} +1 -1
- zenml/zen_server/dashboard/assets/plus-FB9-lEq_.js +1 -0
- zenml/zen_server/dashboard/assets/refresh-COb6KYDi.js +1 -0
- zenml/zen_server/dashboard/assets/sharedSchema-BoYx_B_L.js +14 -0
- zenml/zen_server/dashboard/assets/{stack-detail-query-Cficsl6d.js → stack-detail-query-B-US_-wa.js} +1 -1
- zenml/zen_server/dashboard/assets/{terminal-By9cErXc.js → terminal-grtjrIEJ.js} +1 -1
- zenml/zen_server/dashboard/assets/trash-Cd5CSFqA.js +1 -0
- zenml/zen_server/dashboard/assets/{update-server-settings-mutation-7d8xi1tS.js → update-server-settings-mutation-B8GB_ubU.js} +1 -1
- zenml/zen_server/dashboard/assets/{url-D7mAQGUM.js → url-hcMJkz8p.js} +1 -1
- zenml/zen_server/dashboard/assets/{zod-BhoGpZ63.js → zod-CnykDKJj.js} +1 -1
- zenml/zen_server/dashboard/index.html +7 -7
- zenml/zen_server/dashboard_legacy/asset-manifest.json +4 -4
- zenml/zen_server/dashboard_legacy/index.html +1 -1
- zenml/zen_server/dashboard_legacy/{precache-manifest.12246c7548e71e2c4438e496360de80c.js → precache-manifest.9c473c96a43298343a7ce1256183123b.js} +4 -4
- zenml/zen_server/dashboard_legacy/service-worker.js +1 -1
- zenml/zen_server/dashboard_legacy/static/js/{main.3b27024b.chunk.js → main.463c90b9.chunk.js} +2 -2
- zenml/zen_server/dashboard_legacy/static/js/{main.3b27024b.chunk.js.map → main.463c90b9.chunk.js.map} +1 -1
- zenml/zen_server/deploy/helm/Chart.yaml +1 -1
- zenml/zen_server/deploy/helm/README.md +2 -2
- zenml/zen_server/rbac/models.py +1 -0
- zenml/zen_server/rbac/utils.py +4 -0
- zenml/zen_server/routers/pipeline_builds_endpoints.py +2 -66
- zenml/zen_server/routers/pipeline_deployments_endpoints.py +2 -53
- zenml/zen_server/routers/pipelines_endpoints.py +1 -74
- zenml/zen_server/routers/run_templates_endpoints.py +212 -0
- zenml/zen_server/routers/stack_deployment_endpoints.py +6 -0
- zenml/zen_server/routers/users_endpoints.py +0 -7
- zenml/zen_server/routers/workspaces_endpoints.py +79 -0
- zenml/zen_server/{pipeline_deployment → template_execution}/runner_entrypoint_configuration.py +1 -8
- zenml/zen_server/{pipeline_deployment → template_execution}/utils.py +214 -92
- zenml/zen_server/utils.py +77 -2
- zenml/zen_server/zen_server_api.py +54 -2
- zenml/zen_stores/base_zen_store.py +7 -1
- zenml/zen_stores/migrations/versions/0.63.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.64.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/026d4577b6a0_add_code_path.py +39 -0
- zenml/zen_stores/migrations/versions/3dcc5d20e82f_add_last_user_activity.py +51 -0
- zenml/zen_stores/migrations/versions/7d1919bb1ef0_add_run_templates.py +100 -0
- zenml/zen_stores/migrations/versions/909550c7c4da_remove_user_hub_token.py +36 -0
- zenml/zen_stores/migrations/versions/b59aa68fdb1f_simplify_pipelines.py +139 -0
- zenml/zen_stores/rest_zen_store.py +112 -39
- zenml/zen_stores/schemas/__init__.py +2 -0
- zenml/zen_stores/schemas/pipeline_build_schemas.py +3 -3
- zenml/zen_stores/schemas/pipeline_deployment_schemas.py +32 -2
- zenml/zen_stores/schemas/pipeline_run_schemas.py +29 -3
- zenml/zen_stores/schemas/pipeline_schemas.py +29 -30
- zenml/zen_stores/schemas/run_template_schemas.py +264 -0
- zenml/zen_stores/schemas/server_settings_schemas.py +2 -0
- zenml/zen_stores/schemas/step_run_schemas.py +11 -4
- zenml/zen_stores/schemas/user_schemas.py +0 -2
- zenml/zen_stores/sql_zen_store.py +389 -151
- zenml/zen_stores/template_utils.py +261 -0
- zenml/zen_stores/zen_store_interface.py +93 -20
- {zenml_nightly-0.62.0.dev20240729.dist-info → zenml_nightly-0.64.0.dev20240809.dist-info}/METADATA +3 -3
- {zenml_nightly-0.62.0.dev20240729.dist-info → zenml_nightly-0.64.0.dev20240809.dist-info}/RECORD +211 -184
- zenml/_hub/client.py +0 -289
- zenml/_hub/constants.py +0 -21
- zenml/_hub/utils.py +0 -79
- zenml/cli/hub.py +0 -1116
- zenml/models/v2/core/pipeline_namespace.py +0 -113
- zenml/models/v2/misc/hub_plugin_models.py +0 -79
- zenml/new/pipelines/deserialization_utils.py +0 -292
- zenml/zen_server/dashboard/assets/@radix-CFOkMR_E.js +0 -85
- zenml/zen_server/dashboard/assets/CollapsibleCard-opiuBHHc.js +0 -1
- zenml/zen_server/dashboard/assets/CopyButton-Cr7xYEPb.js +0 -2
- zenml/zen_server/dashboard/assets/DisplayDate-DYgIjlDF.js +0 -1
- zenml/zen_server/dashboard/assets/Pagination-C6X-mifw.js +0 -1
- zenml/zen_server/dashboard/assets/index-EpMIKgrI.css +0 -1
- zenml/zen_server/dashboard/assets/index.esm-Corw4lXQ.js +0 -1
- zenml/zen_server/dashboard/assets/package-B3fWP-Dh.js +0 -1
- zenml/zen_server/dashboard/assets/page-5NCOHOsy.js +0 -1
- zenml/zen_server/dashboard/assets/page-B6h3iaHJ.js +0 -1
- zenml/zen_server/dashboard/assets/page-Bi-wtWiO.js +0 -5
- zenml/zen_server/dashboard/assets/page-Bq0YxkLV.js +0 -1
- zenml/zen_server/dashboard/assets/page-Bs2F4eoD.js +0 -2
- zenml/zen_server/dashboard/assets/page-CHNxpz3n.js +0 -1
- zenml/zen_server/dashboard/assets/page-DgorQFqi.js +0 -1
- zenml/zen_server/dashboard/assets/page-K8ebxVIs.js +0 -1
- zenml/zen_server/dashboard/assets/page-TgCF0P_U.js +0 -1
- zenml/zen_server/dashboard/assets/page-ZnCEe-eK.js +0 -9
- zenml/zen_server/dashboard/assets/persist-D7HJNBWx.js +0 -1
- zenml/zen_server/dashboard/assets/plus-C8WOyCzt.js +0 -1
- zenml/zen_server/dashboard/assets/secrets-video-OBJ6irhH.svg +0 -21
- zenml/zen_server/dashboard/assets/stacks-video-7gfxpAq4.svg +0 -21
- /zenml/zen_server/{pipeline_deployment → template_execution}/__init__.py +0 -0
- /zenml/zen_server/{pipeline_deployment → template_execution}/workload_manager_interface.py +0 -0
- {zenml_nightly-0.62.0.dev20240729.dist-info → zenml_nightly-0.64.0.dev20240809.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.62.0.dev20240729.dist-info → zenml_nightly-0.64.0.dev20240809.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.62.0.dev20240729.dist-info → zenml_nightly-0.64.0.dev20240809.dist-info}/entry_points.txt +0 -0
zenml/cli/pipeline.py
CHANGED
@@ -121,15 +121,13 @@ def register_pipeline(
|
|
121
121
|
pipeline_instance.register()
|
122
122
|
|
123
123
|
|
124
|
-
@pipeline.command(
|
125
|
-
|
126
|
-
|
127
|
-
"
|
128
|
-
"
|
129
|
-
type=str,
|
130
|
-
required=False,
|
131
|
-
help="Optional version of the pipeline.",
|
124
|
+
@pipeline.command(
|
125
|
+
"build",
|
126
|
+
help="Build Docker images for a pipeline. The SOURCE argument needs to be "
|
127
|
+
" an importable source path resolving to a ZenML pipeline instance, e.g. "
|
128
|
+
"`my_module.my_pipeline_instance`.",
|
132
129
|
)
|
130
|
+
@click.argument("source")
|
133
131
|
@click.option(
|
134
132
|
"--config",
|
135
133
|
"-c",
|
@@ -155,8 +153,7 @@ def register_pipeline(
|
|
155
153
|
help="Output path for the build information.",
|
156
154
|
)
|
157
155
|
def build_pipeline(
|
158
|
-
|
159
|
-
version: Optional[str] = None,
|
156
|
+
source: str,
|
160
157
|
config_path: Optional[str] = None,
|
161
158
|
stack_name_or_id: Optional[str] = None,
|
162
159
|
output_path: Optional[str] = None,
|
@@ -164,8 +161,7 @@ def build_pipeline(
|
|
164
161
|
"""Build Docker images for a pipeline.
|
165
162
|
|
166
163
|
Args:
|
167
|
-
|
168
|
-
version: Version of the pipeline.
|
164
|
+
source: Importable source resolving to a pipeline instance.
|
169
165
|
config_path: Path to pipeline configuration file.
|
170
166
|
stack_name_or_id: Name or ID of the stack for which the images should
|
171
167
|
be built.
|
@@ -180,13 +176,28 @@ def build_pipeline(
|
|
180
176
|
"your source code root."
|
181
177
|
)
|
182
178
|
|
183
|
-
|
184
|
-
|
185
|
-
|
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
|
+
)
|
186
195
|
|
187
196
|
with cli_utils.temporary_active_stack(stack_name_or_id=stack_name_or_id):
|
188
|
-
pipeline_instance =
|
189
|
-
|
197
|
+
pipeline_instance = pipeline_instance.with_options(
|
198
|
+
config_path=config_path
|
199
|
+
)
|
200
|
+
build = pipeline_instance.build()
|
190
201
|
|
191
202
|
if build:
|
192
203
|
cli_utils.declare(f"Created pipeline build `{build.id}`.")
|
@@ -200,15 +211,13 @@ def build_pipeline(
|
|
200
211
|
cli_utils.declare("No docker builds required.")
|
201
212
|
|
202
213
|
|
203
|
-
@pipeline.command(
|
204
|
-
|
205
|
-
|
206
|
-
"
|
207
|
-
"
|
208
|
-
type=str,
|
209
|
-
required=False,
|
210
|
-
help="Optional version of the pipeline.",
|
214
|
+
@pipeline.command(
|
215
|
+
"run",
|
216
|
+
help="Run a pipeline. The SOURCE argument needs to be an "
|
217
|
+
"importable source path resolving to a ZenML pipeline instance, e.g. "
|
218
|
+
"`my_module.my_pipeline_instance`.",
|
211
219
|
)
|
220
|
+
@click.argument("source")
|
212
221
|
@click.option(
|
213
222
|
"--config",
|
214
223
|
"-c",
|
@@ -241,8 +250,7 @@ def build_pipeline(
|
|
241
250
|
help="Prevent automatic build reusing.",
|
242
251
|
)
|
243
252
|
def run_pipeline(
|
244
|
-
|
245
|
-
version: Optional[str] = None,
|
253
|
+
source: str,
|
246
254
|
config_path: Optional[str] = None,
|
247
255
|
stack_name_or_id: Optional[str] = None,
|
248
256
|
build_path_or_id: Optional[str] = None,
|
@@ -251,8 +259,7 @@ def run_pipeline(
|
|
251
259
|
"""Run a pipeline.
|
252
260
|
|
253
261
|
Args:
|
254
|
-
|
255
|
-
version: Version of the pipeline.
|
262
|
+
source: Importable source resolving to a pipeline instance.
|
256
263
|
config_path: Path to pipeline configuration file.
|
257
264
|
stack_name_or_id: Name or ID of the stack on which the pipeline should
|
258
265
|
run.
|
@@ -270,9 +277,22 @@ def run_pipeline(
|
|
270
277
|
"your source code root."
|
271
278
|
)
|
272
279
|
|
273
|
-
|
274
|
-
|
275
|
-
|
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
|
+
)
|
276
296
|
|
277
297
|
build: Union[str, PipelineBuildBase, None] = None
|
278
298
|
if build_path_or_id:
|
@@ -287,7 +307,6 @@ def run_pipeline(
|
|
287
307
|
)
|
288
308
|
|
289
309
|
with cli_utils.temporary_active_stack(stack_name_or_id=stack_name_or_id):
|
290
|
-
pipeline_instance = Pipeline.from_model(pipeline_model)
|
291
310
|
pipeline_instance = pipeline_instance.with_options(
|
292
311
|
config_path=config_path,
|
293
312
|
build=build,
|
@@ -320,18 +339,6 @@ def list_pipelines(**kwargs: Any) -> None:
|
|
320
339
|
|
321
340
|
@pipeline.command("delete")
|
322
341
|
@click.argument("pipeline_name_or_id", type=str, required=True)
|
323
|
-
@click.option(
|
324
|
-
"--version",
|
325
|
-
"-v",
|
326
|
-
help="Optional pipeline version.",
|
327
|
-
type=str,
|
328
|
-
required=False,
|
329
|
-
)
|
330
|
-
@click.option(
|
331
|
-
"--all-versions",
|
332
|
-
help="Delete all versions of the pipeline..",
|
333
|
-
is_flag=True,
|
334
|
-
)
|
335
342
|
@click.option(
|
336
343
|
"--yes",
|
337
344
|
"-y",
|
@@ -340,28 +347,18 @@ def list_pipelines(**kwargs: Any) -> None:
|
|
340
347
|
)
|
341
348
|
def delete_pipeline(
|
342
349
|
pipeline_name_or_id: str,
|
343
|
-
version: Optional[str] = None,
|
344
|
-
all_versions: bool = False,
|
345
350
|
yes: bool = False,
|
346
351
|
) -> None:
|
347
352
|
"""Delete a pipeline.
|
348
353
|
|
349
354
|
Args:
|
350
355
|
pipeline_name_or_id: The name or ID of the pipeline to delete.
|
351
|
-
version: The version of the pipeline to delete.
|
352
|
-
all_versions: If set, delete all versions of the pipeline.
|
353
356
|
yes: If set, don't ask for confirmation.
|
354
357
|
"""
|
355
|
-
version_suffix = ""
|
356
|
-
if all_versions:
|
357
|
-
version_suffix = " (all versions)"
|
358
|
-
elif version:
|
359
|
-
version_suffix = f" (version {version})"
|
360
|
-
|
361
358
|
if not yes:
|
362
359
|
confirmation = cli_utils.confirmation(
|
363
360
|
f"Are you sure you want to delete pipeline "
|
364
|
-
f"`{pipeline_name_or_id}
|
361
|
+
f"`{pipeline_name_or_id}`? This will change all "
|
365
362
|
"existing runs of this pipeline to become unlisted."
|
366
363
|
)
|
367
364
|
if not confirmation:
|
@@ -371,15 +368,11 @@ def delete_pipeline(
|
|
371
368
|
try:
|
372
369
|
Client().delete_pipeline(
|
373
370
|
name_id_or_prefix=pipeline_name_or_id,
|
374
|
-
version=version,
|
375
|
-
all_versions=all_versions,
|
376
371
|
)
|
377
372
|
except KeyError as e:
|
378
373
|
cli_utils.error(str(e))
|
379
374
|
else:
|
380
|
-
cli_utils.declare(
|
381
|
-
f"Deleted pipeline `{pipeline_name_or_id}{version_suffix}`."
|
382
|
-
)
|
375
|
+
cli_utils.declare(f"Deleted pipeline `{pipeline_name_or_id}`.")
|
383
376
|
|
384
377
|
|
385
378
|
@pipeline.group()
|
zenml/cli/stack.py
CHANGED
@@ -1720,7 +1720,7 @@ def deploy(
|
|
1720
1720
|
+ deployment.description
|
1721
1721
|
)
|
1722
1722
|
)
|
1723
|
-
console.print(Markdown("##
|
1723
|
+
console.print(Markdown("## Details\n" + deployment.instructions))
|
1724
1724
|
|
1725
1725
|
deployment_config = client.zen_store.get_stack_deployment_config(
|
1726
1726
|
provider=StackDeploymentProvider(provider),
|
@@ -1728,16 +1728,13 @@ def deploy(
|
|
1728
1728
|
location=location,
|
1729
1729
|
)
|
1730
1730
|
|
1731
|
-
if deployment_config.
|
1731
|
+
if deployment_config.instructions:
|
1732
1732
|
console.print(
|
1733
|
-
Markdown(
|
1734
|
-
"## Configuration\n"
|
1735
|
-
"You will be asked to provide the following configuration "
|
1736
|
-
"values during the deployment process:"
|
1737
|
-
),
|
1733
|
+
Markdown("## Instructions\n" + deployment_config.instructions),
|
1738
1734
|
"\n",
|
1739
1735
|
)
|
1740
1736
|
|
1737
|
+
if deployment_config.configuration:
|
1741
1738
|
console.print(
|
1742
1739
|
deployment_config.configuration,
|
1743
1740
|
no_wrap=True,
|
@@ -1748,7 +1745,8 @@ def deploy(
|
|
1748
1745
|
|
1749
1746
|
if not cli_utils.confirmation(
|
1750
1747
|
"\n\nProceed to continue with the deployment. You will be "
|
1751
|
-
f"automatically redirected to
|
1748
|
+
f"automatically redirected to "
|
1749
|
+
f"{deployment_config.deployment_url_text} in your browser.",
|
1752
1750
|
):
|
1753
1751
|
raise click.Abort()
|
1754
1752
|
|
zenml/cli/web_login.py
CHANGED
@@ -28,6 +28,7 @@ from zenml.constants import (
|
|
28
28
|
DEVICE_AUTHORIZATION,
|
29
29
|
LOGIN,
|
30
30
|
VERSION_1,
|
31
|
+
ZENML_PRO_CONNECTION_ISSUES_SUSPENDED_PAUSED_TENANT_HINT,
|
31
32
|
)
|
32
33
|
from zenml.exceptions import AuthorizationException, OAuthError
|
33
34
|
from zenml.logger import get_logger
|
@@ -93,6 +94,11 @@ def web_login(url: str, verify_ssl: Union[str, bool]) -> str:
|
|
93
94
|
# Get rid of any trailing slashes to prevent issues when having double
|
94
95
|
# slashes in the URL
|
95
96
|
url = url.rstrip("/")
|
97
|
+
zenml_pro_extra = ""
|
98
|
+
if ".zenml.io" in url:
|
99
|
+
zenml_pro_extra = (
|
100
|
+
ZENML_PRO_CONNECTION_ISSUES_SUSPENDED_PAUSED_TENANT_HINT
|
101
|
+
)
|
96
102
|
try:
|
97
103
|
auth_url = url + API + VERSION_1 + DEVICE_AUTHORIZATION
|
98
104
|
response = requests.post(
|
@@ -111,6 +117,7 @@ def web_login(url: str, verify_ssl: Union[str, bool]) -> str:
|
|
111
117
|
logger.info(f"Error: {response.status_code} {response.text}")
|
112
118
|
raise AuthorizationException(
|
113
119
|
"Could not connect to API server. Please check the URL."
|
120
|
+
+ zenml_pro_extra
|
114
121
|
)
|
115
122
|
except (requests.exceptions.JSONDecodeError, ValueError, TypeError):
|
116
123
|
logger.exception("Bad response received from API server.")
|
@@ -121,6 +128,7 @@ def web_login(url: str, verify_ssl: Union[str, bool]) -> str:
|
|
121
128
|
logger.exception("Could not connect to API server.")
|
122
129
|
raise AuthorizationException(
|
123
130
|
"Could not connect to API server. Please check the URL."
|
131
|
+
+ zenml_pro_extra
|
124
132
|
)
|
125
133
|
|
126
134
|
# Open the verification URL in the user's browser
|