zenml-nightly 0.58.2.dev20240623__py3-none-any.whl → 0.61.0.dev20240712__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 (249) hide show
  1. README.md +30 -9
  2. RELEASE_NOTES.md +240 -0
  3. zenml/VERSION +1 -1
  4. zenml/actions/base_action.py +177 -174
  5. zenml/actions/pipeline_run/pipeline_run_action.py +28 -23
  6. zenml/analytics/enums.py +3 -0
  7. zenml/artifact_stores/base_artifact_store.py +7 -1
  8. zenml/artifacts/utils.py +13 -10
  9. zenml/cli/__init__.py +28 -0
  10. zenml/cli/artifact.py +1 -2
  11. zenml/cli/integration.py +9 -8
  12. zenml/cli/server.py +6 -0
  13. zenml/cli/service_connectors.py +1 -0
  14. zenml/cli/stack.py +946 -39
  15. zenml/cli/stack_components.py +7 -0
  16. zenml/cli/text_utils.py +35 -1
  17. zenml/cli/utils.py +127 -10
  18. zenml/client.py +257 -72
  19. zenml/config/compiler.py +10 -9
  20. zenml/config/docker_settings.py +33 -14
  21. zenml/constants.py +11 -2
  22. zenml/container_registries/base_container_registry.py +1 -0
  23. zenml/enums.py +7 -0
  24. zenml/event_hub/base_event_hub.py +5 -5
  25. zenml/event_hub/event_hub.py +20 -14
  26. zenml/event_sources/base_event.py +0 -11
  27. zenml/event_sources/base_event_source.py +7 -0
  28. zenml/event_sources/webhooks/base_webhook_event_source.py +1 -4
  29. zenml/exceptions.py +4 -0
  30. zenml/hooks/hook_validators.py +2 -3
  31. zenml/integrations/aws/__init__.py +1 -0
  32. zenml/integrations/azure/__init__.py +1 -0
  33. zenml/integrations/bitbucket/plugins/event_sources/bitbucket_webhook_event_source.py +3 -3
  34. zenml/integrations/deepchecks/__init__.py +1 -0
  35. zenml/integrations/discord/__init__.py +1 -0
  36. zenml/integrations/evidently/__init__.py +1 -0
  37. zenml/integrations/facets/__init__.py +1 -0
  38. zenml/integrations/feast/__init__.py +1 -0
  39. zenml/integrations/gcp/__init__.py +3 -1
  40. zenml/integrations/gcp/google_credentials_mixin.py +1 -1
  41. zenml/integrations/gcp/service_connectors/gcp_service_connector.py +320 -64
  42. zenml/integrations/huggingface/__init__.py +1 -0
  43. zenml/integrations/integration.py +24 -0
  44. zenml/integrations/kubeflow/__init__.py +3 -0
  45. zenml/integrations/kubeflow/flavors/kubeflow_orchestrator_flavor.py +1 -1
  46. zenml/integrations/kubeflow/orchestrators/kubeflow_orchestrator.py +0 -1
  47. zenml/integrations/kubernetes/__init__.py +3 -1
  48. zenml/integrations/kubernetes/orchestrators/kube_utils.py +4 -1
  49. zenml/integrations/label_studio/annotators/label_studio_annotator.py +1 -0
  50. zenml/integrations/langchain/__init__.py +1 -0
  51. zenml/integrations/mlflow/__init__.py +4 -2
  52. zenml/integrations/neural_prophet/__init__.py +1 -0
  53. zenml/integrations/polars/__init__.py +1 -0
  54. zenml/integrations/prodigy/__init__.py +1 -0
  55. zenml/integrations/pycaret/__init__.py +6 -0
  56. zenml/integrations/registry.py +37 -0
  57. zenml/integrations/s3/artifact_stores/s3_artifact_store.py +93 -9
  58. zenml/integrations/seldon/__init__.py +1 -0
  59. zenml/integrations/seldon/model_deployers/seldon_model_deployer.py +1 -0
  60. zenml/integrations/skypilot/flavors/skypilot_orchestrator_base_vm_config.py +2 -2
  61. zenml/integrations/skypilot/orchestrators/skypilot_base_vm_orchestrator.py +1 -1
  62. zenml/integrations/skypilot/orchestrators/skypilot_orchestrator_entrypoint.py +2 -2
  63. zenml/integrations/skypilot_aws/__init__.py +2 -1
  64. zenml/integrations/skypilot_azure/__init__.py +1 -1
  65. zenml/integrations/skypilot_gcp/__init__.py +1 -1
  66. zenml/integrations/skypilot_lambda/__init__.py +1 -1
  67. zenml/integrations/skypilot_lambda/flavors/skypilot_orchestrator_lambda_vm_flavor.py +1 -1
  68. zenml/integrations/slack/__init__.py +1 -0
  69. zenml/integrations/tekton/__init__.py +1 -0
  70. zenml/integrations/tensorboard/__init__.py +0 -1
  71. zenml/integrations/tensorflow/__init__.py +18 -6
  72. zenml/integrations/wandb/__init__.py +1 -0
  73. zenml/logging/step_logging.py +54 -51
  74. zenml/models/__init__.py +28 -0
  75. zenml/models/v2/core/action.py +276 -0
  76. zenml/models/v2/core/component.py +18 -0
  77. zenml/models/v2/core/model.py +1 -2
  78. zenml/models/v2/core/service_connector.py +17 -0
  79. zenml/models/v2/core/stack.py +31 -0
  80. zenml/models/v2/core/trigger.py +182 -141
  81. zenml/models/v2/misc/full_stack.py +97 -0
  82. zenml/models/v2/misc/stack_deployment.py +86 -0
  83. zenml/new/pipelines/pipeline.py +14 -4
  84. zenml/new/pipelines/pipeline_decorator.py +1 -2
  85. zenml/new/pipelines/run_utils.py +1 -12
  86. zenml/new/steps/step_decorator.py +2 -3
  87. zenml/orchestrators/input_utils.py +3 -6
  88. zenml/pipelines/base_pipeline.py +0 -2
  89. zenml/pipelines/pipeline_decorator.py +1 -2
  90. zenml/stack/stack.py +3 -6
  91. zenml/stack/stack_component.py +4 -0
  92. zenml/stack_deployments/__init__.py +14 -0
  93. zenml/stack_deployments/aws_stack_deployment.py +254 -0
  94. zenml/stack_deployments/gcp_stack_deployment.py +260 -0
  95. zenml/stack_deployments/stack_deployment.py +208 -0
  96. zenml/stack_deployments/utils.py +44 -0
  97. zenml/steps/base_step.py +1 -2
  98. zenml/steps/step_decorator.py +1 -2
  99. zenml/types.py +10 -1
  100. zenml/utils/function_utils.py +1 -1
  101. zenml/utils/pagination_utils.py +7 -5
  102. zenml/utils/pipeline_docker_image_builder.py +117 -73
  103. zenml/utils/pydantic_utils.py +6 -5
  104. zenml/zen_server/cloud_utils.py +18 -3
  105. zenml/zen_server/dashboard/assets/{404-CDPQCl4D.js → 404-DpJaNHKF.js} +1 -1
  106. zenml/zen_server/dashboard/assets/@radix-CFOkMR_E.js +85 -0
  107. zenml/zen_server/dashboard/assets/{@react-router-DYovave8.js → @react-router-CO-OsFwI.js} +2 -2
  108. zenml/zen_server/dashboard/assets/{@reactflow-CHBapDaj.js → @reactflow-DJfzkHO1.js} +2 -2
  109. zenml/zen_server/dashboard/assets/@tanstack-DYiOyJUL.js +22 -0
  110. zenml/zen_server/dashboard/assets/AwarenessChannel-BYDLT2xC.js +1 -0
  111. zenml/zen_server/dashboard/assets/{CodeSnippet-BidtnWOi.js → CodeSnippet-BkOuRmyq.js} +2 -2
  112. zenml/zen_server/dashboard/assets/Commands-ZvWR1BRs.js +1 -0
  113. zenml/zen_server/dashboard/assets/CopyButton-DVwLkafa.js +2 -0
  114. zenml/zen_server/dashboard/assets/{CsvVizualization-BOuez-fG.js → CsvVizualization-C2IiqX4I.js} +7 -7
  115. zenml/zen_server/dashboard/assets/DisplayDate-DYgIjlDF.js +1 -0
  116. zenml/zen_server/dashboard/assets/EmptyState-BMLnFVlB.js +1 -0
  117. zenml/zen_server/dashboard/assets/Error-CqX0VqW_.js +1 -0
  118. zenml/zen_server/dashboard/assets/ExecutionStatus-BoLUXR9t.js +1 -0
  119. zenml/zen_server/dashboard/assets/Helpbox-LFydyVwh.js +1 -0
  120. zenml/zen_server/dashboard/assets/Infobox-DnENC0sh.js +1 -0
  121. zenml/zen_server/dashboard/assets/InlineAvatar-CbJtYr0t.js +1 -0
  122. zenml/zen_server/dashboard/assets/{MarkdownVisualization-DsB2QZiK.js → MarkdownVisualization-xp3hhULl.js} +2 -2
  123. zenml/zen_server/dashboard/assets/Pagination-DEbVUupy.js +1 -0
  124. zenml/zen_server/dashboard/assets/PasswordChecker-DUveqlva.js +1 -0
  125. zenml/zen_server/dashboard/assets/SetPassword-BYBdbQDo.js +1 -0
  126. zenml/zen_server/dashboard/assets/SuccessStep-Nx743hll.js +1 -0
  127. zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-DnM-c11H.js → UpdatePasswordSchemas-DF9gSzE0.js} +1 -1
  128. zenml/zen_server/dashboard/assets/{aws-t0gKCj_R.js → aws-BgKTfTfx.js} +1 -1
  129. zenml/zen_server/dashboard/assets/{check-circle-BVvhm5dy.js → check-circle-i56092KI.js} +1 -1
  130. zenml/zen_server/dashboard/assets/{chevron-down-zcvCWmyP.js → chevron-down-D_ZlKMqH.js} +1 -1
  131. zenml/zen_server/dashboard/assets/{chevron-right-double-CJ50E9Gr.js → chevron-right-double-BiEMg7rd.js} +1 -1
  132. zenml/zen_server/dashboard/assets/cloud-only-DVbIeckv.js +1 -0
  133. zenml/zen_server/dashboard/assets/{copy-BRhQz3j-.js → copy-BXNk6BjL.js} +1 -1
  134. zenml/zen_server/dashboard/assets/{database-CRRnyFWh.js → database-1xWSgZfO.js} +1 -1
  135. zenml/zen_server/dashboard/assets/{docker-BAonhm6G.js → docker-CQMVm_4d.js} +1 -1
  136. zenml/zen_server/dashboard/assets/{file-text-CbVERUON.js → file-text-CqD_iu6l.js} +1 -1
  137. zenml/zen_server/dashboard/assets/{help-B8rqCvqn.js → help-bu_DgLKI.js} +1 -1
  138. zenml/zen_server/dashboard/assets/index-C_CrU4vI.js +1 -0
  139. zenml/zen_server/dashboard/assets/index-DK1ynKjA.js +55 -0
  140. zenml/zen_server/dashboard/assets/index-inApY3KQ.css +1 -0
  141. zenml/zen_server/dashboard/assets/index-rK_Wuy2W.js +1 -0
  142. zenml/zen_server/dashboard/assets/index.esm-Corw4lXQ.js +1 -0
  143. zenml/zen_server/dashboard/assets/{login-mutation-wzzl23C6.js → login-mutation-BUnVASxp.js} +1 -1
  144. zenml/zen_server/dashboard/assets/not-found-B4VnX8gK.js +1 -0
  145. zenml/zen_server/dashboard/assets/package-CsUhPmou.js +1 -0
  146. zenml/zen_server/dashboard/assets/{page-BmkSiYeQ.js → page-3efNCDeb.js} +2 -2
  147. zenml/zen_server/dashboard/assets/page-7zTHbhhI.js +1 -0
  148. zenml/zen_server/dashboard/assets/page-BEs6jK71.js +1 -0
  149. zenml/zen_server/dashboard/assets/page-BpSqIf4B.js +1 -0
  150. zenml/zen_server/dashboard/assets/{page-AQKopn_4.js → page-Bx6o0ARS.js} +1 -1
  151. zenml/zen_server/dashboard/assets/page-C43QGHTt.js +9 -0
  152. zenml/zen_server/dashboard/assets/page-CR0OG7ss.js +1 -0
  153. zenml/zen_server/dashboard/assets/page-CRTJ0UuR.js +1 -0
  154. zenml/zen_server/dashboard/assets/page-CUZIGO-3.js +1 -0
  155. zenml/zen_server/dashboard/assets/page-CaopxiU1.js +1 -0
  156. zenml/zen_server/dashboard/assets/{page-CuT1SUik.js → page-Cx67M0QT.js} +1 -1
  157. zenml/zen_server/dashboard/assets/page-D7Z399xy.js +1 -0
  158. zenml/zen_server/dashboard/assets/page-D93kd7Xj.js +1 -0
  159. zenml/zen_server/dashboard/assets/{page-BzVZGExK.js → page-DKlIdAe5.js} +1 -1
  160. zenml/zen_server/dashboard/assets/{page-Bi5AI0S7.js → page-DMOYZppS.js} +1 -1
  161. zenml/zen_server/dashboard/assets/page-DMsSn3dv.js +2 -0
  162. zenml/zen_server/dashboard/assets/{page-BW6Ket3a.js → page-Dc_7KMQE.js} +1 -1
  163. zenml/zen_server/dashboard/assets/page-DvCvroOM.js +1 -0
  164. zenml/zen_server/dashboard/assets/page-Hus2pr9T.js +1 -0
  165. zenml/zen_server/dashboard/assets/page-JyfeDUfu.js +1 -0
  166. zenml/zen_server/dashboard/assets/{page-yN4rZ-ZS.js → page-Sxn82W-5.js} +1 -1
  167. zenml/zen_server/dashboard/assets/page-TKXERe16.js +1 -0
  168. zenml/zen_server/dashboard/assets/page-Xu8JEjSU.js +1 -0
  169. zenml/zen_server/dashboard/assets/{play-circle-DK5QMJyp.js → play-circle-CNtZKDnW.js} +1 -1
  170. zenml/zen_server/dashboard/assets/plus-DOeLmm7C.js +1 -0
  171. zenml/zen_server/dashboard/assets/{terminal-B2ovgWuz.js → terminal-By9cErXc.js} +1 -1
  172. zenml/zen_server/dashboard/assets/{update-server-settings-mutation-0Wgz8pUE.js → update-server-settings-mutation-CR8e3Sir.js} +1 -1
  173. zenml/zen_server/dashboard/assets/{url-6_xv0WJS.js → url-DuQMeqYA.js} +1 -1
  174. zenml/zen_server/dashboard/assets/{zod-DrZvVLjd.js → zod-BhoGpZ63.js} +1 -1
  175. zenml/zen_server/dashboard/index.html +7 -7
  176. zenml/zen_server/dashboard_legacy/asset-manifest.json +4 -4
  177. zenml/zen_server/dashboard_legacy/index.html +1 -1
  178. zenml/zen_server/dashboard_legacy/{precache-manifest.f4abc5b7cfa7d90c1caf5521918e29a8.js → precache-manifest.c8c57fb0d2132b1d3c2119e776b7dfb3.js} +4 -4
  179. zenml/zen_server/dashboard_legacy/service-worker.js +1 -1
  180. zenml/zen_server/dashboard_legacy/static/js/{main.ac2f17d0.chunk.js → main.382439a7.chunk.js} +2 -2
  181. zenml/zen_server/dashboard_legacy/static/js/{main.ac2f17d0.chunk.js.map → main.382439a7.chunk.js.map} +1 -1
  182. zenml/zen_server/deploy/helm/Chart.yaml +1 -1
  183. zenml/zen_server/deploy/helm/README.md +2 -2
  184. zenml/zen_server/feature_gate/zenml_cloud_feature_gate.py +11 -5
  185. zenml/zen_server/pipeline_deployment/utils.py +57 -44
  186. zenml/zen_server/rbac/models.py +1 -0
  187. zenml/zen_server/rbac/utils.py +22 -1
  188. zenml/zen_server/rbac/zenml_cloud_rbac.py +11 -5
  189. zenml/zen_server/routers/actions_endpoints.py +324 -0
  190. zenml/zen_server/routers/stack_deployment_endpoints.py +158 -0
  191. zenml/zen_server/routers/triggers_endpoints.py +30 -158
  192. zenml/zen_server/routers/workspaces_endpoints.py +64 -0
  193. zenml/zen_server/zen_server_api.py +4 -0
  194. zenml/zen_stores/migrations/utils.py +1 -1
  195. zenml/zen_stores/migrations/versions/0.60.0_release.py +23 -0
  196. zenml/zen_stores/migrations/versions/0.61.0_release.py +23 -0
  197. zenml/zen_stores/migrations/versions/0d707865f404_adding_labels_to_stacks.py +30 -0
  198. zenml/zen_stores/migrations/versions/25155145c545_separate_actions_and_triggers.py +228 -0
  199. zenml/zen_stores/rest_zen_store.py +248 -8
  200. zenml/zen_stores/schemas/__init__.py +2 -0
  201. zenml/zen_stores/schemas/action_schemas.py +192 -0
  202. zenml/zen_stores/schemas/stack_schemas.py +10 -0
  203. zenml/zen_stores/schemas/step_run_schemas.py +27 -11
  204. zenml/zen_stores/schemas/trigger_schemas.py +43 -50
  205. zenml/zen_stores/schemas/user_schemas.py +10 -2
  206. zenml/zen_stores/schemas/workspace_schemas.py +5 -0
  207. zenml/zen_stores/sql_zen_store.py +540 -36
  208. zenml/zen_stores/zen_store_interface.py +165 -0
  209. {zenml_nightly-0.58.2.dev20240623.dist-info → zenml_nightly-0.61.0.dev20240712.dist-info}/METADATA +33 -11
  210. {zenml_nightly-0.58.2.dev20240623.dist-info → zenml_nightly-0.61.0.dev20240712.dist-info}/RECORD +213 -193
  211. zenml/zen_server/dashboard/assets/@radix-C9DBgJhe.js +0 -77
  212. zenml/zen_server/dashboard/assets/@tanstack-CEbkxrhX.js +0 -30
  213. zenml/zen_server/dashboard/assets/AwarenessChannel-nXGpmj_f.js +0 -1
  214. zenml/zen_server/dashboard/assets/Cards-nwsvQLVS.js +0 -1
  215. zenml/zen_server/dashboard/assets/Commands-DuIWKg_Q.js +0 -1
  216. zenml/zen_server/dashboard/assets/CopyButton-B_YSm-Ds.js +0 -2
  217. zenml/zen_server/dashboard/assets/DisplayDate-BdguISQF.js +0 -1
  218. zenml/zen_server/dashboard/assets/EmptyState-BkooiGtL.js +0 -1
  219. zenml/zen_server/dashboard/assets/Error-B6M0dPph.js +0 -1
  220. zenml/zen_server/dashboard/assets/Helpbox-BQoqCm04.js +0 -1
  221. zenml/zen_server/dashboard/assets/Infobox-Ce9mefqU.js +0 -1
  222. zenml/zen_server/dashboard/assets/InlineAvatar-DGf3dVhV.js +0 -1
  223. zenml/zen_server/dashboard/assets/PageHeader-DGaemzjc.js +0 -1
  224. zenml/zen_server/dashboard/assets/Pagination-DVYfBCCc.js +0 -1
  225. zenml/zen_server/dashboard/assets/PasswordChecker-DSLBp7Vl.js +0 -1
  226. zenml/zen_server/dashboard/assets/SetPassword-B5s7DJug.js +0 -1
  227. zenml/zen_server/dashboard/assets/SuccessStep-ZzczaM7g.js +0 -1
  228. zenml/zen_server/dashboard/assets/cloud-only-Ba_ShBR5.js +0 -1
  229. zenml/zen_server/dashboard/assets/index-CWJ3xbIf.css +0 -1
  230. zenml/zen_server/dashboard/assets/index-QORVVTMN.js +0 -55
  231. zenml/zen_server/dashboard/assets/index.esm-F7nqy9zY.js +0 -1
  232. zenml/zen_server/dashboard/assets/not-found-Dh2la7kh.js +0 -1
  233. zenml/zen_server/dashboard/assets/page-B-5jAKoO.js +0 -1
  234. zenml/zen_server/dashboard/assets/page-B-vWk8a6.js +0 -1
  235. zenml/zen_server/dashboard/assets/page-B0BrqfS8.js +0 -1
  236. zenml/zen_server/dashboard/assets/page-BQxVFlUl.js +0 -1
  237. zenml/zen_server/dashboard/assets/page-ByrHy6Ss.js +0 -1
  238. zenml/zen_server/dashboard/assets/page-CPtY4Kv_.js +0 -1
  239. zenml/zen_server/dashboard/assets/page-CmmukLsl.js +0 -1
  240. zenml/zen_server/dashboard/assets/page-D2D-7qyr.js +0 -9
  241. zenml/zen_server/dashboard/assets/page-DAQQyLxT.js +0 -1
  242. zenml/zen_server/dashboard/assets/page-DHkUMl_E.js +0 -1
  243. zenml/zen_server/dashboard/assets/page-DZCbwOEs.js +0 -2
  244. zenml/zen_server/dashboard/assets/page-DdaIt20-.js +0 -1
  245. zenml/zen_server/dashboard/assets/page-LqLs24Ot.js +0 -1
  246. zenml/zen_server/dashboard/assets/page-lebv0c7C.js +0 -1
  247. {zenml_nightly-0.58.2.dev20240623.dist-info → zenml_nightly-0.61.0.dev20240712.dist-info}/LICENSE +0 -0
  248. {zenml_nightly-0.58.2.dev20240623.dist-info → zenml_nightly-0.61.0.dev20240712.dist-info}/WHEEL +0 -0
  249. {zenml_nightly-0.58.2.dev20240623.dist-info → zenml_nightly-0.61.0.dev20240712.dist-info}/entry_points.txt +0 -0
@@ -16,7 +16,7 @@
16
16
  from enum import Enum
17
17
  from typing import Any, Dict, List, Optional, Union
18
18
 
19
- from pydantic import Field, model_validator
19
+ from pydantic import BaseModel, Field, model_validator
20
20
  from pydantic_settings import SettingsConfigDict
21
21
 
22
22
  from zenml.config.base_settings import BaseSettings
@@ -65,6 +65,23 @@ class PythonPackageInstaller(Enum):
65
65
  UV = "uv"
66
66
 
67
67
 
68
+ class DockerBuildConfig(BaseModel):
69
+ """Configuration for a Docker build.
70
+
71
+ Attributes:
72
+ build_options: Additional options that will be passed unmodified to the
73
+ Docker build call when building an image. You can use this to for
74
+ example specify build args or a target stage. See
75
+ https://docker-py.readthedocs.io/en/stable/images.html#docker.models.images.ImageCollection.build
76
+ for a full list of available options.
77
+ dockerignore: Path to a dockerignore file to use when building the
78
+ Docker image.
79
+ """
80
+
81
+ build_options: Dict[str, Any] = {}
82
+ dockerignore: Optional[str] = None
83
+
84
+
68
85
  class DockerSettings(BaseSettings):
69
86
  """Settings for building Docker images to run ZenML pipelines.
70
87
 
@@ -85,10 +102,11 @@ class DockerSettings(BaseSettings):
85
102
  Depending on the configuration of this object, requirements will be
86
103
  installed in the following order (each step optional):
87
104
  - The packages installed in your local python environment
88
- - The packages specified via the `requirements` attribute
89
- - The packages specified via the `required_integrations` and potentially
90
- stack requirements
91
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
92
110
 
93
111
  Attributes:
94
112
  parent_image: Full name of the Docker image that should be
@@ -116,18 +134,17 @@ class DockerSettings(BaseSettings):
116
134
  build_context_root: Build context root for the Docker build, only used
117
135
  when the `dockerfile` attribute is set. If this is left empty, the
118
136
  build context will only contain the Dockerfile.
119
- build_options: Additional options that will be passed unmodified to the
120
- Docker build call when building an image using the specified
121
- `dockerfile`. You can use this to for example specify build
122
- args or a target stage. See
123
- https://docker-py.readthedocs.io/en/stable/images.html#docker.models.images.ImageCollection.build
124
- for a full list of available options.
137
+ parent_image_build_config: Configuration for the parent image build.
138
+ build_options: DEPRECATED, use parent_image_build_config.build_options
139
+ instead.
125
140
  skip_build: If set to `True`, the parent image will be used directly to
126
141
  run the steps of your pipeline.
127
142
  target_repository: Name of the Docker repository to which the
128
143
  image should be pushed. This repository will be appended to the
129
144
  registry URI of the container registry of your stack and should
130
- 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.
131
148
  python_package_installer: The package installer to use for python
132
149
  packages.
133
150
  python_package_installer_args: Arguments to pass to the python package
@@ -158,8 +175,8 @@ class DockerSettings(BaseSettings):
158
175
  apt_packages: APT packages to install inside the Docker image.
159
176
  environment: Dictionary of environment variables to set inside the
160
177
  Docker image.
161
- dockerignore: Path to a dockerignore file to use when building the
162
- Docker image.
178
+ build_config: Configuration for the main image build.
179
+ dockerignore: DEPRECATED, use build_config.dockerignore instead.
163
180
  copy_files: DEPRECATED, use the `source_files` attribute instead.
164
181
  copy_global_config: DEPRECATED/UNUSED.
165
182
  user: If not `None`, will set the user, make it owner of the `/app`
@@ -184,8 +201,9 @@ class DockerSettings(BaseSettings):
184
201
  dockerfile: Optional[str] = None
185
202
  build_context_root: Optional[str] = None
186
203
  build_options: Dict[str, Any] = {}
204
+ parent_image_build_config: Optional[DockerBuildConfig] = None
187
205
  skip_build: bool = False
188
- target_repository: str = "zenml"
206
+ target_repository: Optional[str] = None
189
207
  python_package_installer: PythonPackageInstaller = (
190
208
  PythonPackageInstaller.PIP
191
209
  )
@@ -205,6 +223,7 @@ class DockerSettings(BaseSettings):
205
223
  copy_files: bool = True
206
224
  copy_global_config: bool = True
207
225
  user: Optional[str] = None
226
+ build_config: Optional[DockerBuildConfig] = None
208
227
 
209
228
  source_files: SourceFileMode = SourceFileMode.DOWNLOAD_OR_INCLUDE
210
229
 
zenml/constants.py CHANGED
@@ -263,6 +263,7 @@ DEFAULT_ZENML_SERVER_MAX_DEVICE_AUTH_ATTEMPTS = 3
263
263
  DEFAULT_ZENML_SERVER_DEVICE_AUTH_TIMEOUT = 60 * 5 # 5 minutes
264
264
  DEFAULT_ZENML_SERVER_DEVICE_AUTH_POLLING = 5 # seconds
265
265
  DEFAULT_HTTP_TIMEOUT = 30
266
+ SERVICE_CONNECTOR_VERIFY_REQUEST_TIMEOUT = 120 # seconds
266
267
  ZENML_API_KEY_PREFIX = "ZENKEY_"
267
268
  DEFAULT_ZENML_SERVER_PIPELINE_RUN_AUTH_WINDOW = 60 * 48 # 48 hours
268
269
  DEFAULT_ZENML_SERVER_LOGIN_RATE_LIMIT_MINUTE = 5
@@ -326,7 +327,7 @@ REQUIRES_CUSTOM_RESOURCE_REPORTING = ["pipeline", "pipeline_run"]
326
327
 
327
328
  # API Endpoint paths:
328
329
  ACTIVATE = "/activate"
329
- ACTIONS = "/action-flavors"
330
+ ACTIONS = "/actions"
330
331
  API = "/api"
331
332
  API_KEYS = "/api_keys"
332
333
  API_KEY_ROTATE = "/rotate"
@@ -337,6 +338,7 @@ ARTIFACT_VISUALIZATIONS = "/artifact_visualizations"
337
338
  CODE_REFERENCES = "/code_references"
338
339
  CODE_REPOSITORIES = "/code_repositories"
339
340
  COMPONENT_TYPES = "/component-types"
341
+ CONFIG = "/config"
340
342
  CURRENT_USER = "/current-user"
341
343
  DEACTIVATE = "/deactivate"
342
344
  DEVICES = "/devices"
@@ -346,6 +348,7 @@ EMAIL_ANALYTICS = "/email-opt-in"
346
348
  EVENT_FLAVORS = "/event-flavors"
347
349
  EVENT_SOURCES = "/event-sources"
348
350
  FLAVORS = "/flavors"
351
+ FULL_STACK = "/full-stack"
349
352
  GET_OR_CREATE = "/get-or-create"
350
353
  GRAPH = "/graph"
351
354
  HEALTH = "/health"
@@ -372,13 +375,14 @@ SERVICE_CONNECTOR_CLIENT = "/client"
372
375
  SERVICE_CONNECTOR_RESOURCES = "/resources"
373
376
  SERVICE_CONNECTOR_TYPES = "/service_connector_types"
374
377
  SERVICE_CONNECTOR_VERIFY = "/verify"
375
- SERVICE_CONNECTOR_RESOURCES = "/resources"
376
378
  MODELS = "/models"
377
379
  MODEL_VERSIONS = "/model_versions"
378
380
  MODEL_VERSION_ARTIFACTS = "/model_version_artifacts"
379
381
  MODEL_VERSION_PIPELINE_RUNS = "/model_version_pipeline_runs"
380
382
  SERVICES = "/services"
381
383
  SERVICE_CONNECTORS = "/service_connectors"
384
+ STACK = "/stack"
385
+ STACK_DEPLOYMENT = "/stack-deployment"
382
386
  STACKS = "/stacks"
383
387
  STACK_COMPONENTS = "/components"
384
388
  STATISTICS = "/statistics"
@@ -389,6 +393,7 @@ TAGS = "/tags"
389
393
  TRIGGERS = "/triggers"
390
394
  TRIGGER_EXECUTIONS = "/trigger_executions"
391
395
  USERS = "/users"
396
+ URL = "/url"
392
397
  VERSION_1 = "/v1"
393
398
  VISUALIZE = "/visualize"
394
399
  WEBHOOKS = "/webhooks"
@@ -458,6 +463,7 @@ MLSTACKS_SUPPORTED_STACK_COMPONENTS = [
458
463
  "step_operator",
459
464
  ]
460
465
 
466
+
461
467
  # Parameters for internal ZenML Models
462
468
  TEXT_FIELD_MAX_LENGTH = 65535
463
469
  STR_FIELD_MAX_LENGTH = 255
@@ -480,3 +486,6 @@ FINISHED_ONBOARDING_SURVEY_KEY = "awareness_channels"
480
486
 
481
487
  # Name validation
482
488
  BANNED_NAME_CHARACTERS = "\t\n\r\v\f"
489
+
490
+
491
+ 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,10 @@ class PluginSubType(StrEnum):
384
384
  WEBHOOK = "webhook"
385
385
  # Action Subtypes
386
386
  PIPELINE_RUN = "pipeline_run"
387
+
388
+
389
+ class StackDeploymentProvider(StrEnum):
390
+ """All possible stack deployment providers."""
391
+
392
+ AWS = "aws"
393
+ GCP = "gcp"
@@ -121,7 +121,7 @@ class BaseEventHub(ABC):
121
121
  trigger=trigger.id, event_metadata=event.model_dump()
122
122
  )
123
123
 
124
- action_config = trigger.get_metadata().action
124
+ action_config = trigger.action.configuration
125
125
 
126
126
  trigger_execution = self.zen_store.create_trigger_execution(request)
127
127
 
@@ -130,16 +130,16 @@ class BaseEventHub(ABC):
130
130
  # is associated with the service account configured for the trigger
131
131
  # and has a validity defined by the trigger's authentication window.
132
132
  token = JWTToken(
133
- user_id=trigger.service_account.id,
133
+ user_id=trigger.action.service_account.id,
134
134
  )
135
135
  expires: Optional[datetime] = None
136
- if trigger.auth_window:
136
+ if trigger.action.auth_window:
137
137
  expires = datetime.utcnow() + timedelta(
138
- minutes=trigger.auth_window
138
+ minutes=trigger.action.auth_window
139
139
  )
140
140
  encoded_token = token.encode(expires=expires)
141
141
  auth_context = AuthContext(
142
- user=trigger.service_account,
142
+ user=trigger.action.service_account,
143
143
  access_token=token,
144
144
  encoded_access_token=encoded_token,
145
145
  )
@@ -13,8 +13,9 @@
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
- from typing import TYPE_CHECKING, List
16
+ from typing import List
17
+
18
+ from pydantic import ValidationError
18
19
 
19
20
  from zenml import EventSourceResponse
20
21
  from zenml.enums import PluginType
@@ -35,9 +36,6 @@ from zenml.zen_server.utils import plugin_flavor_registry
35
36
 
36
37
  logger = get_logger(__name__)
37
38
 
38
- if TYPE_CHECKING:
39
- pass
40
-
41
39
 
42
40
  class InternalEventHub(BaseEventHub):
43
41
  """Internal in-server event hub implementation.
@@ -126,13 +124,11 @@ class InternalEventHub(BaseEventHub):
126
124
  """
127
125
  # get all event sources configured for this flavor
128
126
  triggers: List[TriggerResponse] = depaginate(
129
- partial(
130
- self.zen_store.list_triggers,
131
- trigger_filter_model=TriggerFilter(
132
- event_source_id=event_source.id, is_active=True
133
- ),
134
- hydrate=True,
135
- )
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,
136
132
  )
137
133
 
138
134
  trigger_list: List[TriggerResponse] = []
@@ -158,9 +154,19 @@ class InternalEventHub(BaseEventHub):
158
154
 
159
155
  assert issubclass(plugin_flavor, BaseEventSourceFlavor)
160
156
 
161
- # Get the filter class from the plugin flavor class
162
157
  event_filter_config_class = plugin_flavor.EVENT_FILTER_CONFIG_CLASS
163
- event_filter = event_filter_config_class(**trigger.event_filter)
158
+ try:
159
+ event_filter = event_filter_config_class(
160
+ **trigger.event_filter if trigger.event_filter else {}
161
+ )
162
+ except ValidationError:
163
+ logger.exception(
164
+ f"Could not instantiate event filter config class for "
165
+ f"event source {event_source.id}. Skipping trigger "
166
+ f"{trigger.id}."
167
+ )
168
+ continue
169
+
164
170
  if event_filter.event_matches_filter(event=event):
165
171
  trigger_list.append(trigger)
166
172
 
@@ -13,19 +13,8 @@
13
13
  # permissions and limitations under the License.
14
14
  """Base implementation for events."""
15
15
 
16
- from typing import (
17
- TYPE_CHECKING,
18
- )
19
-
20
16
  from pydantic import BaseModel
21
17
 
22
- from zenml.logger import get_logger
23
-
24
- if TYPE_CHECKING:
25
- pass
26
-
27
- logger = get_logger(__name__)
28
-
29
18
  # -------------------- Event Models -----------------------------------
30
19
 
31
20
 
@@ -449,6 +449,13 @@ class BaseEventSourceHandler(BasePlugin, ABC):
449
449
  event: The event to dispatch.
450
450
  event_source: The event source that produced the event.
451
451
  """
452
+ if not event_source.is_active:
453
+ logger.debug(
454
+ f"Event source {event_source.id} is not active. Skipping event "
455
+ f"dispatch."
456
+ )
457
+ return
458
+
452
459
  self.event_hub.publish_event(
453
460
  event=event,
454
461
  event_source=event_source,
@@ -17,7 +17,7 @@ import hashlib
17
17
  import hmac
18
18
  import json
19
19
  from abc import ABC, abstractmethod
20
- from typing import TYPE_CHECKING, Any, ClassVar, Dict, Optional, Type
20
+ from typing import Any, ClassVar, Dict, Optional, Type
21
21
 
22
22
  from zenml.enums import PluginSubType
23
23
  from zenml.event_sources.base_event import BaseEvent
@@ -33,9 +33,6 @@ from zenml.models import EventSourceResponse
33
33
 
34
34
  logger = get_logger(__name__)
35
35
 
36
- if TYPE_CHECKING:
37
- pass
38
-
39
36
 
40
37
  # -------------------- Event Models -----------------------------------
41
38
 
zenml/exceptions.py CHANGED
@@ -197,6 +197,10 @@ class EntityExistsError(ZenMLBaseException):
197
197
  """Raised when trying to register an entity that already exists."""
198
198
 
199
199
 
200
+ class ActionExistsError(EntityExistsError):
201
+ """Raised when registering an action with a name that already exists."""
202
+
203
+
200
204
  class TriggerExistsError(EntityExistsError):
201
205
  """Raised when registering a trigger with name that already exists."""
202
206
 
@@ -14,14 +14,13 @@
14
14
  """Validation functions for hooks."""
15
15
 
16
16
  import inspect
17
- from types import FunctionType
18
- from typing import TYPE_CHECKING, Union
17
+ from typing import TYPE_CHECKING
19
18
 
20
19
  from zenml.config.source import Source
21
20
  from zenml.utils import source_utils
22
21
 
23
22
  if TYPE_CHECKING:
24
- HookSpecification = Union[str, Source, FunctionType]
23
+ from zenml.types import HookSpecification
25
24
 
26
25
 
27
26
  def resolve_and_validate_hook(hook: "HookSpecification") -> Source:
@@ -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:
@@ -48,6 +48,7 @@ class AzureIntegration(Integration):
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:
@@ -152,9 +152,9 @@ class BitbucketEvent(BaseEvent):
152
152
  class BitbucketWebhookEventFilterConfiguration(WebhookEventFilterConfig):
153
153
  """Configuration for Bitbucket event filters."""
154
154
 
155
- repo: Optional[str]
156
- branch: Optional[str]
157
- event_type: Optional[BitbucketEventType]
155
+ repo: Optional[str] = None
156
+ branch: Optional[str] = None
157
+ event_type: Optional[BitbucketEventType] = None
158
158
 
159
159
  def event_matches_filter(self, event: BaseEvent) -> bool:
160
160
  """Checks the filter against the inbound event.
@@ -44,6 +44,7 @@ class DeepchecksIntegration(Integration):
44
44
  "tenacity!=8.4.0", # https://github.com/jd/tenacity/issues/471
45
45
  ]
46
46
  APT_PACKAGES = ["ffmpeg", "libsm6", "libxext6"]
47
+ REQUIREMENTS_IGNORED_ON_UNINSTALL = ["pandas","torchvision","tenacity"]
47
48
 
48
49
  @staticmethod
49
50
  def activate() -> None:
@@ -31,6 +31,7 @@ class DiscordIntegration(Integration):
31
31
 
32
32
  NAME = DISCORD
33
33
  REQUIREMENTS = ["discord.py>=2.3.2", "aiohttp>=3.8.1", "asyncio"]
34
+ REQUIREMENTS_IGNORED_ON_UNINSTALL = ["aiohttp","asyncio"]
34
35
 
35
36
  @classmethod
36
37
  def flavors(cls) -> List[Type[Flavor]]:
@@ -57,6 +57,7 @@ class EvidentlyIntegration(Integration):
57
57
  "evidently>=0.4.16,<=0.4.22",
58
58
  "tenacity!=8.4.0", # https://github.com/jd/tenacity/issues/471
59
59
  ]
60
+ REQUIREMENTS_IGNORED_ON_UNINSTALL = ["tenacity"]
60
61
 
61
62
  @classmethod
62
63
  def flavors(cls) -> List[Type[Flavor]]:
@@ -22,6 +22,7 @@ class FacetsIntegration(Integration):
22
22
 
23
23
  NAME = FACETS
24
24
  REQUIREMENTS = ["facets-overview>=1.0.0", "pandas"]
25
+ REQUIREMENTS_IGNORED_ON_UNINSTALL = ["pandas"]
25
26
 
26
27
  @staticmethod
27
28
  def activate() -> None:
@@ -34,6 +34,7 @@ class FeastIntegration(Integration):
34
34
  # click is added to keep the feast click version
35
35
  # in sync with ZenML's click
36
36
  REQUIREMENTS = ["feast<=0.37.1", "click>=8.0.1,<8.1.4"]
37
+ REQUIREMENTS_IGNORED_ON_UNINSTALL = ["click"]
37
38
 
38
39
  @classmethod
39
40
  def flavors(cls) -> List[Type[Flavor]]:
@@ -43,15 +43,17 @@ class GcpIntegration(Integration):
43
43
 
44
44
  NAME = GCP
45
45
  REQUIREMENTS = [
46
- "kfp>=1.8.22",
46
+ "kfp>=2.6.0",
47
47
  "gcsfs",
48
48
  "google-cloud-secret-manager",
49
49
  "google-cloud-container>=2.21.0",
50
+ "google-cloud-artifact-registry>=1.11.3",
50
51
  "google-cloud-storage>=2.9.0",
51
52
  "google-cloud-aiplatform>=1.34.0", # includes shapely pin fix
52
53
  "google-cloud-build>=3.11.0",
53
54
  "kubernetes",
54
55
  ]
56
+ REQUIREMENTS_IGNORED_ON_UNINSTALL = ["kubernetes","kfp"]
55
57
 
56
58
  @staticmethod
57
59
  def activate() -> None:
@@ -85,7 +85,7 @@ class GoogleCredentialsMixin(StackComponent):
85
85
  "trying to use the linked connector, but got "
86
86
  f"{type(credentials)}."
87
87
  )
88
- return credentials, connector.config.project_id
88
+ return credentials, connector.config.gcp_project_id
89
89
 
90
90
  if self.config.service_account_path:
91
91
  credentials, project_id = load_credentials_from_file(