zenml-nightly 0.58.2.dev20240626__py3-none-any.whl → 0.62.0.dev20240726__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 (266) hide show
  1. README.md +31 -10
  2. RELEASE_NOTES.md +280 -0
  3. zenml/VERSION +1 -1
  4. zenml/__init__.py +2 -0
  5. zenml/analytics/enums.py +3 -0
  6. zenml/cli/__init__.py +28 -0
  7. zenml/cli/artifact.py +1 -2
  8. zenml/cli/integration.py +9 -8
  9. zenml/cli/server.py +6 -0
  10. zenml/cli/stack.py +812 -39
  11. zenml/cli/stack_components.py +9 -0
  12. zenml/cli/text_utils.py +35 -1
  13. zenml/cli/utils.py +127 -10
  14. zenml/client.py +23 -14
  15. zenml/config/docker_settings.py +8 -5
  16. zenml/constants.py +13 -1
  17. zenml/container_registries/base_container_registry.py +1 -0
  18. zenml/enums.py +23 -0
  19. zenml/event_hub/event_hub.py +5 -8
  20. zenml/integrations/__init__.py +1 -0
  21. zenml/integrations/aws/__init__.py +1 -0
  22. zenml/integrations/azure/__init__.py +3 -2
  23. zenml/integrations/constants.py +1 -0
  24. zenml/integrations/databricks/__init__.py +52 -0
  25. zenml/integrations/databricks/flavors/__init__.py +30 -0
  26. zenml/integrations/databricks/flavors/databricks_model_deployer_flavor.py +118 -0
  27. zenml/integrations/databricks/flavors/databricks_orchestrator_flavor.py +147 -0
  28. zenml/integrations/databricks/model_deployers/__init__.py +20 -0
  29. zenml/integrations/databricks/model_deployers/databricks_model_deployer.py +249 -0
  30. zenml/integrations/databricks/orchestrators/__init__.py +20 -0
  31. zenml/integrations/databricks/orchestrators/databricks_orchestrator.py +497 -0
  32. zenml/integrations/databricks/orchestrators/databricks_orchestrator_entrypoint_config.py +97 -0
  33. zenml/integrations/databricks/services/__init__.py +19 -0
  34. zenml/integrations/databricks/services/databricks_deployment.py +407 -0
  35. zenml/integrations/databricks/utils/__init__.py +14 -0
  36. zenml/integrations/databricks/utils/databricks_utils.py +87 -0
  37. zenml/integrations/deepchecks/__init__.py +1 -0
  38. zenml/integrations/discord/__init__.py +1 -0
  39. zenml/integrations/evidently/__init__.py +1 -0
  40. zenml/integrations/facets/__init__.py +1 -0
  41. zenml/integrations/feast/__init__.py +1 -0
  42. zenml/integrations/gcp/__init__.py +3 -1
  43. zenml/integrations/gcp/google_credentials_mixin.py +1 -1
  44. zenml/integrations/gcp/service_connectors/gcp_service_connector.py +320 -64
  45. zenml/integrations/great_expectations/data_validators/ge_data_validator.py +12 -8
  46. zenml/integrations/huggingface/__init__.py +1 -0
  47. zenml/integrations/huggingface/materializers/huggingface_datasets_materializer.py +88 -3
  48. zenml/integrations/huggingface/steps/accelerate_runner.py +1 -7
  49. zenml/integrations/integration.py +24 -0
  50. zenml/integrations/kubeflow/__init__.py +3 -0
  51. zenml/integrations/kubeflow/flavors/kubeflow_orchestrator_flavor.py +1 -1
  52. zenml/integrations/kubeflow/orchestrators/kubeflow_orchestrator.py +0 -1
  53. zenml/integrations/kubernetes/__init__.py +3 -1
  54. zenml/integrations/kubernetes/orchestrators/kube_utils.py +4 -1
  55. zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator.py +1 -13
  56. zenml/integrations/kubernetes/orchestrators/manifest_utils.py +22 -4
  57. zenml/integrations/kubernetes/pod_settings.py +4 -0
  58. zenml/integrations/label_studio/annotators/label_studio_annotator.py +1 -0
  59. zenml/integrations/langchain/__init__.py +1 -0
  60. zenml/integrations/lightgbm/__init__.py +1 -0
  61. zenml/integrations/mlflow/__init__.py +4 -2
  62. zenml/integrations/mlflow/model_registries/mlflow_model_registry.py +6 -2
  63. zenml/integrations/mlflow/services/mlflow_deployment.py +1 -1
  64. zenml/integrations/neural_prophet/__init__.py +1 -0
  65. zenml/integrations/polars/__init__.py +1 -0
  66. zenml/integrations/prodigy/__init__.py +1 -0
  67. zenml/integrations/pycaret/__init__.py +6 -0
  68. zenml/integrations/registry.py +37 -0
  69. zenml/integrations/s3/artifact_stores/s3_artifact_store.py +17 -6
  70. zenml/integrations/seldon/__init__.py +1 -0
  71. zenml/integrations/seldon/model_deployers/seldon_model_deployer.py +1 -0
  72. zenml/integrations/skypilot/flavors/skypilot_orchestrator_base_vm_config.py +2 -2
  73. zenml/integrations/skypilot/orchestrators/skypilot_base_vm_orchestrator.py +1 -1
  74. zenml/integrations/skypilot/orchestrators/skypilot_orchestrator_entrypoint.py +2 -2
  75. zenml/integrations/skypilot_aws/__init__.py +2 -1
  76. zenml/integrations/skypilot_azure/__init__.py +1 -3
  77. zenml/integrations/skypilot_gcp/__init__.py +1 -1
  78. zenml/integrations/skypilot_lambda/__init__.py +1 -1
  79. zenml/integrations/skypilot_lambda/flavors/skypilot_orchestrator_lambda_vm_flavor.py +1 -1
  80. zenml/integrations/slack/__init__.py +1 -0
  81. zenml/integrations/tekton/__init__.py +1 -0
  82. zenml/integrations/tensorboard/__init__.py +0 -1
  83. zenml/integrations/tensorflow/__init__.py +18 -6
  84. zenml/integrations/wandb/__init__.py +1 -0
  85. zenml/logging/step_logging.py +34 -35
  86. zenml/materializers/built_in_materializer.py +1 -1
  87. zenml/materializers/cloudpickle_materializer.py +1 -1
  88. zenml/model/model.py +1 -1
  89. zenml/models/__init__.py +11 -0
  90. zenml/models/v2/core/component.py +47 -0
  91. zenml/models/v2/core/model.py +1 -2
  92. zenml/models/v2/core/server_settings.py +0 -20
  93. zenml/models/v2/core/service_connector.py +17 -0
  94. zenml/models/v2/core/stack.py +31 -0
  95. zenml/models/v2/misc/full_stack.py +129 -0
  96. zenml/models/v2/misc/stack_deployment.py +91 -0
  97. zenml/new/pipelines/pipeline.py +1 -1
  98. zenml/new/pipelines/run_utils.py +1 -1
  99. zenml/orchestrators/__init__.py +4 -0
  100. zenml/orchestrators/input_utils.py +3 -6
  101. zenml/orchestrators/step_launcher.py +1 -0
  102. zenml/orchestrators/wheeled_orchestrator.py +147 -0
  103. zenml/service_connectors/service_connector_utils.py +408 -0
  104. zenml/stack/stack.py +3 -6
  105. zenml/stack_deployments/__init__.py +14 -0
  106. zenml/stack_deployments/aws_stack_deployment.py +254 -0
  107. zenml/stack_deployments/azure_stack_deployment.py +179 -0
  108. zenml/stack_deployments/gcp_stack_deployment.py +269 -0
  109. zenml/stack_deployments/stack_deployment.py +218 -0
  110. zenml/stack_deployments/utils.py +48 -0
  111. zenml/steps/base_step.py +7 -5
  112. zenml/utils/function_utils.py +2 -2
  113. zenml/utils/pagination_utils.py +7 -5
  114. zenml/utils/pipeline_docker_image_builder.py +105 -68
  115. zenml/utils/pydantic_utils.py +6 -5
  116. zenml/utils/source_utils.py +4 -1
  117. zenml/zen_server/cloud_utils.py +18 -3
  118. zenml/zen_server/dashboard/assets/{404-CDPQCl4D.js → 404-B_YdvmwS.js} +1 -1
  119. zenml/zen_server/dashboard/assets/@radix-CFOkMR_E.js +85 -0
  120. zenml/zen_server/dashboard/assets/{@react-router-DYovave8.js → @react-router-CO-OsFwI.js} +2 -2
  121. zenml/zen_server/dashboard/assets/{@reactflow-CHBapDaj.js → @reactflow-l_1hUr1S.js} +2 -2
  122. zenml/zen_server/dashboard/assets/@tanstack-DYiOyJUL.js +22 -0
  123. zenml/zen_server/dashboard/assets/AwarenessChannel-CFg5iX4Z.js +1 -0
  124. zenml/zen_server/dashboard/assets/{CodeSnippet-BidtnWOi.js → CodeSnippet-Dvkx_82E.js} +2 -2
  125. zenml/zen_server/dashboard/assets/CollapsibleCard-opiuBHHc.js +1 -0
  126. zenml/zen_server/dashboard/assets/Commands-DoN1xrEq.js +1 -0
  127. zenml/zen_server/dashboard/assets/CopyButton-Cr7xYEPb.js +2 -0
  128. zenml/zen_server/dashboard/assets/{CsvVizualization-BOuez-fG.js → CsvVizualization-Ck-nZ43m.js} +7 -7
  129. zenml/zen_server/dashboard/assets/DisplayDate-DYgIjlDF.js +1 -0
  130. zenml/zen_server/dashboard/assets/EmptyState-BMLnFVlB.js +1 -0
  131. zenml/zen_server/dashboard/assets/Error-kLtljEOM.js +1 -0
  132. zenml/zen_server/dashboard/assets/ExecutionStatus-DguLLgTK.js +1 -0
  133. zenml/zen_server/dashboard/assets/Helpbox-BXUMP21n.js +1 -0
  134. zenml/zen_server/dashboard/assets/Infobox-DSt0O-dm.js +1 -0
  135. zenml/zen_server/dashboard/assets/InlineAvatar-xsrsIGE-.js +1 -0
  136. zenml/zen_server/dashboard/assets/{MarkdownVisualization-DsB2QZiK.js → MarkdownVisualization-xp3hhULl.js} +2 -2
  137. zenml/zen_server/dashboard/assets/Pagination-C6X-mifw.js +1 -0
  138. zenml/zen_server/dashboard/assets/PasswordChecker-DUveqlva.js +1 -0
  139. zenml/zen_server/dashboard/assets/SetPassword-BXGTWiwj.js +1 -0
  140. zenml/zen_server/dashboard/assets/SuccessStep-DZC60t0x.js +1 -0
  141. zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-DnM-c11H.js → UpdatePasswordSchemas-DGvwFWO1.js} +1 -1
  142. zenml/zen_server/dashboard/assets/{aws-t0gKCj_R.js → aws-BgKTfTfx.js} +1 -1
  143. zenml/zen_server/dashboard/assets/{check-circle-BVvhm5dy.js → check-circle-i56092KI.js} +1 -1
  144. zenml/zen_server/dashboard/assets/{chevron-right-double-CJ50E9Gr.js → chevron-right-double-CZBOf6JM.js} +1 -1
  145. zenml/zen_server/dashboard/assets/cloud-only-C_yFCAkP.js +1 -0
  146. zenml/zen_server/dashboard/assets/{copy-BRhQz3j-.js → copy-BXNk6BjL.js} +1 -1
  147. zenml/zen_server/dashboard/assets/{database-CRRnyFWh.js → database-1xWSgZfO.js} +1 -1
  148. zenml/zen_server/dashboard/assets/{docker-BAonhm6G.js → docker-CQMVm_4d.js} +1 -1
  149. zenml/zen_server/dashboard/assets/{file-text-CbVERUON.js → file-text-CqD_iu6l.js} +1 -1
  150. zenml/zen_server/dashboard/assets/{help-B8rqCvqn.js → help-bu_DgLKI.js} +1 -1
  151. zenml/zen_server/dashboard/assets/index-BczVOqUf.js +55 -0
  152. zenml/zen_server/dashboard/assets/index-EpMIKgrI.css +1 -0
  153. zenml/zen_server/dashboard/assets/index-rK_Wuy2W.js +1 -0
  154. zenml/zen_server/dashboard/assets/index.esm-Corw4lXQ.js +1 -0
  155. zenml/zen_server/dashboard/assets/{login-mutation-wzzl23C6.js → login-mutation-CrHrndTI.js} +1 -1
  156. zenml/zen_server/dashboard/assets/logs-D8k8BVFf.js +1 -0
  157. zenml/zen_server/dashboard/assets/not-found-DYa4pC-C.js +1 -0
  158. zenml/zen_server/dashboard/assets/package-B3fWP-Dh.js +1 -0
  159. zenml/zen_server/dashboard/assets/page-1h_sD1jz.js +1 -0
  160. zenml/zen_server/dashboard/assets/{page-yN4rZ-ZS.js → page-1iL8aMqs.js} +1 -1
  161. zenml/zen_server/dashboard/assets/{page-Bi5AI0S7.js → page-2grKx_MY.js} +1 -1
  162. zenml/zen_server/dashboard/assets/page-5NCOHOsy.js +1 -0
  163. zenml/zen_server/dashboard/assets/page-8a4UMKXZ.js +1 -0
  164. zenml/zen_server/dashboard/assets/{page-AQKopn_4.js → page-B6h3iaHJ.js} +1 -1
  165. zenml/zen_server/dashboard/assets/page-BDns21Iz.js +1 -0
  166. zenml/zen_server/dashboard/assets/{page-BmkSiYeQ.js → page-BhgCDInH.js} +2 -2
  167. zenml/zen_server/dashboard/assets/{page-BzVZGExK.js → page-Bi-wtWiO.js} +2 -2
  168. zenml/zen_server/dashboard/assets/page-BkeAAYwp.js +1 -0
  169. zenml/zen_server/dashboard/assets/page-BkuQDIf-.js +1 -0
  170. zenml/zen_server/dashboard/assets/page-BnaevhnB.js +1 -0
  171. zenml/zen_server/dashboard/assets/page-Bq0YxkLV.js +1 -0
  172. zenml/zen_server/dashboard/assets/page-Bs2F4eoD.js +2 -0
  173. zenml/zen_server/dashboard/assets/page-C6-UGEbH.js +1 -0
  174. zenml/zen_server/dashboard/assets/page-CCNRIt_f.js +1 -0
  175. zenml/zen_server/dashboard/assets/page-CHNxpz3n.js +1 -0
  176. zenml/zen_server/dashboard/assets/page-DgorQFqi.js +1 -0
  177. zenml/zen_server/dashboard/assets/page-K8ebxVIs.js +1 -0
  178. zenml/zen_server/dashboard/assets/{page-CuT1SUik.js → page-MFQyIJd3.js} +1 -1
  179. zenml/zen_server/dashboard/assets/page-TgCF0P_U.js +1 -0
  180. zenml/zen_server/dashboard/assets/page-ZnCEe-eK.js +9 -0
  181. zenml/zen_server/dashboard/assets/{page-BW6Ket3a.js → page-uA5prJGY.js} +1 -1
  182. zenml/zen_server/dashboard/assets/persist-D7HJNBWx.js +1 -0
  183. zenml/zen_server/dashboard/assets/{play-circle-DK5QMJyp.js → play-circle-CNtZKDnW.js} +1 -1
  184. zenml/zen_server/dashboard/assets/plus-C8WOyCzt.js +1 -0
  185. zenml/zen_server/dashboard/assets/stack-detail-query-Cficsl6d.js +1 -0
  186. zenml/zen_server/dashboard/assets/{terminal-B2ovgWuz.js → terminal-By9cErXc.js} +1 -1
  187. zenml/zen_server/dashboard/assets/update-server-settings-mutation-7d8xi1tS.js +1 -0
  188. zenml/zen_server/dashboard/assets/{url-6_xv0WJS.js → url-D7mAQGUM.js} +1 -1
  189. zenml/zen_server/dashboard/assets/{zod-DrZvVLjd.js → zod-BhoGpZ63.js} +1 -1
  190. zenml/zen_server/dashboard/index.html +7 -7
  191. zenml/zen_server/dashboard_legacy/asset-manifest.json +4 -4
  192. zenml/zen_server/dashboard_legacy/index.html +1 -1
  193. zenml/zen_server/dashboard_legacy/{precache-manifest.f4abc5b7cfa7d90c1caf5521918e29a8.js → precache-manifest.12246c7548e71e2c4438e496360de80c.js} +4 -4
  194. zenml/zen_server/dashboard_legacy/service-worker.js +1 -1
  195. zenml/zen_server/dashboard_legacy/static/js/main.3b27024b.chunk.js +2 -0
  196. zenml/zen_server/dashboard_legacy/static/js/{main.ac2f17d0.chunk.js.map → main.3b27024b.chunk.js.map} +1 -1
  197. zenml/zen_server/deploy/helm/Chart.yaml +1 -1
  198. zenml/zen_server/deploy/helm/README.md +2 -2
  199. zenml/zen_server/feature_gate/zenml_cloud_feature_gate.py +11 -5
  200. zenml/zen_server/pipeline_deployment/utils.py +57 -44
  201. zenml/zen_server/rbac/utils.py +10 -2
  202. zenml/zen_server/rbac/zenml_cloud_rbac.py +11 -5
  203. zenml/zen_server/routers/devices_endpoints.py +4 -1
  204. zenml/zen_server/routers/server_endpoints.py +29 -2
  205. zenml/zen_server/routers/service_connectors_endpoints.py +57 -0
  206. zenml/zen_server/routers/stack_deployment_endpoints.py +158 -0
  207. zenml/zen_server/routers/steps_endpoints.py +2 -1
  208. zenml/zen_server/routers/workspaces_endpoints.py +64 -0
  209. zenml/zen_server/zen_server_api.py +2 -0
  210. zenml/zen_stores/migrations/utils.py +1 -1
  211. zenml/zen_stores/migrations/versions/0.60.0_release.py +23 -0
  212. zenml/zen_stores/migrations/versions/0.61.0_release.py +23 -0
  213. zenml/zen_stores/migrations/versions/0.62.0_release.py +23 -0
  214. zenml/zen_stores/migrations/versions/0d707865f404_adding_labels_to_stacks.py +30 -0
  215. zenml/zen_stores/migrations/versions/b4fca5241eea_migrate_onboarding_state.py +167 -0
  216. zenml/zen_stores/rest_zen_store.py +149 -4
  217. zenml/zen_stores/schemas/component_schemas.py +14 -0
  218. zenml/zen_stores/schemas/server_settings_schemas.py +23 -11
  219. zenml/zen_stores/schemas/stack_schemas.py +10 -0
  220. zenml/zen_stores/schemas/step_run_schemas.py +27 -11
  221. zenml/zen_stores/sql_zen_store.py +450 -6
  222. zenml/zen_stores/zen_store_interface.py +80 -0
  223. {zenml_nightly-0.58.2.dev20240626.dist-info → zenml_nightly-0.62.0.dev20240726.dist-info}/METADATA +35 -13
  224. {zenml_nightly-0.58.2.dev20240626.dist-info → zenml_nightly-0.62.0.dev20240726.dist-info}/RECORD +227 -191
  225. zenml/zen_server/dashboard/assets/@radix-C9DBgJhe.js +0 -77
  226. zenml/zen_server/dashboard/assets/@tanstack-CEbkxrhX.js +0 -30
  227. zenml/zen_server/dashboard/assets/AwarenessChannel-nXGpmj_f.js +0 -1
  228. zenml/zen_server/dashboard/assets/Cards-nwsvQLVS.js +0 -1
  229. zenml/zen_server/dashboard/assets/Commands-DuIWKg_Q.js +0 -1
  230. zenml/zen_server/dashboard/assets/CopyButton-B_YSm-Ds.js +0 -2
  231. zenml/zen_server/dashboard/assets/DisplayDate-BdguISQF.js +0 -1
  232. zenml/zen_server/dashboard/assets/EmptyState-BkooiGtL.js +0 -1
  233. zenml/zen_server/dashboard/assets/Error-B6M0dPph.js +0 -1
  234. zenml/zen_server/dashboard/assets/Helpbox-BQoqCm04.js +0 -1
  235. zenml/zen_server/dashboard/assets/Infobox-Ce9mefqU.js +0 -1
  236. zenml/zen_server/dashboard/assets/InlineAvatar-DGf3dVhV.js +0 -1
  237. zenml/zen_server/dashboard/assets/PageHeader-DGaemzjc.js +0 -1
  238. zenml/zen_server/dashboard/assets/Pagination-DVYfBCCc.js +0 -1
  239. zenml/zen_server/dashboard/assets/PasswordChecker-DSLBp7Vl.js +0 -1
  240. zenml/zen_server/dashboard/assets/SetPassword-B5s7DJug.js +0 -1
  241. zenml/zen_server/dashboard/assets/SuccessStep-ZzczaM7g.js +0 -1
  242. zenml/zen_server/dashboard/assets/chevron-down-zcvCWmyP.js +0 -1
  243. zenml/zen_server/dashboard/assets/cloud-only-Ba_ShBR5.js +0 -1
  244. zenml/zen_server/dashboard/assets/index-CWJ3xbIf.css +0 -1
  245. zenml/zen_server/dashboard/assets/index-QORVVTMN.js +0 -55
  246. zenml/zen_server/dashboard/assets/index.esm-F7nqy9zY.js +0 -1
  247. zenml/zen_server/dashboard/assets/not-found-Dh2la7kh.js +0 -1
  248. zenml/zen_server/dashboard/assets/page-B-5jAKoO.js +0 -1
  249. zenml/zen_server/dashboard/assets/page-B-vWk8a6.js +0 -1
  250. zenml/zen_server/dashboard/assets/page-B0BrqfS8.js +0 -1
  251. zenml/zen_server/dashboard/assets/page-BQxVFlUl.js +0 -1
  252. zenml/zen_server/dashboard/assets/page-ByrHy6Ss.js +0 -1
  253. zenml/zen_server/dashboard/assets/page-CPtY4Kv_.js +0 -1
  254. zenml/zen_server/dashboard/assets/page-CmmukLsl.js +0 -1
  255. zenml/zen_server/dashboard/assets/page-D2D-7qyr.js +0 -9
  256. zenml/zen_server/dashboard/assets/page-DAQQyLxT.js +0 -1
  257. zenml/zen_server/dashboard/assets/page-DHkUMl_E.js +0 -1
  258. zenml/zen_server/dashboard/assets/page-DZCbwOEs.js +0 -2
  259. zenml/zen_server/dashboard/assets/page-DdaIt20-.js +0 -1
  260. zenml/zen_server/dashboard/assets/page-LqLs24Ot.js +0 -1
  261. zenml/zen_server/dashboard/assets/page-lebv0c7C.js +0 -1
  262. zenml/zen_server/dashboard/assets/update-server-settings-mutation-0Wgz8pUE.js +0 -1
  263. zenml/zen_server/dashboard_legacy/static/js/main.ac2f17d0.chunk.js +0 -2
  264. {zenml_nightly-0.58.2.dev20240626.dist-info → zenml_nightly-0.62.0.dev20240726.dist-info}/LICENSE +0 -0
  265. {zenml_nightly-0.58.2.dev20240626.dist-info → zenml_nightly-0.62.0.dev20240726.dist-info}/WHEEL +0 -0
  266. {zenml_nightly-0.58.2.dev20240626.dist-info → zenml_nightly-0.62.0.dev20240726.dist-info}/entry_points.txt +0 -0
@@ -136,9 +136,18 @@ def generate_stack_component_describe_command(
136
136
  if active_components:
137
137
  active_component_id = active_components[0].id
138
138
 
139
+ if component_.connector:
140
+ # We also need the flavor to get the connector requirements
141
+ connector_requirements = client.get_flavor_by_name_and_type(
142
+ name=component_.flavor, component_type=component_type
143
+ ).connector_requirements
144
+ else:
145
+ connector_requirements = None
146
+
139
147
  cli_utils.print_stack_component_configuration(
140
148
  component=component_,
141
149
  active_status=component_.id == active_component_id,
150
+ connector_requirements=connector_requirements,
142
151
  )
143
152
 
144
153
  print_model_url(get_component_url(component_))
zenml/cli/text_utils.py CHANGED
@@ -15,7 +15,9 @@
15
15
 
16
16
  from typing import List
17
17
 
18
- from rich.markdown import Markdown
18
+ from rich.console import Console, ConsoleOptions, RenderResult
19
+ from rich.markdown import Heading, Markdown
20
+ from rich.text import Text
19
21
 
20
22
  zenml_cli_welcome_message = Markdown(
21
23
  """
@@ -82,3 +84,35 @@ links below.\n
82
84
 
83
85
  """
84
86
  )
87
+
88
+
89
+ class OldSchoolMarkdownHeading(Heading):
90
+ """A traditional markdown heading."""
91
+
92
+ def __rich_console__(
93
+ self, console: Console, options: ConsoleOptions
94
+ ) -> RenderResult:
95
+ """Render the heading.
96
+
97
+ Args:
98
+ console: The console rendering the content.
99
+ options: The console options.
100
+
101
+ Yields:
102
+ RenderResult: The rendered content.
103
+ """
104
+ text = self.text
105
+ text.justify = "left"
106
+ if self.tag == "h1":
107
+ # Underline and bold h1s
108
+ yield Text("", style="bold")
109
+ yield text
110
+ yield "=" * len(text)
111
+ else:
112
+ if self.tag == "h2":
113
+ # Just underline h2s
114
+ yield Text("", style="underline")
115
+ else:
116
+ # Just bold everything else
117
+ yield Text("", style="bold")
118
+ yield text
zenml/cli/utils.py CHANGED
@@ -17,6 +17,7 @@ import contextlib
17
17
  import datetime
18
18
  import json
19
19
  import os
20
+ import platform
20
21
  import re
21
22
  import subprocess
22
23
  import sys
@@ -43,11 +44,13 @@ import pkg_resources
43
44
  import yaml
44
45
  from pydantic import BaseModel, SecretStr
45
46
  from rich import box, table
47
+ from rich.console import Console
46
48
  from rich.emoji import Emoji, NoEmoji
47
49
  from rich.markdown import Markdown
48
50
  from rich.markup import escape
49
- from rich.prompt import Confirm
51
+ from rich.prompt import Confirm, Prompt
50
52
  from rich.style import Style
53
+ from rich.table import Table
51
54
 
52
55
  from zenml.client import Client
53
56
  from zenml.console import console, zenml_style_defaults
@@ -69,6 +72,7 @@ from zenml.models import (
69
72
  BoolFilter,
70
73
  NumericFilter,
71
74
  Page,
75
+ ServiceConnectorRequirements,
72
76
  StrFilter,
73
77
  UUIDFilter,
74
78
  )
@@ -582,6 +586,23 @@ def print_stack_configuration(stack: "StackResponse", active: bool) -> None:
582
586
  for component in rich_table.columns[0]._cells
583
587
  ]
584
588
  console.print(rich_table)
589
+
590
+ if not stack.labels:
591
+ declare("No labels are set for this stack.")
592
+ else:
593
+ rich_table = table.Table(
594
+ box=box.HEAVY_EDGE,
595
+ title="Labels",
596
+ show_lines=True,
597
+ )
598
+ rich_table.add_column("LABEL")
599
+ rich_table.add_column("VALUE", overflow="fold")
600
+
601
+ for label, value in stack.labels.items():
602
+ rich_table.add_row(label, str(value))
603
+
604
+ console.print(rich_table)
605
+
585
606
  declare(
586
607
  f"Stack '{stack.name}' with id '{stack.id}' is "
587
608
  f"{f'owned by user {stack.user.name}.' if stack.user else 'unowned.'}"
@@ -613,13 +634,18 @@ def print_flavor_list(flavors: Page["FlavorResponse"]) -> None:
613
634
 
614
635
 
615
636
  def print_stack_component_configuration(
616
- component: "ComponentResponse", active_status: bool
637
+ component: "ComponentResponse",
638
+ active_status: bool,
639
+ connector_requirements: Optional[ServiceConnectorRequirements] = None,
617
640
  ) -> None:
618
641
  """Prints the configuration options of a stack component.
619
642
 
620
643
  Args:
621
644
  component: The stack component to print.
622
645
  active_status: Whether the stack component is active.
646
+ connector_requirements: Connector requirements for the component, taken
647
+ from the component flavor. Only needed if the component has a
648
+ connector.
623
649
  """
624
650
  if component.user:
625
651
  user_name = component.user.name
@@ -675,7 +701,7 @@ def print_stack_component_configuration(
675
701
  rich_table.add_column("VALUE", overflow="fold")
676
702
 
677
703
  for label, value in component.labels.items():
678
- rich_table.add_row(label, value)
704
+ rich_table.add_row(label, str(value))
679
705
 
680
706
  console.print(rich_table)
681
707
 
@@ -690,11 +716,17 @@ def print_stack_component_configuration(
690
716
  rich_table.add_column("PROPERTY")
691
717
  rich_table.add_column("VALUE", overflow="fold")
692
718
 
719
+ resource_type = (
720
+ connector_requirements.resource_type
721
+ if connector_requirements
722
+ else component.connector.resource_types[0]
723
+ )
724
+
693
725
  connector_dict = {
694
726
  "ID": str(component.connector.id),
695
727
  "NAME": component.connector.name,
696
728
  "TYPE": component.connector.type,
697
- "RESOURCE TYPE": component.connector.resource_types[0],
729
+ "RESOURCE TYPE": resource_type,
698
730
  "RESOURCE NAME": component.connector_resource_id
699
731
  or component.connector.resource_id
700
732
  or "N/A",
@@ -1276,9 +1308,11 @@ def pretty_print_model_version_table(
1276
1308
  "NAME": model_version.registered_model.name,
1277
1309
  "MODEL_VERSION": model_version.version,
1278
1310
  "VERSION_DESCRIPTION": model_version.description,
1279
- "METADATA": model_version.metadata.model_dump()
1280
- if model_version.metadata
1281
- else {},
1311
+ "METADATA": (
1312
+ model_version.metadata.model_dump()
1313
+ if model_version.metadata
1314
+ else {}
1315
+ ),
1282
1316
  }
1283
1317
  for model_version in model_versions
1284
1318
  ]
@@ -1318,9 +1352,11 @@ def pretty_print_model_version_details(
1318
1352
  if model_version.last_updated_at
1319
1353
  else "N/A"
1320
1354
  ),
1321
- "METADATA": model_version.metadata.model_dump()
1322
- if model_version.metadata
1323
- else {},
1355
+ "METADATA": (
1356
+ model_version.metadata.model_dump()
1357
+ if model_version.metadata
1358
+ else {}
1359
+ ),
1324
1360
  "MODEL_SOURCE_URI": model_version.model_source_uri,
1325
1361
  "STAGE": model_version.stage.value,
1326
1362
  }
@@ -2748,3 +2784,84 @@ def is_jupyter_installed() -> bool:
2748
2784
  return True
2749
2785
  except pkg_resources.DistributionNotFound:
2750
2786
  return False
2787
+
2788
+
2789
+ def multi_choice_prompt(
2790
+ object_type: str,
2791
+ choices: List[List[Any]],
2792
+ headers: List[str],
2793
+ prompt_text: str,
2794
+ allow_zero_be_a_new_object: bool = False,
2795
+ default_choice: Optional[str] = None,
2796
+ ) -> Optional[int]:
2797
+ """Prompts the user to select a choice from a list of choices.
2798
+
2799
+ Args:
2800
+ object_type: The type of the object
2801
+ choices: The list of choices
2802
+ prompt_text: The prompt text
2803
+ headers: The list of headers.
2804
+ allow_zero_be_a_new_object: Whether to allow zero as a new object
2805
+ default_choice: The default choice
2806
+
2807
+ Returns:
2808
+ The selected choice index or None for new object
2809
+
2810
+ Raises:
2811
+ RuntimeError: If no choice is made.
2812
+ """
2813
+ table = Table(
2814
+ title=f"Available {object_type}",
2815
+ show_header=True,
2816
+ border_style=None,
2817
+ expand=True,
2818
+ show_lines=True,
2819
+ )
2820
+ table.add_column("Choice", justify="left", width=1)
2821
+ for h in headers:
2822
+ table.add_column(
2823
+ h.replace("_", " ").capitalize(), justify="left", width=10
2824
+ )
2825
+
2826
+ i_shift = 0
2827
+ if allow_zero_be_a_new_object:
2828
+ i_shift = 1
2829
+ table.add_row(
2830
+ "[0]",
2831
+ *([f"Create a new {object_type}"] * len(headers)),
2832
+ )
2833
+ for i, one_choice in enumerate(choices):
2834
+ table.add_row(f"[{i+i_shift}]", *[str(x) for x in one_choice])
2835
+ Console().print(table)
2836
+
2837
+ selected = Prompt.ask(
2838
+ prompt_text,
2839
+ choices=[str(i) for i in range(0, len(choices) + 1)],
2840
+ default=default_choice,
2841
+ show_choices=False,
2842
+ )
2843
+ if selected is None:
2844
+ raise RuntimeError(f"No {object_type} was selected")
2845
+
2846
+ if selected == "0" and allow_zero_be_a_new_object:
2847
+ return None
2848
+ else:
2849
+ return int(selected) - i_shift
2850
+
2851
+
2852
+ def requires_mac_env_var_warning() -> bool:
2853
+ """Checks if a warning needs to be shown for a local Mac server.
2854
+
2855
+ This is for the case where a user is on a macOS system, trying to run a
2856
+ local server but is missing the `OBJC_DISABLE_INITIALIZE_FORK_SAFETY`
2857
+ environment variable.
2858
+
2859
+ Returns:
2860
+ bool: True if a warning needs to be shown, False otherwise.
2861
+ """
2862
+ if sys.platform == "darwin":
2863
+ mac_version_tuple = tuple(map(int, platform.release().split(".")[:2]))
2864
+ return not os.getenv(
2865
+ "OBJC_DISABLE_INITIALIZE_FORK_SAFETY"
2866
+ ) and mac_version_tuple >= (10, 13)
2867
+ return False
zenml/client.py CHANGED
@@ -19,7 +19,6 @@ import os
19
19
  from abc import ABCMeta
20
20
  from collections import Counter
21
21
  from datetime import datetime
22
- from functools import partial
23
22
  from pathlib import Path
24
23
  from typing import (
25
24
  TYPE_CHECKING,
@@ -1153,6 +1152,7 @@ class Client(metaclass=ClientMetaClass):
1153
1152
  name: str,
1154
1153
  components: Mapping[StackComponentType, Union[str, UUID]],
1155
1154
  stack_spec_file: Optional[str] = None,
1155
+ labels: Optional[Dict[str, Any]] = None,
1156
1156
  ) -> StackResponse:
1157
1157
  """Registers a stack and its components.
1158
1158
 
@@ -1160,6 +1160,7 @@ class Client(metaclass=ClientMetaClass):
1160
1160
  name: The name of the stack to register.
1161
1161
  components: dictionary which maps component types to component names
1162
1162
  stack_spec_file: path to the stack spec file
1163
+ labels: The labels of the stack.
1163
1164
 
1164
1165
  Returns:
1165
1166
  The model of the registered stack.
@@ -1184,6 +1185,7 @@ class Client(metaclass=ClientMetaClass):
1184
1185
  stack_spec_path=stack_spec_file,
1185
1186
  workspace=self.active_workspace.id,
1186
1187
  user=self.active_user.id,
1188
+ labels=labels,
1187
1189
  )
1188
1190
 
1189
1191
  self._validate_stack_configuration(stack=stack)
@@ -1227,8 +1229,8 @@ class Client(metaclass=ClientMetaClass):
1227
1229
  size: int = PAGE_SIZE_DEFAULT,
1228
1230
  logical_operator: LogicalOperators = LogicalOperators.AND,
1229
1231
  id: Optional[Union[UUID, str]] = None,
1230
- created: Optional[datetime] = None,
1231
- updated: Optional[datetime] = None,
1232
+ created: Optional[Union[datetime, str]] = None,
1233
+ updated: Optional[Union[datetime, str]] = None,
1232
1234
  name: Optional[str] = None,
1233
1235
  description: Optional[str] = None,
1234
1236
  workspace_id: Optional[Union[str, UUID]] = None,
@@ -1279,6 +1281,7 @@ class Client(metaclass=ClientMetaClass):
1279
1281
  name_id_or_prefix: Optional[Union[UUID, str]] = None,
1280
1282
  name: Optional[str] = None,
1281
1283
  stack_spec_file: Optional[str] = None,
1284
+ labels: Optional[Dict[str, Any]] = None,
1282
1285
  description: Optional[str] = None,
1283
1286
  component_updates: Optional[
1284
1287
  Dict[StackComponentType, List[Union[UUID, str]]]
@@ -1289,7 +1292,8 @@ class Client(metaclass=ClientMetaClass):
1289
1292
  Args:
1290
1293
  name_id_or_prefix: The name, id or prefix of the stack to update.
1291
1294
  name: the new name of the stack.
1292
- stack_spec_file: path to the stack spec file
1295
+ stack_spec_file: path to the stack spec file.
1296
+ labels: The new labels of the stack component.
1293
1297
  description: the new description of the stack.
1294
1298
  component_updates: dictionary which maps stack component types to
1295
1299
  lists of new stack component names or ids.
@@ -1343,6 +1347,15 @@ class Client(metaclass=ClientMetaClass):
1343
1347
  for c_type, c_list in components_dict.items()
1344
1348
  }
1345
1349
 
1350
+ if labels is not None:
1351
+ existing_labels = stack.labels or {}
1352
+ existing_labels.update(labels)
1353
+
1354
+ existing_labels = {
1355
+ k: v for k, v in existing_labels.items() if v is not None
1356
+ }
1357
+ update_model.labels = existing_labels
1358
+
1346
1359
  updated_stack = self.zen_store.update_stack(
1347
1360
  stack_id=stack.id,
1348
1361
  stack_update=update_model,
@@ -2439,9 +2452,7 @@ class Client(metaclass=ClientMetaClass):
2439
2452
  )
2440
2453
 
2441
2454
  for pipeline in depaginate(
2442
- functools.partial(
2443
- Client().list_pipelines, name=name_id_or_prefix
2444
- )
2455
+ Client().list_pipelines, name=name_id_or_prefix
2445
2456
  ):
2446
2457
  Client().delete_pipeline(pipeline.id)
2447
2458
  else:
@@ -2579,11 +2590,9 @@ class Client(metaclass=ClientMetaClass):
2579
2590
  )
2580
2591
 
2581
2592
  builds = depaginate(
2582
- partial(
2583
- self.list_builds,
2584
- pipeline_id=pipeline.id,
2585
- stack_id=stack.id if stack else None,
2586
- )
2593
+ self.list_builds,
2594
+ pipeline_id=pipeline.id,
2595
+ stack_id=stack.id if stack else None,
2587
2596
  )
2588
2597
 
2589
2598
  for build in builds:
@@ -3942,7 +3951,7 @@ class Client(metaclass=ClientMetaClass):
3942
3951
  """
3943
3952
  if delete_from_artifact_store:
3944
3953
  unused_artifact_versions = depaginate(
3945
- partial(self.list_artifact_versions, only_unused=True)
3954
+ self.list_artifact_versions, only_unused=True
3946
3955
  )
3947
3956
  for unused_artifact_version in unused_artifact_versions:
3948
3957
  self._delete_artifact_from_artifact_store(
@@ -4151,7 +4160,7 @@ class Client(metaclass=ClientMetaClass):
4151
4160
  ValueError: If the artifact version is still used in any runs.
4152
4161
  """
4153
4162
  if artifact_version not in depaginate(
4154
- partial(self.list_artifact_versions, only_unused=True)
4163
+ self.list_artifact_versions, only_unused=True
4155
4164
  ):
4156
4165
  raise ValueError(
4157
4166
  "The metadata of artifact versions that are used in runs "
@@ -102,10 +102,11 @@ class DockerSettings(BaseSettings):
102
102
  Depending on the configuration of this object, requirements will be
103
103
  installed in the following order (each step optional):
104
104
  - The packages installed in your local python environment
105
- - The packages specified via the `requirements` attribute
106
- - The packages specified via the `required_integrations` and potentially
107
- stack requirements
108
105
  - The packages specified via the `required_hub_plugins` attribute
106
+ - The packages required by the stack unless this is disabled by setting
107
+ `install_stack_requirements=False`.
108
+ - The packages specified via the `required_integrations`
109
+ - The packages specified via the `requirements` attribute
109
110
 
110
111
  Attributes:
111
112
  parent_image: Full name of the Docker image that should be
@@ -141,7 +142,9 @@ class DockerSettings(BaseSettings):
141
142
  target_repository: Name of the Docker repository to which the
142
143
  image should be pushed. This repository will be appended to the
143
144
  registry URI of the container registry of your stack and should
144
- therefore **not** include any registry.
145
+ therefore **not** include any registry. If not specified, the
146
+ default repository name configured in the container registry
147
+ stack component settings will be used.
145
148
  python_package_installer: The package installer to use for python
146
149
  packages.
147
150
  python_package_installer_args: Arguments to pass to the python package
@@ -200,7 +203,7 @@ class DockerSettings(BaseSettings):
200
203
  build_options: Dict[str, Any] = {}
201
204
  parent_image_build_config: Optional[DockerBuildConfig] = None
202
205
  skip_build: bool = False
203
- target_repository: str = "zenml"
206
+ target_repository: Optional[str] = None
204
207
  python_package_installer: PythonPackageInstaller = (
205
208
  PythonPackageInstaller.PIP
206
209
  )
zenml/constants.py CHANGED
@@ -173,6 +173,7 @@ ENV_ZENML_PIPELINE_API_TOKEN_EXPIRES_MINUTES = (
173
173
  "ZENML_PIPELINE_API_TOKEN_EXPIRES_MINUTES"
174
174
  )
175
175
  ENV_ZENML_IGNORE_FAILURE_HOOK = "ZENML_IGNORE_FAILURE_HOOK"
176
+ ENV_ZENML_CUSTOM_SOURCE_ROOT = "ZENML_CUSTOM_SOURCE_ROOT"
176
177
 
177
178
  # ZenML Server environment variables
178
179
  ENV_ZENML_SERVER_PREFIX = "ZENML_SERVER_"
@@ -263,6 +264,7 @@ DEFAULT_ZENML_SERVER_MAX_DEVICE_AUTH_ATTEMPTS = 3
263
264
  DEFAULT_ZENML_SERVER_DEVICE_AUTH_TIMEOUT = 60 * 5 # 5 minutes
264
265
  DEFAULT_ZENML_SERVER_DEVICE_AUTH_POLLING = 5 # seconds
265
266
  DEFAULT_HTTP_TIMEOUT = 30
267
+ SERVICE_CONNECTOR_VERIFY_REQUEST_TIMEOUT = 120 # seconds
266
268
  ZENML_API_KEY_PREFIX = "ZENKEY_"
267
269
  DEFAULT_ZENML_SERVER_PIPELINE_RUN_AUTH_WINDOW = 60 * 48 # 48 hours
268
270
  DEFAULT_ZENML_SERVER_LOGIN_RATE_LIMIT_MINUTE = 5
@@ -337,6 +339,7 @@ ARTIFACT_VISUALIZATIONS = "/artifact_visualizations"
337
339
  CODE_REFERENCES = "/code_references"
338
340
  CODE_REPOSITORIES = "/code_repositories"
339
341
  COMPONENT_TYPES = "/component-types"
342
+ CONFIG = "/config"
340
343
  CURRENT_USER = "/current-user"
341
344
  DEACTIVATE = "/deactivate"
342
345
  DEVICES = "/devices"
@@ -346,6 +349,7 @@ EMAIL_ANALYTICS = "/email-opt-in"
346
349
  EVENT_FLAVORS = "/event-flavors"
347
350
  EVENT_SOURCES = "/event-sources"
348
351
  FLAVORS = "/flavors"
352
+ FULL_STACK = "/full-stack"
349
353
  GET_OR_CREATE = "/get-or-create"
350
354
  GRAPH = "/graph"
351
355
  HEALTH = "/health"
@@ -372,13 +376,15 @@ SERVICE_CONNECTOR_CLIENT = "/client"
372
376
  SERVICE_CONNECTOR_RESOURCES = "/resources"
373
377
  SERVICE_CONNECTOR_TYPES = "/service_connector_types"
374
378
  SERVICE_CONNECTOR_VERIFY = "/verify"
375
- SERVICE_CONNECTOR_RESOURCES = "/resources"
379
+ SERVICE_CONNECTOR_FULL_STACK = "/full_stack_resources"
376
380
  MODELS = "/models"
377
381
  MODEL_VERSIONS = "/model_versions"
378
382
  MODEL_VERSION_ARTIFACTS = "/model_version_artifacts"
379
383
  MODEL_VERSION_PIPELINE_RUNS = "/model_version_pipeline_runs"
380
384
  SERVICES = "/services"
381
385
  SERVICE_CONNECTORS = "/service_connectors"
386
+ STACK = "/stack"
387
+ STACK_DEPLOYMENT = "/stack-deployment"
382
388
  STACKS = "/stacks"
383
389
  STACK_COMPONENTS = "/components"
384
390
  STATISTICS = "/statistics"
@@ -388,7 +394,9 @@ STEPS = "/steps"
388
394
  TAGS = "/tags"
389
395
  TRIGGERS = "/triggers"
390
396
  TRIGGER_EXECUTIONS = "/trigger_executions"
397
+ ONBOARDING_STATE = "/onboarding_state"
391
398
  USERS = "/users"
399
+ URL = "/url"
392
400
  VERSION_1 = "/v1"
393
401
  VISUALIZE = "/visualize"
394
402
  WEBHOOKS = "/webhooks"
@@ -458,6 +466,7 @@ MLSTACKS_SUPPORTED_STACK_COMPONENTS = [
458
466
  "step_operator",
459
467
  ]
460
468
 
469
+
461
470
  # Parameters for internal ZenML Models
462
471
  TEXT_FIELD_MAX_LENGTH = 65535
463
472
  STR_FIELD_MAX_LENGTH = 255
@@ -480,3 +489,6 @@ FINISHED_ONBOARDING_SURVEY_KEY = "awareness_channels"
480
489
 
481
490
  # Name validation
482
491
  BANNED_NAME_CHARACTERS = "\t\n\r\v\f"
492
+
493
+
494
+ STACK_DEPLOYMENT_API_TOKEN_EXPIRATION = 60 * 6 # 6 hours
@@ -41,6 +41,7 @@ class BaseContainerRegistryConfig(AuthenticationConfigMixin):
41
41
  """
42
42
 
43
43
  uri: str
44
+ default_repository: Optional[str] = None
44
45
 
45
46
  @field_validator("uri")
46
47
  @classmethod
zenml/enums.py CHANGED
@@ -384,3 +384,26 @@ class PluginSubType(StrEnum):
384
384
  WEBHOOK = "webhook"
385
385
  # Action Subtypes
386
386
  PIPELINE_RUN = "pipeline_run"
387
+
388
+
389
+ class OnboardingStep(StrEnum):
390
+ """All onboarding steps."""
391
+
392
+ DEVICE_VERIFIED = "device_verified"
393
+ PIPELINE_RUN = "pipeline_run"
394
+ STARTER_SETUP_COMPLETED = "starter_setup_completed"
395
+ STACK_WITH_REMOTE_ORCHESTRATOR_CREATED = (
396
+ "stack_with_remote_orchestrator_created"
397
+ )
398
+ PIPELINE_RUN_WITH_REMOTE_ORCHESTRATOR = (
399
+ "pipeline_run_with_remote_orchestrator"
400
+ )
401
+ PRODUCTION_SETUP_COMPLETED = "production_setup_completed"
402
+
403
+
404
+ class StackDeploymentProvider(StrEnum):
405
+ """All possible stack deployment providers."""
406
+
407
+ AWS = "aws"
408
+ GCP = "gcp"
409
+ AZURE = "azure"
@@ -13,7 +13,6 @@
13
13
  # permissions and limitations under the License.
14
14
  """Base class for all the Event Hub."""
15
15
 
16
- from functools import partial
17
16
  from typing import List
18
17
 
19
18
  from pydantic import ValidationError
@@ -125,13 +124,11 @@ class InternalEventHub(BaseEventHub):
125
124
  """
126
125
  # get all event sources configured for this flavor
127
126
  triggers: List[TriggerResponse] = depaginate(
128
- partial(
129
- self.zen_store.list_triggers,
130
- trigger_filter_model=TriggerFilter(
131
- event_source_id=event_source.id, is_active=True
132
- ),
133
- hydrate=True,
134
- )
127
+ self.zen_store.list_triggers,
128
+ trigger_filter_model=TriggerFilter(
129
+ event_source_id=event_source.id, is_active=True
130
+ ),
131
+ hydrate=True,
135
132
  )
136
133
 
137
134
  trigger_list: List[TriggerResponse] = []
@@ -23,6 +23,7 @@ from zenml.integrations.aws import AWSIntegration # noqa
23
23
  from zenml.integrations.azure import AzureIntegration # noqa
24
24
  from zenml.integrations.bentoml import BentoMLIntegration # noqa
25
25
  from zenml.integrations.bitbucket import BitbucketIntegration # noqa
26
+ from zenml.integrations.databricks import DatabricksIntegration # noqa
26
27
  from zenml.integrations.comet import CometIntegration # noqa
27
28
  from zenml.integrations.deepchecks import DeepchecksIntegration # noqa
28
29
  from zenml.integrations.discord import DiscordIntegration # noqa
@@ -43,6 +43,7 @@ class AWSIntegration(Integration):
43
43
  "kubernetes",
44
44
  "aws-profile-manager",
45
45
  ]
46
+ REQUIREMENTS_IGNORED_ON_UNINSTALL = ["kubernetes"]
46
47
 
47
48
  @staticmethod
48
49
  def activate() -> None:
@@ -42,12 +42,13 @@ class AzureIntegration(Integration):
42
42
  "adlfs>=2021.10.0",
43
43
  "azure-keyvault-keys",
44
44
  "azure-keyvault-secrets",
45
- "azure-identity==1.10.0",
46
- "azureml-core==1.54.0.post1",
45
+ "azure-identity",
46
+ "azureml-core==1.56.0",
47
47
  "azure-mgmt-containerservice>=20.0.0",
48
48
  "azure-storage-blob==12.17.0", # temporary fix for https://github.com/Azure/azure-sdk-for-python/issues/32056
49
49
  "kubernetes",
50
50
  ]
51
+ REQUIREMENTS_IGNORED_ON_UNINSTALL = ["kubernetes"]
51
52
 
52
53
  @staticmethod
53
54
  def activate() -> None:
@@ -22,6 +22,7 @@ BENTOML = "bentoml"
22
22
  BITBUCKET = "bitbucket"
23
23
  COMET = "comet"
24
24
  DASH = "dash"
25
+ DATABRICKS = "databricks"
25
26
  DEEPCHECKS = "deepchecks"
26
27
  DISCORD = "discord"
27
28
  EVIDENTLY = "evidently"
@@ -0,0 +1,52 @@
1
+ # Copyright (c) ZenML GmbH 2024. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12
+ # or implied. See the License for the specific language governing
13
+ # permissions and limitations under the License.
14
+ """Initialization of the Databricks integration for ZenML."""
15
+
16
+ from typing import List, Type
17
+
18
+ from zenml.integrations.constants import (
19
+ DATABRICKS,
20
+ )
21
+ from zenml.integrations.integration import Integration
22
+ from zenml.stack import Flavor
23
+
24
+ DATABRICKS_ORCHESTRATOR_FLAVOR = "databricks"
25
+ DATABRICKS_MODEL_DEPLOYER_FLAVOR = "databricks"
26
+ DATABRICKS_SERVICE_ARTIFACT = "databricks_deployment_service"
27
+
28
+
29
+ class DatabricksIntegration(Integration):
30
+ """Definition of Databricks Integration for ZenML."""
31
+
32
+ NAME = DATABRICKS
33
+ REQUIREMENTS = ["databricks-sdk==0.28.0"]
34
+
35
+ @classmethod
36
+ def flavors(cls) -> List[Type[Flavor]]:
37
+ """Declare the stack component flavors for the Databricks integration.
38
+
39
+ Returns:
40
+ List of stack component flavors for this integration.
41
+ """
42
+ from zenml.integrations.databricks.flavors import (
43
+ DatabricksOrchestratorFlavor,
44
+ DatabricksModelDeployerFlavor,
45
+ )
46
+
47
+ return [
48
+ DatabricksOrchestratorFlavor,
49
+ DatabricksModelDeployerFlavor,
50
+ ]
51
+
52
+ DatabricksIntegration.check_installation()