zenml-nightly 0.60.0.dev20240627__py3-none-any.whl → 0.61.0.dev20240710__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- README.md +30 -9
- RELEASE_NOTES.md +34 -0
- zenml/VERSION +1 -1
- zenml/analytics/enums.py +3 -0
- zenml/cli/__init__.py +28 -0
- zenml/cli/artifact.py +1 -2
- zenml/cli/integration.py +9 -8
- zenml/cli/server.py +6 -0
- zenml/cli/stack.py +797 -39
- zenml/cli/stack_components.py +7 -0
- zenml/cli/text_utils.py +35 -1
- zenml/cli/utils.py +127 -10
- zenml/client.py +23 -14
- zenml/config/docker_settings.py +8 -5
- zenml/constants.py +5 -1
- zenml/container_registries/base_container_registry.py +1 -0
- zenml/enums.py +6 -0
- zenml/event_hub/event_hub.py +5 -8
- zenml/integrations/aws/__init__.py +1 -0
- zenml/integrations/azure/__init__.py +1 -0
- zenml/integrations/deepchecks/__init__.py +1 -0
- zenml/integrations/discord/__init__.py +1 -0
- zenml/integrations/evidently/__init__.py +1 -0
- zenml/integrations/facets/__init__.py +1 -0
- zenml/integrations/feast/__init__.py +1 -0
- zenml/integrations/gcp/__init__.py +3 -1
- zenml/integrations/gcp/service_connectors/gcp_service_connector.py +203 -44
- zenml/integrations/huggingface/__init__.py +1 -0
- zenml/integrations/integration.py +24 -0
- zenml/integrations/kubeflow/__init__.py +3 -0
- zenml/integrations/kubeflow/flavors/kubeflow_orchestrator_flavor.py +1 -1
- zenml/integrations/kubeflow/orchestrators/kubeflow_orchestrator.py +0 -1
- zenml/integrations/kubernetes/__init__.py +3 -1
- zenml/integrations/kubernetes/orchestrators/kube_utils.py +4 -1
- zenml/integrations/label_studio/annotators/label_studio_annotator.py +1 -0
- zenml/integrations/langchain/__init__.py +1 -0
- zenml/integrations/mlflow/__init__.py +3 -1
- zenml/integrations/neural_prophet/__init__.py +1 -0
- zenml/integrations/polars/__init__.py +1 -0
- zenml/integrations/prodigy/__init__.py +1 -0
- zenml/integrations/pycaret/__init__.py +6 -0
- zenml/integrations/registry.py +37 -0
- zenml/integrations/s3/artifact_stores/s3_artifact_store.py +17 -6
- zenml/integrations/seldon/__init__.py +1 -0
- zenml/integrations/seldon/model_deployers/seldon_model_deployer.py +1 -0
- zenml/integrations/skypilot/flavors/skypilot_orchestrator_base_vm_config.py +2 -2
- zenml/integrations/skypilot/orchestrators/skypilot_base_vm_orchestrator.py +1 -1
- zenml/integrations/skypilot/orchestrators/skypilot_orchestrator_entrypoint.py +2 -2
- zenml/integrations/skypilot_aws/__init__.py +2 -1
- zenml/integrations/skypilot_azure/__init__.py +1 -1
- zenml/integrations/skypilot_gcp/__init__.py +1 -1
- zenml/integrations/skypilot_lambda/__init__.py +1 -1
- zenml/integrations/skypilot_lambda/flavors/skypilot_orchestrator_lambda_vm_flavor.py +1 -1
- zenml/integrations/slack/__init__.py +1 -0
- zenml/integrations/tekton/__init__.py +1 -0
- zenml/integrations/tensorboard/__init__.py +0 -1
- zenml/integrations/tensorflow/__init__.py +18 -6
- zenml/integrations/wandb/__init__.py +1 -0
- zenml/models/__init__.py +9 -0
- zenml/models/v2/core/component.py +18 -0
- zenml/models/v2/core/model.py +1 -2
- zenml/models/v2/core/service_connector.py +17 -0
- zenml/models/v2/core/stack.py +31 -0
- zenml/models/v2/misc/full_stack.py +97 -0
- zenml/models/v2/misc/stack_deployment.py +66 -0
- zenml/new/pipelines/pipeline.py +1 -1
- zenml/orchestrators/input_utils.py +3 -6
- zenml/stack/stack.py +3 -6
- zenml/stack_deployments/__init__.py +14 -0
- zenml/stack_deployments/aws_stack_deployment.py +289 -0
- zenml/stack_deployments/stack_deployment.py +130 -0
- zenml/stack_deployments/utils.py +40 -0
- zenml/utils/function_utils.py +1 -1
- zenml/utils/pagination_utils.py +7 -5
- zenml/utils/pipeline_docker_image_builder.py +97 -68
- zenml/utils/pydantic_utils.py +6 -5
- zenml/zen_server/cloud_utils.py +18 -3
- zenml/zen_server/dashboard/assets/{404-C1mcUujL.js → 404-DpJaNHKF.js} +1 -1
- zenml/zen_server/dashboard/assets/@radix-CFOkMR_E.js +85 -0
- zenml/zen_server/dashboard/assets/{@react-router-DYovave8.js → @react-router-CO-OsFwI.js} +2 -2
- zenml/zen_server/dashboard/assets/{@reactflow-DYIyhCfd.js → @reactflow-DJfzkHO1.js} +2 -2
- zenml/zen_server/dashboard/assets/@tanstack-DYiOyJUL.js +22 -0
- zenml/zen_server/dashboard/assets/AwarenessChannel-BYDLT2xC.js +1 -0
- zenml/zen_server/dashboard/assets/{CodeSnippet-WEzpO0az.js → CodeSnippet-BkOuRmyq.js} +2 -2
- zenml/zen_server/dashboard/assets/Commands-ZvWR1BRs.js +1 -0
- zenml/zen_server/dashboard/assets/CopyButton-DVwLkafa.js +2 -0
- zenml/zen_server/dashboard/assets/{CsvVizualization-Bx931j4U.js → CsvVizualization-C2IiqX4I.js} +7 -7
- zenml/zen_server/dashboard/assets/DisplayDate-DYgIjlDF.js +1 -0
- zenml/zen_server/dashboard/assets/EmptyState-BMLnFVlB.js +1 -0
- zenml/zen_server/dashboard/assets/Error-CqX0VqW_.js +1 -0
- zenml/zen_server/dashboard/assets/ExecutionStatus-BoLUXR9t.js +1 -0
- zenml/zen_server/dashboard/assets/Helpbox-LFydyVwh.js +1 -0
- zenml/zen_server/dashboard/assets/Infobox-DnENC0sh.js +1 -0
- zenml/zen_server/dashboard/assets/InlineAvatar-CbJtYr0t.js +1 -0
- zenml/zen_server/dashboard/assets/{MarkdownVisualization-DsB2QZiK.js → MarkdownVisualization-xp3hhULl.js} +2 -2
- zenml/zen_server/dashboard/assets/Pagination-DEbVUupy.js +1 -0
- zenml/zen_server/dashboard/assets/PasswordChecker-DUveqlva.js +1 -0
- zenml/zen_server/dashboard/assets/SetPassword-BYBdbQDo.js +1 -0
- zenml/zen_server/dashboard/assets/SuccessStep-Nx743hll.js +1 -0
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-CKrd3UZz.js → UpdatePasswordSchemas-DF9gSzE0.js} +1 -1
- zenml/zen_server/dashboard/assets/{aws-t0gKCj_R.js → aws-BgKTfTfx.js} +1 -1
- zenml/zen_server/dashboard/assets/{check-circle-BVvhm5dy.js → check-circle-i56092KI.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-down-zcvCWmyP.js → chevron-down-D_ZlKMqH.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-right-double-CJ50E9Gr.js → chevron-right-double-BiEMg7rd.js} +1 -1
- zenml/zen_server/dashboard/assets/cloud-only-DVbIeckv.js +1 -0
- zenml/zen_server/dashboard/assets/{copy-BRhQz3j-.js → copy-BXNk6BjL.js} +1 -1
- zenml/zen_server/dashboard/assets/{database-CRRnyFWh.js → database-1xWSgZfO.js} +1 -1
- zenml/zen_server/dashboard/assets/{docker-BAonhm6G.js → docker-CQMVm_4d.js} +1 -1
- zenml/zen_server/dashboard/assets/{file-text-CbVERUON.js → file-text-CqD_iu6l.js} +1 -1
- zenml/zen_server/dashboard/assets/{help-B8rqCvqn.js → help-bu_DgLKI.js} +1 -1
- zenml/zen_server/dashboard/assets/index-C_CrU4vI.js +1 -0
- zenml/zen_server/dashboard/assets/index-DK1ynKjA.js +55 -0
- zenml/zen_server/dashboard/assets/index-inApY3KQ.css +1 -0
- zenml/zen_server/dashboard/assets/index-rK_Wuy2W.js +1 -0
- zenml/zen_server/dashboard/assets/index.esm-Corw4lXQ.js +1 -0
- zenml/zen_server/dashboard/assets/{login-mutation-Bk2tn324.js → login-mutation-BUnVASxp.js} +1 -1
- zenml/zen_server/dashboard/assets/not-found-B4VnX8gK.js +1 -0
- zenml/zen_server/dashboard/assets/package-CsUhPmou.js +1 -0
- zenml/zen_server/dashboard/assets/{page-D12Rvf0j.js → page-3efNCDeb.js} +2 -2
- zenml/zen_server/dashboard/assets/page-7zTHbhhI.js +1 -0
- zenml/zen_server/dashboard/assets/page-BEs6jK71.js +1 -0
- zenml/zen_server/dashboard/assets/page-BpSqIf4B.js +1 -0
- zenml/zen_server/dashboard/assets/{page-8vRWJ5b8.js → page-Bx6o0ARS.js} +1 -1
- zenml/zen_server/dashboard/assets/page-C43QGHTt.js +9 -0
- zenml/zen_server/dashboard/assets/page-CR0OG7ss.js +1 -0
- zenml/zen_server/dashboard/assets/{page-CBuSUrE9.js → page-CRTJ0UuR.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CUZIGO-3.js +1 -0
- zenml/zen_server/dashboard/assets/page-CaopxiU1.js +1 -0
- zenml/zen_server/dashboard/assets/{page-CCtCgG-x.js → page-Cx67M0QT.js} +1 -1
- zenml/zen_server/dashboard/assets/page-D7Z399xy.js +1 -0
- zenml/zen_server/dashboard/assets/page-D93kd7Xj.js +1 -0
- zenml/zen_server/dashboard/assets/{page-Dw9-aJV6.js → page-DKlIdAe5.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-COafKNbw.js → page-DMOYZppS.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DMsSn3dv.js +2 -0
- zenml/zen_server/dashboard/assets/{page-C6v3o0Qj.js → page-Dc_7KMQE.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DvCvroOM.js +1 -0
- zenml/zen_server/dashboard/assets/page-Hus2pr9T.js +1 -0
- zenml/zen_server/dashboard/assets/page-JyfeDUfu.js +1 -0
- zenml/zen_server/dashboard/assets/{page-CH26py0a.js → page-Sxn82W-5.js} +1 -1
- zenml/zen_server/dashboard/assets/page-TKXERe16.js +1 -0
- zenml/zen_server/dashboard/assets/page-Xu8JEjSU.js +1 -0
- zenml/zen_server/dashboard/assets/{play-circle-DK5QMJyp.js → play-circle-CNtZKDnW.js} +1 -1
- zenml/zen_server/dashboard/assets/plus-DOeLmm7C.js +1 -0
- zenml/zen_server/dashboard/assets/{terminal-B2ovgWuz.js → terminal-By9cErXc.js} +1 -1
- zenml/zen_server/dashboard/assets/{update-server-settings-mutation-bKxf7U9h.js → update-server-settings-mutation-CR8e3Sir.js} +1 -1
- zenml/zen_server/dashboard/assets/{url-CgvM-IVM.js → url-DuQMeqYA.js} +1 -1
- zenml/zen_server/dashboard/assets/{zod-DrZvVLjd.js → zod-BhoGpZ63.js} +1 -1
- zenml/zen_server/dashboard/index.html +7 -7
- zenml/zen_server/dashboard_legacy/asset-manifest.json +4 -4
- zenml/zen_server/dashboard_legacy/index.html +1 -1
- zenml/zen_server/dashboard_legacy/{precache-manifest.e7c29295aae591541ef59d1734d79387.js → precache-manifest.c8c57fb0d2132b1d3c2119e776b7dfb3.js} +4 -4
- zenml/zen_server/dashboard_legacy/service-worker.js +1 -1
- zenml/zen_server/dashboard_legacy/static/js/{main.53857d8b.chunk.js → main.382439a7.chunk.js} +2 -2
- zenml/zen_server/dashboard_legacy/static/js/{main.53857d8b.chunk.js.map → main.382439a7.chunk.js.map} +1 -1
- zenml/zen_server/deploy/helm/Chart.yaml +1 -1
- zenml/zen_server/deploy/helm/README.md +2 -2
- zenml/zen_server/feature_gate/zenml_cloud_feature_gate.py +11 -5
- zenml/zen_server/pipeline_deployment/utils.py +57 -44
- zenml/zen_server/rbac/zenml_cloud_rbac.py +11 -5
- zenml/zen_server/routers/stack_deployment_endpoints.py +144 -0
- zenml/zen_server/routers/workspaces_endpoints.py +64 -0
- zenml/zen_server/zen_server_api.py +2 -0
- zenml/zen_stores/migrations/utils.py +1 -1
- zenml/zen_stores/migrations/versions/0.61.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0d707865f404_adding_labels_to_stacks.py +30 -0
- zenml/zen_stores/rest_zen_store.py +117 -0
- zenml/zen_stores/schemas/stack_schemas.py +10 -0
- zenml/zen_stores/schemas/step_run_schemas.py +27 -11
- zenml/zen_stores/sql_zen_store.py +283 -0
- zenml/zen_stores/zen_store_interface.py +79 -0
- {zenml_nightly-0.60.0.dev20240627.dist-info → zenml_nightly-0.61.0.dev20240710.dist-info}/METADATA +32 -10
- {zenml_nightly-0.60.0.dev20240627.dist-info → zenml_nightly-0.61.0.dev20240710.dist-info}/RECORD +175 -161
- zenml/zen_server/dashboard/assets/@radix-C9DBgJhe.js +0 -77
- zenml/zen_server/dashboard/assets/@tanstack-CEbkxrhX.js +0 -30
- zenml/zen_server/dashboard/assets/AwarenessChannel-B2KR83Tr.js +0 -1
- zenml/zen_server/dashboard/assets/Cards-DSEdjsk8.js +0 -1
- zenml/zen_server/dashboard/assets/Commands-CTlhyic5.js +0 -1
- zenml/zen_server/dashboard/assets/CopyButton-CTrzKmUO.js +0 -2
- zenml/zen_server/dashboard/assets/DisplayDate-BdguISQF.js +0 -1
- zenml/zen_server/dashboard/assets/EmptyState-BkooiGtL.js +0 -1
- zenml/zen_server/dashboard/assets/Error-4sKxHad4.js +0 -1
- zenml/zen_server/dashboard/assets/Helpbox-DW21i5LD.js +0 -1
- zenml/zen_server/dashboard/assets/Infobox-C7bf70VS.js +0 -1
- zenml/zen_server/dashboard/assets/InlineAvatar-Dxrtafpg.js +0 -1
- zenml/zen_server/dashboard/assets/PageHeader-B0pUife2.js +0 -1
- zenml/zen_server/dashboard/assets/Pagination-B9WG_9cJ.js +0 -1
- zenml/zen_server/dashboard/assets/PasswordChecker-DSLBp7Vl.js +0 -1
- zenml/zen_server/dashboard/assets/SetPassword-CiNhT15a.js +0 -1
- zenml/zen_server/dashboard/assets/SuccessStep-CykrFndS.js +0 -1
- zenml/zen_server/dashboard/assets/cloud-only-Bkawp7CJ.js +0 -1
- zenml/zen_server/dashboard/assets/index-BawkpTlr.js +0 -55
- zenml/zen_server/dashboard/assets/index-CRmm7QhS.css +0 -1
- zenml/zen_server/dashboard/assets/index.esm-F7nqy9zY.js +0 -1
- zenml/zen_server/dashboard/assets/not-found-BAuhP4Jb.js +0 -1
- zenml/zen_server/dashboard/assets/page--5YvAHg3.js +0 -1
- zenml/zen_server/dashboard/assets/page-B0RAq4s_.js +0 -1
- zenml/zen_server/dashboard/assets/page-BePtEPHl.js +0 -1
- zenml/zen_server/dashboard/assets/page-C1pra1Bc.js +0 -9
- zenml/zen_server/dashboard/assets/page-CSs4C9jL.js +0 -1
- zenml/zen_server/dashboard/assets/page-Cf2XSej0.js +0 -1
- zenml/zen_server/dashboard/assets/page-ClPUAE_f.js +0 -1
- zenml/zen_server/dashboard/assets/page-D8pf2vis.js +0 -1
- zenml/zen_server/dashboard/assets/page-DHKMmIQH.js +0 -1
- zenml/zen_server/dashboard/assets/page-DMZ0VOda.js +0 -1
- zenml/zen_server/dashboard/assets/page-Dcg-yQv_.js +0 -1
- zenml/zen_server/dashboard/assets/page-DoAK5FSB.js +0 -1
- zenml/zen_server/dashboard/assets/page-iXiDqE0J.js +0 -2
- {zenml_nightly-0.60.0.dev20240627.dist-info → zenml_nightly-0.61.0.dev20240710.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.60.0.dev20240627.dist-info → zenml_nightly-0.61.0.dev20240710.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.60.0.dev20240627.dist-info → zenml_nightly-0.61.0.dev20240710.dist-info}/entry_points.txt +0 -0
@@ -43,7 +43,7 @@ class SkypilotBaseOrchestratorSettings(BaseSettings):
|
|
43
43
|
`{'tpu_vm': True, 'runtime_version': 'tpu-vm-base'}` for TPUs.
|
44
44
|
use_spot: whether to use spot instances. If None, defaults to
|
45
45
|
False.
|
46
|
-
|
46
|
+
job_recovery: the spot recovery strategy to use for the managed
|
47
47
|
spot to recover the cluster from preemption. Refer to
|
48
48
|
`recovery_strategy module <https://github.com/skypilot-org/skypilot/blob/master/sky/spot/recovery_strategy.py>`__ # pylint: disable=line-too-long
|
49
49
|
for more details.
|
@@ -103,7 +103,7 @@ class SkypilotBaseOrchestratorSettings(BaseSettings):
|
|
103
103
|
)
|
104
104
|
accelerator_args: Optional[Dict[str, str]] = None
|
105
105
|
use_spot: Optional[bool] = None
|
106
|
-
|
106
|
+
job_recovery: Optional[str] = None
|
107
107
|
region: Optional[str] = None
|
108
108
|
zone: Optional[str] = None
|
109
109
|
image_id: Union[Dict[str, str], str, None] = Field(
|
@@ -303,7 +303,7 @@ class SkypilotBaseOrchestrator(ContainerizedOrchestrator):
|
|
303
303
|
accelerators=settings.accelerators,
|
304
304
|
accelerator_args=settings.accelerator_args,
|
305
305
|
use_spot=settings.use_spot,
|
306
|
-
|
306
|
+
job_recovery=settings.job_recovery,
|
307
307
|
region=settings.region,
|
308
308
|
zone=settings.zone,
|
309
309
|
image_id=settings.image_id,
|
@@ -136,7 +136,7 @@ def main() -> None:
|
|
136
136
|
settings.disk_size, # Assuming disk_size is part of the settings
|
137
137
|
settings.disk_tier, # Assuming disk_tier is part of the settings
|
138
138
|
settings.use_spot,
|
139
|
-
settings.
|
139
|
+
settings.job_recovery,
|
140
140
|
settings.region,
|
141
141
|
settings.zone,
|
142
142
|
accelerators_hashable,
|
@@ -213,7 +213,7 @@ def main() -> None:
|
|
213
213
|
accelerators=settings.accelerators,
|
214
214
|
accelerator_args=settings.accelerator_args,
|
215
215
|
use_spot=settings.use_spot,
|
216
|
-
|
216
|
+
job_recovery=settings.job_recovery,
|
217
217
|
region=settings.region,
|
218
218
|
zone=settings.zone,
|
219
219
|
image_id=settings.image_id,
|
@@ -31,7 +31,8 @@ class SkypilotAWSIntegration(Integration):
|
|
31
31
|
"""Definition of Skypilot AWS Integration for ZenML."""
|
32
32
|
|
33
33
|
NAME = SKYPILOT_AWS
|
34
|
-
|
34
|
+
# all 0.6.x versions of skypilot[aws] are compatible
|
35
|
+
REQUIREMENTS = ["skypilot[aws]~=0.6.0"]
|
35
36
|
APT_PACKAGES = ["openssh-client", "rsync"]
|
36
37
|
|
37
38
|
@classmethod
|
@@ -33,7 +33,7 @@ class SkypilotAzureIntegration(Integration):
|
|
33
33
|
"""Definition of Skypilot (Azure) Integration for ZenML."""
|
34
34
|
|
35
35
|
NAME = SKYPILOT_AZURE
|
36
|
-
REQUIREMENTS = ["skypilot[azure]
|
36
|
+
REQUIREMENTS = ["skypilot[azure]~=0.6.0"]
|
37
37
|
APT_PACKAGES = ["openssh-client", "rsync"]
|
38
38
|
|
39
39
|
@classmethod
|
@@ -31,7 +31,7 @@ class SkypilotGCPIntegration(Integration):
|
|
31
31
|
"""Definition of Skypilot (GCP) Integration for ZenML."""
|
32
32
|
|
33
33
|
NAME = SKYPILOT_GCP
|
34
|
-
REQUIREMENTS = ["skypilot[gcp]
|
34
|
+
REQUIREMENTS = ["skypilot[gcp]~=0.6.0"]
|
35
35
|
APT_PACKAGES = ["openssh-client", "rsync"]
|
36
36
|
|
37
37
|
@classmethod
|
@@ -31,7 +31,7 @@ class SkypilotLambdaIntegration(Integration):
|
|
31
31
|
"""Definition of Skypilot Lambda Integration for ZenML."""
|
32
32
|
|
33
33
|
NAME = SKYPILOT_LAMBDA
|
34
|
-
REQUIREMENTS = ["skypilot[lambda]<=0.
|
34
|
+
REQUIREMENTS = ["skypilot[lambda]<=0.6.0"]
|
35
35
|
|
36
36
|
@classmethod
|
37
37
|
def flavors(cls) -> List[Type[Flavor]]:
|
@@ -40,7 +40,7 @@ class SkypilotLambdaOrchestratorSettings(SkypilotBaseOrchestratorSettings):
|
|
40
40
|
|
41
41
|
_UNSUPPORTED_FEATURES = {
|
42
42
|
"use_spot": "Spot instances not supported for Lambda orchestrator.",
|
43
|
-
"
|
43
|
+
"job_recovery": "Job recovery not supported for Lambda orchestrator.",
|
44
44
|
"image_id": "Custom image IDs not supported for Lambda orchestrator.",
|
45
45
|
# Add other unsupported features as needed
|
46
46
|
}
|
@@ -13,7 +13,6 @@
|
|
13
13
|
# permissions and limitations under the License.
|
14
14
|
"""Initialization for TensorBoard integration."""
|
15
15
|
|
16
|
-
import sys
|
17
16
|
from typing import List, Optional
|
18
17
|
from zenml.integrations.constants import TENSORBOARD
|
19
18
|
from zenml.integrations.integration import Integration
|
@@ -18,6 +18,9 @@ import sys
|
|
18
18
|
from typing import List, Optional
|
19
19
|
from zenml.integrations.constants import TENSORFLOW
|
20
20
|
from zenml.integrations.integration import Integration
|
21
|
+
from zenml.logger import get_logger
|
22
|
+
|
23
|
+
logger = get_logger(__name__)
|
21
24
|
|
22
25
|
|
23
26
|
class TensorflowIntegration(Integration):
|
@@ -25,20 +28,27 @@ class TensorflowIntegration(Integration):
|
|
25
28
|
|
26
29
|
NAME = TENSORFLOW
|
27
30
|
REQUIREMENTS = []
|
31
|
+
REQUIREMENTS_IGNORED_ON_UNINSTALL = ["typing-extensions"]
|
28
32
|
|
29
33
|
@classmethod
|
30
34
|
def activate(cls) -> None:
|
31
35
|
"""Activates the integration."""
|
32
36
|
# need to import this explicitly to load the Tensorflow file IO support
|
33
37
|
# for S3 and other file systems
|
34
|
-
if (
|
35
|
-
not platform.system() == "Darwin"
|
36
|
-
or not platform.machine() == "arm64"
|
37
|
-
):
|
38
|
+
if not platform.system() == "Darwin" or not platform.machine() == "arm64":
|
38
39
|
import tensorflow_io # type: ignore
|
39
40
|
|
40
41
|
from zenml.integrations.tensorflow import materializers # noqa
|
41
42
|
|
43
|
+
if sys.version_info.minor == 8:
|
44
|
+
logger.warning(
|
45
|
+
"Python 3.8 with TensorFlow is not fully "
|
46
|
+
"compatible with Pydantic 2 requirements. "
|
47
|
+
"Consider upgrading to a higher Python "
|
48
|
+
"version if you would like to use the "
|
49
|
+
"Tensorflow integration."
|
50
|
+
)
|
51
|
+
|
42
52
|
@classmethod
|
43
53
|
def get_requirements(cls, target_os: Optional[str] = None) -> List[str]:
|
44
54
|
"""Defines platform specific requirements for the integration.
|
@@ -52,13 +62,15 @@ class TensorflowIntegration(Integration):
|
|
52
62
|
target_os = target_os or platform.system()
|
53
63
|
if target_os == "Darwin" and platform.machine() == "arm64":
|
54
64
|
requirements = [
|
55
|
-
|
65
|
+
"tensorflow-macos>=2.12,<=2.15",
|
56
66
|
]
|
57
67
|
else:
|
58
68
|
requirements = [
|
59
|
-
|
69
|
+
"tensorflow>=2.12,<=2.15",
|
60
70
|
"tensorflow_io>=0.24.0",
|
61
71
|
]
|
72
|
+
if sys.version_info.minor == 8:
|
73
|
+
requirements.append("typing-extensions>=4.6.1")
|
62
74
|
return requirements
|
63
75
|
|
64
76
|
|
zenml/models/__init__.py
CHANGED
@@ -327,6 +327,7 @@ from zenml.models.v2.misc.service_connector_type import (
|
|
327
327
|
ResourceTypeModel,
|
328
328
|
)
|
329
329
|
from zenml.models.v2.misc.server_models import ServerDatabaseType, ServerModel
|
330
|
+
from zenml.models.v2.misc.full_stack import FullStackRequest
|
330
331
|
from zenml.models.v2.core.trigger import (
|
331
332
|
TriggerRequest,
|
332
333
|
TriggerFilter,
|
@@ -386,6 +387,10 @@ from zenml.models.v2.core.server_settings import (
|
|
386
387
|
ServerSettingsResponseMetadata,
|
387
388
|
ServerSettingsUpdate,
|
388
389
|
)
|
390
|
+
from zenml.models.v2.misc.stack_deployment import (
|
391
|
+
DeployedStack,
|
392
|
+
StackDeploymentInfo,
|
393
|
+
)
|
389
394
|
|
390
395
|
# ----------------------------- Forward References -----------------------------
|
391
396
|
|
@@ -405,6 +410,7 @@ EventSourceResponseMetadata.model_rebuild()
|
|
405
410
|
EventSourceResponseResources.model_rebuild()
|
406
411
|
FlavorResponseBody.model_rebuild()
|
407
412
|
FlavorResponseMetadata.model_rebuild()
|
413
|
+
FullStackRequest.model_rebuild()
|
408
414
|
LazyArtifactVersionResponse.model_rebuild()
|
409
415
|
LazyRunMetadataResponse.model_rebuild()
|
410
416
|
ModelResponseBody.model_rebuild()
|
@@ -701,11 +707,13 @@ __all__ = [
|
|
701
707
|
"WorkspaceResponseMetadata",
|
702
708
|
# V2 Misc
|
703
709
|
"AuthenticationMethodModel",
|
710
|
+
"DeployedStack",
|
704
711
|
"ServiceConnectorResourcesModel",
|
705
712
|
"ServiceConnectorTypeModel",
|
706
713
|
"ServiceConnectorTypedResourcesModel",
|
707
714
|
"ServiceConnectorRequirements",
|
708
715
|
"ResourceTypeModel",
|
716
|
+
"FullStackRequest",
|
709
717
|
"UserAuthModel",
|
710
718
|
"ExternalUserModel",
|
711
719
|
"BuildItem",
|
@@ -718,6 +726,7 @@ __all__ = [
|
|
718
726
|
"ServerModel",
|
719
727
|
"ServerDatabaseType",
|
720
728
|
"ServerDeploymentType",
|
729
|
+
"StackDeploymentInfo",
|
721
730
|
"OAuthDeviceAuthorizationRequest",
|
722
731
|
"OAuthDeviceAuthorizationResponse",
|
723
732
|
"OAuthDeviceTokenRequest",
|
@@ -238,6 +238,24 @@ class ComponentResponse(
|
|
238
238
|
max_length=STR_FIELD_MAX_LENGTH,
|
239
239
|
)
|
240
240
|
|
241
|
+
def get_analytics_metadata(self) -> Dict[str, Any]:
|
242
|
+
"""Add the component labels to analytics metadata.
|
243
|
+
|
244
|
+
Returns:
|
245
|
+
Dict of analytics metadata.
|
246
|
+
"""
|
247
|
+
metadata = super().get_analytics_metadata()
|
248
|
+
|
249
|
+
if self.labels is not None:
|
250
|
+
metadata.update(
|
251
|
+
{
|
252
|
+
label[6:]: value
|
253
|
+
for label, value in self.labels.items()
|
254
|
+
if label.startswith("zenml:")
|
255
|
+
}
|
256
|
+
)
|
257
|
+
return metadata
|
258
|
+
|
241
259
|
def get_hydrated_version(self) -> "ComponentResponse":
|
242
260
|
"""Get the hydrated version of this component.
|
243
261
|
|
zenml/models/v2/core/model.py
CHANGED
@@ -13,7 +13,6 @@
|
|
13
13
|
# permissions and limitations under the License.
|
14
14
|
"""Models representing models."""
|
15
15
|
|
16
|
-
from functools import partial
|
17
16
|
from typing import TYPE_CHECKING, ClassVar, List, Optional, Union
|
18
17
|
from uuid import UUID
|
19
18
|
|
@@ -303,7 +302,7 @@ class ModelResponse(
|
|
303
302
|
|
304
303
|
client = Client()
|
305
304
|
model_versions = depaginate(
|
306
|
-
|
305
|
+
client.list_model_versions, model_name_or_id=self.id
|
307
306
|
)
|
308
307
|
return [
|
309
308
|
mv.to_model_class(suppress_class_validation_warnings=True)
|
@@ -493,6 +493,23 @@ class ServiceConnectorResponse(
|
|
493
493
|
max_length=STR_FIELD_MAX_LENGTH,
|
494
494
|
)
|
495
495
|
|
496
|
+
def get_analytics_metadata(self) -> Dict[str, Any]:
|
497
|
+
"""Add the service connector labels to analytics metadata.
|
498
|
+
|
499
|
+
Returns:
|
500
|
+
Dict of analytics metadata.
|
501
|
+
"""
|
502
|
+
metadata = super().get_analytics_metadata()
|
503
|
+
|
504
|
+
metadata.update(
|
505
|
+
{
|
506
|
+
label[6:]: value
|
507
|
+
for label, value in self.labels.items()
|
508
|
+
if label.startswith("zenml:")
|
509
|
+
}
|
510
|
+
)
|
511
|
+
return metadata
|
512
|
+
|
496
513
|
def get_hydrated_version(self) -> "ServiceConnectorResponse":
|
497
514
|
"""Get the hydrated version of this service connector.
|
498
515
|
|
zenml/models/v2/core/stack.py
CHANGED
@@ -36,6 +36,7 @@ from zenml.models.v2.core.component import ComponentResponse
|
|
36
36
|
if TYPE_CHECKING:
|
37
37
|
from sqlalchemy.sql.elements import ColumnElement
|
38
38
|
|
39
|
+
|
39
40
|
# ------------------ Request Model ------------------
|
40
41
|
|
41
42
|
|
@@ -59,6 +60,10 @@ class StackRequest(WorkspaceScopedRequest):
|
|
59
60
|
title="A mapping of stack component types to the actual"
|
60
61
|
"instances of components of this type.",
|
61
62
|
)
|
63
|
+
labels: Optional[Dict[str, Any]] = Field(
|
64
|
+
default=None,
|
65
|
+
title="The stack labels.",
|
66
|
+
)
|
62
67
|
|
63
68
|
@property
|
64
69
|
def is_valid(self) -> bool:
|
@@ -109,6 +114,10 @@ class StackUpdate(BaseUpdate):
|
|
109
114
|
"instances of components of this type.",
|
110
115
|
default=None,
|
111
116
|
)
|
117
|
+
labels: Optional[Dict[str, Any]] = Field(
|
118
|
+
default=None,
|
119
|
+
title="The stack labels.",
|
120
|
+
)
|
112
121
|
|
113
122
|
|
114
123
|
# ------------------ Response Model ------------------
|
@@ -134,6 +143,10 @@ class StackResponseMetadata(WorkspaceScopedResponseMetadata):
|
|
134
143
|
default=None,
|
135
144
|
title="The path to the stack spec used for mlstacks deployments.",
|
136
145
|
)
|
146
|
+
labels: Optional[Dict[str, Any]] = Field(
|
147
|
+
default=None,
|
148
|
+
title="The stack labels.",
|
149
|
+
)
|
137
150
|
|
138
151
|
|
139
152
|
class StackResponseResources(WorkspaceScopedResponseResources):
|
@@ -214,6 +227,15 @@ class StackResponse(
|
|
214
227
|
"""
|
215
228
|
metadata = super().get_analytics_metadata()
|
216
229
|
metadata.update({ct: c[0].flavor for ct, c in self.components.items()})
|
230
|
+
|
231
|
+
if self.labels is not None:
|
232
|
+
metadata.update(
|
233
|
+
{
|
234
|
+
label[6:]: value
|
235
|
+
for label, value in self.labels.items()
|
236
|
+
if label.startswith("zenml:")
|
237
|
+
}
|
238
|
+
)
|
217
239
|
return metadata
|
218
240
|
|
219
241
|
@property
|
@@ -243,6 +265,15 @@ class StackResponse(
|
|
243
265
|
"""
|
244
266
|
return self.get_metadata().components
|
245
267
|
|
268
|
+
@property
|
269
|
+
def labels(self) -> Optional[Dict[str, Any]]:
|
270
|
+
"""The `labels` property.
|
271
|
+
|
272
|
+
Returns:
|
273
|
+
the value of the property.
|
274
|
+
"""
|
275
|
+
return self.get_metadata().labels
|
276
|
+
|
246
277
|
|
247
278
|
# ------------------ Filter Model ------------------
|
248
279
|
|
@@ -0,0 +1,97 @@
|
|
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
|
+
"""Models representing full stack requests."""
|
15
|
+
|
16
|
+
from typing import Any, Dict, List, Optional, Union
|
17
|
+
from uuid import UUID
|
18
|
+
|
19
|
+
from pydantic import BaseModel, Field, model_validator
|
20
|
+
|
21
|
+
from zenml.constants import STR_FIELD_MAX_LENGTH
|
22
|
+
from zenml.enums import StackComponentType
|
23
|
+
from zenml.models.v2.base.base import BaseRequest
|
24
|
+
|
25
|
+
|
26
|
+
class ServiceConnectorInfo(BaseModel):
|
27
|
+
"""Information about the service connector when creating a full stack."""
|
28
|
+
|
29
|
+
type: str
|
30
|
+
auth_method: str
|
31
|
+
configuration: Dict[str, Any] = {}
|
32
|
+
|
33
|
+
|
34
|
+
class ComponentInfo(BaseModel):
|
35
|
+
"""Information about each stack components when creating a full stack."""
|
36
|
+
|
37
|
+
flavor: str
|
38
|
+
service_connector_index: Optional[int] = Field(
|
39
|
+
default=None,
|
40
|
+
title="The id of the service connector from the list "
|
41
|
+
"`service_connectors`.",
|
42
|
+
description="The id of the service connector from the list "
|
43
|
+
"`service_connectors` from `FullStackRequest`.",
|
44
|
+
)
|
45
|
+
service_connector_resource_id: Optional[str] = None
|
46
|
+
configuration: Dict[str, Any] = {}
|
47
|
+
|
48
|
+
|
49
|
+
class FullStackRequest(BaseRequest):
|
50
|
+
"""Request model for a full-stack."""
|
51
|
+
|
52
|
+
user: Optional[UUID] = None
|
53
|
+
workspace: Optional[UUID] = None
|
54
|
+
|
55
|
+
name: str = Field(
|
56
|
+
title="The name of the stack.", max_length=STR_FIELD_MAX_LENGTH
|
57
|
+
)
|
58
|
+
description: Optional[str] = Field(
|
59
|
+
default="",
|
60
|
+
title="The description of the stack",
|
61
|
+
max_length=STR_FIELD_MAX_LENGTH,
|
62
|
+
)
|
63
|
+
labels: Optional[Dict[str, Any]] = Field(
|
64
|
+
default=None,
|
65
|
+
title="The stack labels.",
|
66
|
+
)
|
67
|
+
service_connectors: List[Union[UUID, ServiceConnectorInfo]] = Field(
|
68
|
+
default=[],
|
69
|
+
title="The service connectors dictionary for the full stack "
|
70
|
+
"registration.",
|
71
|
+
description="The UUID of an already existing service connector or "
|
72
|
+
"request information to create a service connector from "
|
73
|
+
"scratch.",
|
74
|
+
)
|
75
|
+
components: Dict[StackComponentType, Union[UUID, ComponentInfo]] = Field(
|
76
|
+
title="The mapping for the components of the full stack registration.",
|
77
|
+
description="The mapping from component types to either UUIDs of "
|
78
|
+
"existing components or request information for brand new "
|
79
|
+
"components.",
|
80
|
+
)
|
81
|
+
|
82
|
+
@model_validator(mode="after")
|
83
|
+
def _validate_indexes_in_components(self) -> "FullStackRequest":
|
84
|
+
for component in self.components.values():
|
85
|
+
if isinstance(component, ComponentInfo):
|
86
|
+
if component.service_connector_index is not None:
|
87
|
+
if (
|
88
|
+
component.service_connector_index < 0
|
89
|
+
or component.service_connector_index
|
90
|
+
>= len(self.service_connectors)
|
91
|
+
):
|
92
|
+
raise ValueError(
|
93
|
+
f"Service connector index {component.service_connector_index} "
|
94
|
+
"is out of range. Please provide a valid index referring to "
|
95
|
+
"the position in the list of service connectors."
|
96
|
+
)
|
97
|
+
return self
|
@@ -0,0 +1,66 @@
|
|
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
|
+
"""Models related to cloud stack deployments."""
|
15
|
+
|
16
|
+
from typing import Dict, List, Optional
|
17
|
+
|
18
|
+
from pydantic import BaseModel, Field
|
19
|
+
|
20
|
+
from zenml.enums import StackDeploymentProvider
|
21
|
+
from zenml.models.v2.core.service_connector import ServiceConnectorResponse
|
22
|
+
from zenml.models.v2.core.stack import StackResponse
|
23
|
+
|
24
|
+
|
25
|
+
class StackDeploymentInfo(BaseModel):
|
26
|
+
"""Information about a stack deployment."""
|
27
|
+
|
28
|
+
provider: StackDeploymentProvider = Field(
|
29
|
+
title="The provider of the stack deployment."
|
30
|
+
)
|
31
|
+
description: str = Field(
|
32
|
+
title="The description of the stack deployment.",
|
33
|
+
description="The description of the stack deployment.",
|
34
|
+
)
|
35
|
+
instructions: str = Field(
|
36
|
+
title="The instructions for deploying the stack.",
|
37
|
+
description="The instructions for deploying the stack.",
|
38
|
+
)
|
39
|
+
post_deploy_instructions: str = Field(
|
40
|
+
title="The instructions for post-deployment.",
|
41
|
+
description="The instructions for post-deployment.",
|
42
|
+
)
|
43
|
+
permissions: Dict[str, List[str]] = Field(
|
44
|
+
title="The permissions granted to ZenML to access the cloud resources.",
|
45
|
+
description="The permissions granted to ZenML to access the cloud "
|
46
|
+
"resources, as a dictionary grouping permissions by resource.",
|
47
|
+
)
|
48
|
+
locations: Dict[str, str] = Field(
|
49
|
+
title="The locations where the stack can be deployed.",
|
50
|
+
description="The locations where the stack can be deployed, as a "
|
51
|
+
"dictionary mapping location names to descriptions.",
|
52
|
+
)
|
53
|
+
|
54
|
+
|
55
|
+
class DeployedStack(BaseModel):
|
56
|
+
"""Information about a deployed stack."""
|
57
|
+
|
58
|
+
stack: StackResponse = Field(
|
59
|
+
title="The stack that was deployed.",
|
60
|
+
description="The stack that was deployed.",
|
61
|
+
)
|
62
|
+
service_connector: Optional[ServiceConnectorResponse] = Field(
|
63
|
+
default=None,
|
64
|
+
title="The service connector for the deployed stack.",
|
65
|
+
description="The service connector for the deployed stack.",
|
66
|
+
)
|
zenml/new/pipelines/pipeline.py
CHANGED
@@ -281,7 +281,7 @@ class Pipeline:
|
|
281
281
|
raise RuntimeError(
|
282
282
|
f"Cannot get the model of pipeline '{self.name}' because it has "
|
283
283
|
f"not been registered yet. Please ensure that the pipeline has "
|
284
|
-
f"been run
|
284
|
+
f"been run or built and try again."
|
285
285
|
)
|
286
286
|
|
287
287
|
@contextmanager
|
@@ -13,7 +13,6 @@
|
|
13
13
|
# permissions and limitations under the License.
|
14
14
|
"""Utilities for inputs."""
|
15
15
|
|
16
|
-
import functools
|
17
16
|
from typing import TYPE_CHECKING, Dict, List, Tuple
|
18
17
|
from uuid import UUID
|
19
18
|
|
@@ -48,13 +47,11 @@ def resolve_step_inputs(
|
|
48
47
|
"""
|
49
48
|
from zenml.models import ArtifactVersionResponse, RunMetadataResponse
|
50
49
|
|
51
|
-
list_run_steps = functools.partial(
|
52
|
-
Client().list_run_steps, pipeline_run_id=run_id
|
53
|
-
)
|
54
|
-
|
55
50
|
current_run_steps = {
|
56
51
|
run_step.name: run_step
|
57
|
-
for run_step in pagination_utils.depaginate(
|
52
|
+
for run_step in pagination_utils.depaginate(
|
53
|
+
Client().list_run_steps, pipeline_run_id=run_id
|
54
|
+
)
|
58
55
|
}
|
59
56
|
|
60
57
|
input_artifacts: Dict[str, "ArtifactVersionResponse"] = {}
|
zenml/stack/stack.py
CHANGED
@@ -13,7 +13,6 @@
|
|
13
13
|
# permissions and limitations under the License.
|
14
14
|
"""Implementation of the ZenML Stack class."""
|
15
15
|
|
16
|
-
import functools
|
17
16
|
import itertools
|
18
17
|
import json
|
19
18
|
import os
|
@@ -155,11 +154,9 @@ class Stack:
|
|
155
154
|
|
156
155
|
# Run a hydrated list call once to avoid one request per component
|
157
156
|
component_models = pagination_utils.depaginate(
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
hydrate=True,
|
162
|
-
)
|
157
|
+
Client().list_stack_components,
|
158
|
+
stack_id=stack_model.id,
|
159
|
+
hydrate=True,
|
163
160
|
)
|
164
161
|
|
165
162
|
stack_components = {
|
@@ -0,0 +1,14 @@
|
|
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
|
+
"""ZenML Stack Deployments."""
|