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.
Files changed (240) hide show
  1. README.md +2 -2
  2. RELEASE_NOTES.md +120 -0
  3. zenml/VERSION +1 -1
  4. zenml/__init__.py +0 -4
  5. zenml/actions/pipeline_run/pipeline_run_action.py +19 -17
  6. zenml/analytics/enums.py +4 -6
  7. zenml/cli/__init__.py +28 -76
  8. zenml/cli/base.py +2 -2
  9. zenml/cli/pipeline.py +54 -61
  10. zenml/cli/stack.py +6 -8
  11. zenml/cli/web_login.py +8 -0
  12. zenml/client.py +232 -103
  13. zenml/config/build_configuration.py +43 -17
  14. zenml/config/compiler.py +14 -22
  15. zenml/config/docker_settings.py +80 -57
  16. zenml/config/pipeline_run_configuration.py +3 -0
  17. zenml/config/server_config.py +3 -0
  18. zenml/config/source.py +60 -1
  19. zenml/constants.py +11 -2
  20. zenml/entrypoints/base_entrypoint_configuration.py +53 -8
  21. zenml/enums.py +4 -1
  22. zenml/environment.py +25 -9
  23. zenml/image_builders/base_image_builder.py +1 -1
  24. zenml/image_builders/build_context.py +25 -72
  25. zenml/integrations/aws/orchestrators/sagemaker_orchestrator.py +13 -4
  26. zenml/integrations/azure/__init__.py +4 -0
  27. zenml/integrations/azure/flavors/__init__.py +11 -0
  28. zenml/integrations/azure/flavors/azureml_orchestrator_flavor.py +263 -0
  29. zenml/{_hub → integrations/azure/orchestrators}/__init__.py +7 -2
  30. zenml/integrations/azure/orchestrators/azureml_orchestrator.py +544 -0
  31. zenml/integrations/azure/orchestrators/azureml_orchestrator_entrypoint_config.py +86 -0
  32. zenml/integrations/azure/step_operators/azureml_step_operator.py +3 -0
  33. zenml/integrations/databricks/flavors/databricks_orchestrator_flavor.py +20 -2
  34. zenml/integrations/databricks/orchestrators/databricks_orchestrator.py +19 -13
  35. zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +7 -2
  36. zenml/integrations/gcp/service_connectors/gcp_service_connector.py +123 -6
  37. zenml/integrations/kaniko/image_builders/kaniko_image_builder.py +1 -1
  38. zenml/integrations/mlflow/__init__.py +1 -1
  39. zenml/integrations/mlflow/experiment_trackers/mlflow_experiment_tracker.py +3 -1
  40. zenml/integrations/mlflow/flavors/mlflow_experiment_tracker_flavor.py +3 -0
  41. zenml/logger.py +13 -0
  42. zenml/models/__init__.py +26 -22
  43. zenml/models/v2/base/filter.py +32 -0
  44. zenml/models/v2/core/pipeline.py +73 -89
  45. zenml/models/v2/core/pipeline_build.py +15 -11
  46. zenml/models/v2/core/pipeline_deployment.py +72 -24
  47. zenml/models/v2/core/pipeline_run.py +65 -1
  48. zenml/models/v2/core/run_template.py +393 -0
  49. zenml/models/v2/core/server_settings.py +12 -0
  50. zenml/models/v2/core/user.py +0 -21
  51. zenml/models/v2/misc/server_models.py +7 -1
  52. zenml/models/v2/misc/stack_deployment.py +5 -0
  53. zenml/models/v2/misc/user_auth.py +0 -7
  54. zenml/new/pipelines/build_utils.py +220 -89
  55. zenml/new/pipelines/code_archive.py +157 -0
  56. zenml/new/pipelines/pipeline.py +46 -78
  57. zenml/new/pipelines/run_utils.py +79 -1
  58. zenml/post_execution/pipeline.py +1 -4
  59. zenml/service_connectors/service_connector_utils.py +18 -2
  60. zenml/stack_deployments/aws_stack_deployment.py +32 -8
  61. zenml/stack_deployments/azure_stack_deployment.py +122 -10
  62. zenml/stack_deployments/gcp_stack_deployment.py +36 -7
  63. zenml/stack_deployments/stack_deployment.py +23 -7
  64. zenml/steps/base_step.py +3 -0
  65. zenml/steps/utils.py +0 -4
  66. zenml/utils/archivable.py +149 -0
  67. zenml/utils/code_utils.py +244 -0
  68. zenml/utils/notebook_utils.py +122 -0
  69. zenml/utils/package_utils.py +39 -0
  70. zenml/utils/pipeline_docker_image_builder.py +3 -96
  71. zenml/utils/source_utils.py +109 -1
  72. zenml/zen_server/dashboard/assets/{404-B_YdvmwS.js → 404-CRAA_Lew.js} +1 -1
  73. zenml/zen_server/dashboard/assets/@radix-BXWm7HOa.js +85 -0
  74. zenml/zen_server/dashboard/assets/{@react-router-CO-OsFwI.js → @react-router-l3lMcXA2.js} +1 -1
  75. zenml/zen_server/dashboard/assets/{@reactflow-l_1hUr1S.js → @reactflow-CeVxyqYT.js} +2 -2
  76. zenml/zen_server/dashboard/assets/{@tanstack-DYiOyJUL.js → @tanstack-FmcYZMuX.js} +4 -4
  77. zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-ErO9aOgK.js +1 -0
  78. zenml/zen_server/dashboard/assets/{AwarenessChannel-CFg5iX4Z.js → AwarenessChannel-CLXo5rKM.js} +1 -1
  79. zenml/zen_server/dashboard/assets/{CodeSnippet-Dvkx_82E.js → CodeSnippet-D0VLxT2A.js} +2 -2
  80. zenml/zen_server/dashboard/assets/CollapsibleCard-BaUPiVg0.js +1 -0
  81. zenml/zen_server/dashboard/assets/{Commands-DoN1xrEq.js → Commands-JrcZK-3j.js} +1 -1
  82. zenml/zen_server/dashboard/assets/CopyButton-Dbo52T1K.js +2 -0
  83. zenml/zen_server/dashboard/assets/{CsvVizualization-Ck-nZ43m.js → CsvVizualization-D3kAypDj.js} +3 -3
  84. zenml/zen_server/dashboard/assets/DisplayDate-DizbSeT-.js +1 -0
  85. zenml/zen_server/dashboard/assets/EditSecretDialog-Bd7mFLS4.js +1 -0
  86. zenml/zen_server/dashboard/assets/{EmptyState-BMLnFVlB.js → EmptyState-BHblM39I.js} +1 -1
  87. zenml/zen_server/dashboard/assets/{Error-kLtljEOM.js → Error-C6LeJSER.js} +1 -1
  88. zenml/zen_server/dashboard/assets/{ExecutionStatus-DguLLgTK.js → ExecutionStatus-jH4OrWBq.js} +1 -1
  89. zenml/zen_server/dashboard/assets/{Helpbox-BXUMP21n.js → Helpbox-aAB2XP-z.js} +1 -1
  90. zenml/zen_server/dashboard/assets/{Infobox-DSt0O-dm.js → Infobox-BQ0aty32.js} +1 -1
  91. zenml/zen_server/dashboard/assets/{InlineAvatar-xsrsIGE-.js → InlineAvatar-DpTLgM3Q.js} +1 -1
  92. zenml/zen_server/dashboard/assets/Lock-CNyJvf2r.js +1 -0
  93. zenml/zen_server/dashboard/assets/{MarkdownVisualization-xp3hhULl.js → MarkdownVisualization-Bajxn0HY.js} +1 -1
  94. zenml/zen_server/dashboard/assets/NumberBox-BmKE0qnO.js +1 -0
  95. zenml/zen_server/dashboard/assets/{PasswordChecker-DUveqlva.js → PasswordChecker-yGGoJSB-.js} +1 -1
  96. zenml/zen_server/dashboard/assets/ProviderRadio-BBqkIuTd.js +1 -0
  97. zenml/zen_server/dashboard/assets/RadioItem-xLhXoiFV.js +1 -0
  98. zenml/zen_server/dashboard/assets/SearchField-C9R0mdaX.js +1 -0
  99. zenml/zen_server/dashboard/assets/{SetPassword-BXGTWiwj.js → SetPassword-52sNxNiO.js} +1 -1
  100. zenml/zen_server/dashboard/assets/{SuccessStep-DZC60t0x.js → SuccessStep-DlkItqYG.js} +1 -1
  101. zenml/zen_server/dashboard/assets/Tick-uxv80Q6a.js +1 -0
  102. zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-DGvwFWO1.js → UpdatePasswordSchemas-oN4G3sKz.js} +1 -1
  103. zenml/zen_server/dashboard/assets/{aws-BgKTfTfx.js → aws-0_3UsPif.js} +1 -1
  104. zenml/zen_server/dashboard/assets/{check-circle-i56092KI.js → check-circle-1_I207rW.js} +1 -1
  105. zenml/zen_server/dashboard/assets/chevron-down-BpaF8JqM.js +1 -0
  106. zenml/zen_server/dashboard/assets/{chevron-right-double-CZBOf6JM.js → chevron-right-double-Dk8e2L99.js} +1 -1
  107. zenml/zen_server/dashboard/assets/{cloud-only-C_yFCAkP.js → cloud-only-BkUuI0lZ.js} +1 -1
  108. zenml/zen_server/dashboard/assets/components-Br2ezRib.js +1 -0
  109. zenml/zen_server/dashboard/assets/{copy-BXNk6BjL.js → copy-f3XGPPxt.js} +1 -1
  110. zenml/zen_server/dashboard/assets/{database-1xWSgZfO.js → database-cXYNX9tt.js} +1 -1
  111. zenml/zen_server/dashboard/assets/{docker-CQMVm_4d.js → docker-8uj__HHK.js} +1 -1
  112. zenml/zen_server/dashboard/assets/dots-horizontal-sKQlWEni.js +1 -0
  113. zenml/zen_server/dashboard/assets/edit-C0MVvPD2.js +1 -0
  114. zenml/zen_server/dashboard/assets/{file-text-CqD_iu6l.js → file-text-B9JibxTs.js} +1 -1
  115. zenml/zen_server/dashboard/assets/{help-bu_DgLKI.js → help-FuHlZwn0.js} +1 -1
  116. zenml/zen_server/dashboard/assets/{index-rK_Wuy2W.js → index-Bd1xgUQG.js} +1 -1
  117. zenml/zen_server/dashboard/assets/index-DaGknux4.css +1 -0
  118. zenml/zen_server/dashboard/assets/{index-BczVOqUf.js → index-DhIZtpxB.js} +5 -5
  119. zenml/zen_server/dashboard/assets/index.esm-DT4uyn2i.js +1 -0
  120. zenml/zen_server/dashboard/assets/layout-D6oiSbfd.js +1 -0
  121. zenml/zen_server/dashboard/assets/{login-mutation-CrHrndTI.js → login-mutation-13A_JSVA.js} +1 -1
  122. zenml/zen_server/dashboard/assets/{logs-D8k8BVFf.js → logs-CgeE2vZP.js} +1 -1
  123. zenml/zen_server/dashboard/assets/{not-found-DYa4pC-C.js → not-found-B0Mmb90p.js} +1 -1
  124. zenml/zen_server/dashboard/assets/package-DdkziX79.js +1 -0
  125. zenml/zen_server/dashboard/assets/page-7-v2OBm-.js +1 -0
  126. zenml/zen_server/dashboard/assets/{page-MFQyIJd3.js → page-B3ozwdD1.js} +1 -1
  127. zenml/zen_server/dashboard/assets/{page-BkuQDIf-.js → page-BGwA9B1M.js} +1 -1
  128. zenml/zen_server/dashboard/assets/{page-1iL8aMqs.js → page-BkjAUyTA.js} +1 -1
  129. zenml/zen_server/dashboard/assets/page-BnacgBiy.js +1 -0
  130. zenml/zen_server/dashboard/assets/page-BxF_KMQ3.js +2 -0
  131. zenml/zen_server/dashboard/assets/page-C4POHC0K.js +1 -0
  132. zenml/zen_server/dashboard/assets/page-C9kudd44.js +9 -0
  133. zenml/zen_server/dashboard/assets/page-CA1j3GpJ.js +1 -0
  134. zenml/zen_server/dashboard/assets/page-CCY6yfmu.js +1 -0
  135. zenml/zen_server/dashboard/assets/page-CgTe7Bme.js +1 -0
  136. zenml/zen_server/dashboard/assets/{page-8a4UMKXZ.js → page-Cgn-6v2Y.js} +1 -1
  137. zenml/zen_server/dashboard/assets/page-CxQmQqDw.js +1 -0
  138. zenml/zen_server/dashboard/assets/page-D2Goey3H.js +1 -0
  139. zenml/zen_server/dashboard/assets/page-DLpOnf7u.js +1 -0
  140. zenml/zen_server/dashboard/assets/{page-BhgCDInH.js → page-DSTQnBk-.js} +1 -1
  141. zenml/zen_server/dashboard/assets/{page-1h_sD1jz.js → page-DTysUGOy.js} +1 -1
  142. zenml/zen_server/dashboard/assets/{page-2grKx_MY.js → page-D_EXUFJb.js} +1 -1
  143. zenml/zen_server/dashboard/assets/page-Db15QzsM.js +1 -0
  144. zenml/zen_server/dashboard/assets/{page-BDns21Iz.js → page-DugsjcQ_.js} +1 -1
  145. zenml/zen_server/dashboard/assets/{page-C6-UGEbH.js → page-OFKSPyN7.js} +1 -1
  146. zenml/zen_server/dashboard/assets/{page-BkeAAYwp.js → page-RnG-qhv9.js} +1 -1
  147. zenml/zen_server/dashboard/assets/{page-CCNRIt_f.js → page-T2BtjwPl.js} +1 -1
  148. zenml/zen_server/dashboard/assets/page-TXe1Eo3Z.js +1 -0
  149. zenml/zen_server/dashboard/assets/{page-BnaevhnB.js → page-YiF_fNbe.js} +1 -1
  150. zenml/zen_server/dashboard/assets/{page-uA5prJGY.js → page-hQaiQXfg.js} +1 -1
  151. zenml/zen_server/dashboard/assets/persist-3-5nOJ6m.js +1 -0
  152. zenml/zen_server/dashboard/assets/{play-circle-CNtZKDnW.js → play-circle-XSkLR12B.js} +1 -1
  153. zenml/zen_server/dashboard/assets/plus-FB9-lEq_.js +1 -0
  154. zenml/zen_server/dashboard/assets/refresh-COb6KYDi.js +1 -0
  155. zenml/zen_server/dashboard/assets/sharedSchema-BoYx_B_L.js +14 -0
  156. zenml/zen_server/dashboard/assets/{stack-detail-query-Cficsl6d.js → stack-detail-query-B-US_-wa.js} +1 -1
  157. zenml/zen_server/dashboard/assets/{terminal-By9cErXc.js → terminal-grtjrIEJ.js} +1 -1
  158. zenml/zen_server/dashboard/assets/trash-Cd5CSFqA.js +1 -0
  159. zenml/zen_server/dashboard/assets/{update-server-settings-mutation-7d8xi1tS.js → update-server-settings-mutation-B8GB_ubU.js} +1 -1
  160. zenml/zen_server/dashboard/assets/{url-D7mAQGUM.js → url-hcMJkz8p.js} +1 -1
  161. zenml/zen_server/dashboard/assets/{zod-BhoGpZ63.js → zod-CnykDKJj.js} +1 -1
  162. zenml/zen_server/dashboard/index.html +7 -7
  163. zenml/zen_server/dashboard_legacy/asset-manifest.json +4 -4
  164. zenml/zen_server/dashboard_legacy/index.html +1 -1
  165. zenml/zen_server/dashboard_legacy/{precache-manifest.12246c7548e71e2c4438e496360de80c.js → precache-manifest.9c473c96a43298343a7ce1256183123b.js} +4 -4
  166. zenml/zen_server/dashboard_legacy/service-worker.js +1 -1
  167. zenml/zen_server/dashboard_legacy/static/js/{main.3b27024b.chunk.js → main.463c90b9.chunk.js} +2 -2
  168. zenml/zen_server/dashboard_legacy/static/js/{main.3b27024b.chunk.js.map → main.463c90b9.chunk.js.map} +1 -1
  169. zenml/zen_server/deploy/helm/Chart.yaml +1 -1
  170. zenml/zen_server/deploy/helm/README.md +2 -2
  171. zenml/zen_server/rbac/models.py +1 -0
  172. zenml/zen_server/rbac/utils.py +4 -0
  173. zenml/zen_server/routers/pipeline_builds_endpoints.py +2 -66
  174. zenml/zen_server/routers/pipeline_deployments_endpoints.py +2 -53
  175. zenml/zen_server/routers/pipelines_endpoints.py +1 -74
  176. zenml/zen_server/routers/run_templates_endpoints.py +212 -0
  177. zenml/zen_server/routers/stack_deployment_endpoints.py +6 -0
  178. zenml/zen_server/routers/users_endpoints.py +0 -7
  179. zenml/zen_server/routers/workspaces_endpoints.py +79 -0
  180. zenml/zen_server/{pipeline_deployment → template_execution}/runner_entrypoint_configuration.py +1 -8
  181. zenml/zen_server/{pipeline_deployment → template_execution}/utils.py +214 -92
  182. zenml/zen_server/utils.py +77 -2
  183. zenml/zen_server/zen_server_api.py +54 -2
  184. zenml/zen_stores/base_zen_store.py +7 -1
  185. zenml/zen_stores/migrations/versions/0.63.0_release.py +23 -0
  186. zenml/zen_stores/migrations/versions/0.64.0_release.py +23 -0
  187. zenml/zen_stores/migrations/versions/026d4577b6a0_add_code_path.py +39 -0
  188. zenml/zen_stores/migrations/versions/3dcc5d20e82f_add_last_user_activity.py +51 -0
  189. zenml/zen_stores/migrations/versions/7d1919bb1ef0_add_run_templates.py +100 -0
  190. zenml/zen_stores/migrations/versions/909550c7c4da_remove_user_hub_token.py +36 -0
  191. zenml/zen_stores/migrations/versions/b59aa68fdb1f_simplify_pipelines.py +139 -0
  192. zenml/zen_stores/rest_zen_store.py +112 -39
  193. zenml/zen_stores/schemas/__init__.py +2 -0
  194. zenml/zen_stores/schemas/pipeline_build_schemas.py +3 -3
  195. zenml/zen_stores/schemas/pipeline_deployment_schemas.py +32 -2
  196. zenml/zen_stores/schemas/pipeline_run_schemas.py +29 -3
  197. zenml/zen_stores/schemas/pipeline_schemas.py +29 -30
  198. zenml/zen_stores/schemas/run_template_schemas.py +264 -0
  199. zenml/zen_stores/schemas/server_settings_schemas.py +2 -0
  200. zenml/zen_stores/schemas/step_run_schemas.py +11 -4
  201. zenml/zen_stores/schemas/user_schemas.py +0 -2
  202. zenml/zen_stores/sql_zen_store.py +389 -151
  203. zenml/zen_stores/template_utils.py +261 -0
  204. zenml/zen_stores/zen_store_interface.py +93 -20
  205. {zenml_nightly-0.62.0.dev20240729.dist-info → zenml_nightly-0.64.0.dev20240809.dist-info}/METADATA +3 -3
  206. {zenml_nightly-0.62.0.dev20240729.dist-info → zenml_nightly-0.64.0.dev20240809.dist-info}/RECORD +211 -184
  207. zenml/_hub/client.py +0 -289
  208. zenml/_hub/constants.py +0 -21
  209. zenml/_hub/utils.py +0 -79
  210. zenml/cli/hub.py +0 -1116
  211. zenml/models/v2/core/pipeline_namespace.py +0 -113
  212. zenml/models/v2/misc/hub_plugin_models.py +0 -79
  213. zenml/new/pipelines/deserialization_utils.py +0 -292
  214. zenml/zen_server/dashboard/assets/@radix-CFOkMR_E.js +0 -85
  215. zenml/zen_server/dashboard/assets/CollapsibleCard-opiuBHHc.js +0 -1
  216. zenml/zen_server/dashboard/assets/CopyButton-Cr7xYEPb.js +0 -2
  217. zenml/zen_server/dashboard/assets/DisplayDate-DYgIjlDF.js +0 -1
  218. zenml/zen_server/dashboard/assets/Pagination-C6X-mifw.js +0 -1
  219. zenml/zen_server/dashboard/assets/index-EpMIKgrI.css +0 -1
  220. zenml/zen_server/dashboard/assets/index.esm-Corw4lXQ.js +0 -1
  221. zenml/zen_server/dashboard/assets/package-B3fWP-Dh.js +0 -1
  222. zenml/zen_server/dashboard/assets/page-5NCOHOsy.js +0 -1
  223. zenml/zen_server/dashboard/assets/page-B6h3iaHJ.js +0 -1
  224. zenml/zen_server/dashboard/assets/page-Bi-wtWiO.js +0 -5
  225. zenml/zen_server/dashboard/assets/page-Bq0YxkLV.js +0 -1
  226. zenml/zen_server/dashboard/assets/page-Bs2F4eoD.js +0 -2
  227. zenml/zen_server/dashboard/assets/page-CHNxpz3n.js +0 -1
  228. zenml/zen_server/dashboard/assets/page-DgorQFqi.js +0 -1
  229. zenml/zen_server/dashboard/assets/page-K8ebxVIs.js +0 -1
  230. zenml/zen_server/dashboard/assets/page-TgCF0P_U.js +0 -1
  231. zenml/zen_server/dashboard/assets/page-ZnCEe-eK.js +0 -9
  232. zenml/zen_server/dashboard/assets/persist-D7HJNBWx.js +0 -1
  233. zenml/zen_server/dashboard/assets/plus-C8WOyCzt.js +0 -1
  234. zenml/zen_server/dashboard/assets/secrets-video-OBJ6irhH.svg +0 -21
  235. zenml/zen_server/dashboard/assets/stacks-video-7gfxpAq4.svg +0 -21
  236. /zenml/zen_server/{pipeline_deployment → template_execution}/__init__.py +0 -0
  237. /zenml/zen_server/{pipeline_deployment → template_execution}/workload_manager_interface.py +0 -0
  238. {zenml_nightly-0.62.0.dev20240729.dist-info → zenml_nightly-0.64.0.dev20240809.dist-info}/LICENSE +0 -0
  239. {zenml_nightly-0.62.0.dev20240729.dist-info → zenml_nightly-0.64.0.dev20240809.dist-info}/WHEEL +0 -0
  240. {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("build", help="Build Docker images for a pipeline.")
125
- @click.argument("pipeline_name_or_id")
126
- @click.option(
127
- "--version",
128
- "-v",
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
- pipeline_name_or_id: str,
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
- pipeline_name_or_id: Name or ID of the pipeline.
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
- pipeline_model = Client().get_pipeline(
184
- name_id_or_prefix=pipeline_name_or_id, version=version
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 = Pipeline.from_model(pipeline_model)
189
- build = pipeline_instance.build(config_path=config_path)
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("run", help="Run a pipeline.")
204
- @click.argument("pipeline_name_or_id")
205
- @click.option(
206
- "--version",
207
- "-v",
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
- pipeline_name_or_id: str,
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
- pipeline_name_or_id: Name or ID of the pipeline.
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
- pipeline_model = Client().get_pipeline(
274
- name_id_or_prefix=pipeline_name_or_id, version=version
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}{version_suffix}`? This will change all "
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("## Instructions\n" + deployment.instructions))
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.configuration:
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 {provider.upper()} in your browser.",
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