zenml-nightly 0.66.0.dev20240919__py3-none-any.whl → 0.66.0.dev20240927__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.
- zenml/VERSION +1 -1
- zenml/cli/__init__.py +7 -0
- zenml/cli/base.py +2 -2
- zenml/cli/pipeline.py +21 -0
- zenml/cli/utils.py +14 -11
- zenml/client.py +68 -3
- zenml/config/step_configurations.py +0 -5
- zenml/constants.py +3 -0
- zenml/enums.py +2 -0
- zenml/integrations/__init__.py +1 -0
- zenml/integrations/aws/flavors/sagemaker_orchestrator_flavor.py +76 -7
- zenml/integrations/aws/orchestrators/sagemaker_orchestrator.py +370 -115
- zenml/integrations/azure/orchestrators/azureml_orchestrator.py +157 -4
- zenml/integrations/constants.py +1 -0
- zenml/integrations/deepchecks/__init__.py +1 -1
- zenml/integrations/deepchecks/data_validators/deepchecks_data_validator.py +55 -14
- zenml/integrations/deepchecks/validation_checks.py +62 -5
- zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +207 -18
- zenml/integrations/lightning/__init__.py +1 -1
- zenml/integrations/lightning/flavors/lightning_orchestrator_flavor.py +9 -0
- zenml/integrations/lightning/orchestrators/lightning_orchestrator.py +18 -17
- zenml/integrations/lightning/orchestrators/lightning_orchestrator_entrypoint.py +2 -6
- zenml/integrations/mlflow/__init__.py +14 -15
- zenml/integrations/mlflow/steps/mlflow_registry.py +2 -0
- zenml/integrations/skypilot/orchestrators/skypilot_base_vm_orchestrator.py +38 -26
- zenml/integrations/skypilot_kubernetes/__init__.py +52 -0
- zenml/integrations/skypilot_kubernetes/flavors/__init__.py +26 -0
- zenml/integrations/skypilot_kubernetes/flavors/skypilot_orchestrator_kubernetes_vm_flavor.py +125 -0
- zenml/integrations/skypilot_kubernetes/orchestrators/__init__.py +25 -0
- zenml/integrations/skypilot_kubernetes/orchestrators/skypilot_kubernetes_vm_orchestrator.py +74 -0
- zenml/integrations/tensorboard/visualizers/tensorboard_visualizer.py +1 -1
- zenml/models/v2/base/filter.py +315 -149
- zenml/models/v2/base/scoped.py +5 -2
- zenml/models/v2/core/artifact_version.py +69 -8
- zenml/models/v2/core/model.py +43 -6
- zenml/models/v2/core/model_version.py +49 -1
- zenml/models/v2/core/model_version_artifact.py +18 -3
- zenml/models/v2/core/model_version_pipeline_run.py +18 -4
- zenml/models/v2/core/pipeline.py +108 -1
- zenml/models/v2/core/pipeline_run.py +172 -21
- zenml/models/v2/core/run_template.py +53 -1
- zenml/models/v2/core/stack.py +33 -5
- zenml/models/v2/core/step_run.py +7 -0
- zenml/new/pipelines/pipeline.py +4 -0
- zenml/new/pipelines/run_utils.py +4 -1
- zenml/orchestrators/base_orchestrator.py +41 -12
- zenml/stack/stack.py +11 -2
- zenml/utils/env_utils.py +54 -1
- zenml/utils/string_utils.py +50 -0
- zenml/zen_server/cloud_utils.py +33 -8
- zenml/zen_server/dashboard/assets/{404-iO8vpun1.js → 404-Y50hSt65.js} +1 -1
- zenml/zen_server/dashboard/assets/{@reactflow-B6kq9fJZ.js → @reactflow-ytavUpwh.js} +1 -1
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-xLR9a1iw.js +1 -0
- zenml/zen_server/dashboard/assets/{CodeSnippet-DNWdQmbo.js → CodeSnippet-IxXNxUDa.js} +2 -2
- zenml/zen_server/dashboard/assets/{CollapsibleCard-B2OVjWYE.js → CollapsibleCard-BhutZbBL.js} +1 -1
- zenml/zen_server/dashboard/assets/{Commands-DsoaVElZ.js → Commands-Bf-rd1z8.js} +1 -1
- zenml/zen_server/dashboard/assets/ComponentBadge-gKR1OIwG.js +1 -0
- zenml/zen_server/dashboard/assets/{CopyButton-BqE_-PHO.js → CopyButton-DcFHidFJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{CsvVizualization-Dyasr2jU.js → CsvVizualization-QSbjrfxw.js} +1 -1
- zenml/zen_server/dashboard/assets/{DialogItem-Cz1VLRwa.js → DialogItem-Cd3HqST4.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-DorJD_va.js → Error-BhwdmqK7.js} +1 -1
- zenml/zen_server/dashboard/assets/{ExecutionStatus-CIfQTutR.js → ExecutionStatus-D6r6aK8J.js} +1 -1
- zenml/zen_server/dashboard/assets/{Helpbox-CmfvtNeq.js → Helpbox-0pBpTwTm.js} +1 -1
- zenml/zen_server/dashboard/assets/Infobox-BTK_EUKT.js +1 -0
- zenml/zen_server/dashboard/assets/{InlineAvatar-Ds2ZFHPc.js → InlineAvatar-CA3DFMcM.js} +1 -1
- zenml/zen_server/dashboard/assets/Partials-QLOZw624.js +1 -0
- zenml/zen_server/dashboard/assets/{ProviderIcon-BOQJgapd.js → ProviderIcon-C16CCIN4.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderRadio-BsYBw9YA.js → ProviderRadio-D3FuCHf3.js} +1 -1
- zenml/zen_server/dashboard/assets/{SearchField-W3GXpLlI.js → SearchField-BzmfxS0L.js} +1 -1
- zenml/zen_server/dashboard/assets/SecretTooltip-BaMwHF-Q.js +1 -0
- zenml/zen_server/dashboard/assets/{SetPassword-B-0a8UCj.js → SetPassword-DuIC65H9.js} +1 -1
- zenml/zen_server/dashboard/assets/{Tick-i1DYsVcX.js → Tick-DJTCF0Re.js} +1 -1
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-C6Zb7ASL.js → UpdatePasswordSchemas-CUm-DMpw.js} +1 -1
- zenml/zen_server/dashboard/assets/UsageReason-CKw0juLF.js +1 -0
- zenml/zen_server/dashboard/assets/{WizardFooter-BHbO7zOa.js → WizardFooter-Cv9ApYWU.js} +1 -1
- zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-BBEe6I9-.js → all-pipeline-runs-query-BA3R2Sey.js} +1 -1
- zenml/zen_server/dashboard/assets/{cloud-only-BuP4Kt_7.js → cloud-only-BB4BVa6E.js} +1 -1
- zenml/zen_server/dashboard/assets/{create-stack-B2x2d4r1.js → create-stack-F29xAUEx.js} +1 -1
- zenml/zen_server/dashboard/assets/delete-run-CP0pcJ3U.js +1 -0
- zenml/zen_server/dashboard/assets/{form-schemas-Bap0f854.js → form-schemas-BKXwSDK2.js} +1 -1
- zenml/zen_server/dashboard/assets/index-BhJ6ZJxv.css +1 -0
- zenml/zen_server/dashboard/assets/{index-B9wVwe7u.js → index-Ci0nJ8EZ.js} +5 -5
- zenml/zen_server/dashboard/assets/{index-DFi8BroH.js → index-D-mtoBj3.js} +1 -1
- zenml/zen_server/dashboard/assets/{login-mutation-DwxUz8VA.js → login-mutation-ax6iL2Mb.js} +1 -1
- zenml/zen_server/dashboard/assets/{not-found-D5i9DunU.js → not-found-DbjllLY_.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-oS4hqS8M.js → page-3qPX9WYH.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-iwoJnwPv.js → page-6mfzecin.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DGMa3ZQL.js → page-8kYmrh0B.js} +1 -1
- zenml/zen_server/dashboard/assets/page-B1n7_W7z.js +1 -0
- zenml/zen_server/dashboard/assets/page-BDg1F-Ug.js +6 -0
- zenml/zen_server/dashboard/assets/{page-xQG6GmFJ.js → page-BXarY9K2.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BZZhLo2u.js +1 -0
- zenml/zen_server/dashboard/assets/page-Bbf_oBjn.js +1 -0
- zenml/zen_server/dashboard/assets/page-BjjuBvZG.js +9 -0
- zenml/zen_server/dashboard/assets/{page-J0s8Sq3N.js → page-BukXK1Aa.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CHaQkFK5.js +1 -0
- zenml/zen_server/dashboard/assets/{page-BitfWsiW.js → page-CKHNAq7z.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DE03uZZR.js → page-CS0SYFK8.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-WCQ659by.js → page-CvKnNK1S.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CrSdkteO.js → page-DGM1CbYT.js} +2 -2
- zenml/zen_server/dashboard/assets/{page-DQGCHKrQ.js → page-DMSLXKGT.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DOmIZ2ra.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DgM-N9RL.js → page-DRfcRK1w.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DYVmJ9_w.js +3 -0
- zenml/zen_server/dashboard/assets/{page-BiF8hLbO.js → page-DcTjHmYZ.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DuqYMYmH.js +1 -0
- zenml/zen_server/dashboard/assets/page-Dwow2doB.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DQdwZZ9x.js → page-HkVBdZl6.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-bimkItOg.js → page-MAXyfXBq.js} +1 -1
- zenml/zen_server/dashboard/assets/page-miU2rhYG.js +1 -0
- zenml/zen_server/dashboard/assets/page-p0BhSAWx.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DFCK65G9.js → page-uORspyRu.js} +1 -1
- zenml/zen_server/dashboard/assets/persist-BxIR2XZs.js +1 -0
- zenml/zen_server/dashboard/assets/{persist-xsYgVtR1.js → persist-CfJMar_k.js} +1 -1
- zenml/zen_server/dashboard/assets/sharedSchema-vub0rii3.js +14 -0
- zenml/zen_server/dashboard/assets/stack-detail-query-DQcyzG-2.js +1 -0
- zenml/zen_server/dashboard/assets/tick-circle-m-hJG8i9.js +1 -0
- zenml/zen_server/dashboard/assets/{update-server-settings-mutation-DNqmQXDM.js → update-server-settings-mutation-FGVP7X2U.js} +1 -1
- zenml/zen_server/dashboard/assets/{url-DwbuKk1b.js → url-CbAPzsmT.js} +1 -1
- zenml/zen_server/dashboard/index.html +4 -4
- 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.290b95d5b43efa3368b3dc63d20c4782.js → precache-manifest.6d320abb70db612019dda6c4948e7a90.js} +4 -4
- zenml/zen_server/dashboard_legacy/service-worker.js +1 -1
- zenml/zen_server/dashboard_legacy/static/js/{main.840d1bf0.chunk.js → main.fa9299d5.chunk.js} +2 -2
- zenml/zen_server/dashboard_legacy/static/js/{main.840d1bf0.chunk.js.map → main.fa9299d5.chunk.js.map} +1 -1
- zenml/zen_server/rbac/utils.py +6 -2
- zenml/zen_server/routers/runs_endpoints.py +89 -3
- zenml/zen_stores/sql_zen_store.py +1 -0
- {zenml_nightly-0.66.0.dev20240919.dist-info → zenml_nightly-0.66.0.dev20240927.dist-info}/METADATA +8 -1
- {zenml_nightly-0.66.0.dev20240919.dist-info → zenml_nightly-0.66.0.dev20240927.dist-info}/RECORD +134 -126
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-BXeSvmMY.js +0 -1
- zenml/zen_server/dashboard/assets/EditSecretDialog-Du423_3U.js +0 -1
- zenml/zen_server/dashboard/assets/Infobox-BL9NOS37.js +0 -1
- zenml/zen_server/dashboard/assets/Partials-DX-8iEa1.js +0 -1
- zenml/zen_server/dashboard/assets/UsageReason-CCnzmwS8.js +0 -1
- zenml/zen_server/dashboard/assets/index-6DYjZgDn.css +0 -1
- zenml/zen_server/dashboard/assets/page-BFuJICXM.js +0 -9
- zenml/zen_server/dashboard/assets/page-CDOQLrPC.js +0 -1
- zenml/zen_server/dashboard/assets/page-CEJWu1YO.js +0 -1
- zenml/zen_server/dashboard/assets/page-CIbehp7V.js +0 -1
- zenml/zen_server/dashboard/assets/page-CLiRGfWo.js +0 -1
- zenml/zen_server/dashboard/assets/page-CV44mQn9.js +0 -1
- zenml/zen_server/dashboard/assets/page-D5F3DJjm.js +0 -1
- zenml/zen_server/dashboard/assets/page-DI-qTWrm.js +0 -1
- zenml/zen_server/dashboard/assets/page-Dt8VgzbE.js +0 -1
- zenml/zen_server/dashboard/assets/page-oSqx9dkH.js +0 -1
- zenml/zen_server/dashboard/assets/page-p3GqEAUW.js +0 -1
- zenml/zen_server/dashboard/assets/page-qvcUVPE-.js +0 -1
- zenml/zen_server/dashboard/assets/persist-mEZN_fgH.js +0 -1
- zenml/zen_server/dashboard/assets/sharedSchema-BfZcy7aP.js +0 -14
- zenml/zen_server/dashboard/assets/stack-detail-query-CU4egfhp.js +0 -1
- {zenml_nightly-0.66.0.dev20240919.dist-info → zenml_nightly-0.66.0.dev20240927.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.66.0.dev20240919.dist-info → zenml_nightly-0.66.0.dev20240927.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.66.0.dev20240919.dist-info → zenml_nightly-0.66.0.dev20240927.dist-info}/entry_points.txt +0 -0
@@ -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 Skypilot Kubernetes integration for ZenML.
|
15
|
+
|
16
|
+
The Skypilot integration sub-module powers an alternative to the local
|
17
|
+
orchestrator for a remote orchestration of ZenML pipelines on VMs.
|
18
|
+
"""
|
19
|
+
from typing import List, Type
|
20
|
+
|
21
|
+
from zenml.integrations.constants import (
|
22
|
+
SKYPILOT_KUBERNETES,
|
23
|
+
)
|
24
|
+
from zenml.integrations.integration import Integration
|
25
|
+
from zenml.stack import Flavor
|
26
|
+
|
27
|
+
SKYPILOT_KUBERNETES_ORCHESTRATOR_FLAVOR = "vm_kubernetes"
|
28
|
+
|
29
|
+
|
30
|
+
class SkypilotKubernetesIntegration(Integration):
|
31
|
+
"""Definition of Skypilot Kubernetes Integration for ZenML."""
|
32
|
+
|
33
|
+
NAME = SKYPILOT_KUBERNETES
|
34
|
+
# all 0.6.x versions of skypilot[kubernetes] are compatible
|
35
|
+
REQUIREMENTS = ["skypilot[kubernetes]~=0.6.1"]
|
36
|
+
APT_PACKAGES = ["openssh-client", "rsync"]
|
37
|
+
|
38
|
+
@classmethod
|
39
|
+
def flavors(cls) -> List[Type[Flavor]]:
|
40
|
+
"""Declare the stack component flavors for the Skypilot Kubernetes integration.
|
41
|
+
|
42
|
+
Returns:
|
43
|
+
List of stack component flavors for this integration.
|
44
|
+
"""
|
45
|
+
from zenml.integrations.skypilot_kubernetes.flavors import (
|
46
|
+
SkypilotKubernetesOrchestratorFlavor,
|
47
|
+
)
|
48
|
+
|
49
|
+
return [SkypilotKubernetesOrchestratorFlavor]
|
50
|
+
|
51
|
+
|
52
|
+
SkypilotKubernetesIntegration.check_installation()
|
@@ -0,0 +1,26 @@
|
|
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
|
+
"""Skypilot integration flavor for Skypilot Kubernetes orchestrator."""
|
15
|
+
|
16
|
+
from zenml.integrations.skypilot_kubernetes.flavors.skypilot_orchestrator_kubernetes_vm_flavor import (
|
17
|
+
SkypilotKubernetesOrchestratorConfig,
|
18
|
+
SkypilotKubernetesOrchestratorFlavor,
|
19
|
+
SkypilotKubernetesOrchestratorSettings,
|
20
|
+
)
|
21
|
+
|
22
|
+
__all__ = [
|
23
|
+
"SkypilotKubernetesOrchestratorConfig",
|
24
|
+
"SkypilotKubernetesOrchestratorFlavor",
|
25
|
+
"SkypilotKubernetesOrchestratorSettings",
|
26
|
+
]
|
@@ -0,0 +1,125 @@
|
|
1
|
+
# Copyright (c) ZenML GmbH 2023. 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
|
+
"""Skypilot orchestrator Kubernetes flavor."""
|
15
|
+
|
16
|
+
from typing import TYPE_CHECKING, Optional, Type
|
17
|
+
|
18
|
+
from zenml.constants import KUBERNETES_CLUSTER_RESOURCE_TYPE
|
19
|
+
from zenml.integrations.skypilot.flavors.skypilot_orchestrator_base_vm_config import (
|
20
|
+
SkypilotBaseOrchestratorConfig,
|
21
|
+
SkypilotBaseOrchestratorSettings,
|
22
|
+
)
|
23
|
+
from zenml.integrations.skypilot_kubernetes import (
|
24
|
+
SKYPILOT_KUBERNETES_ORCHESTRATOR_FLAVOR,
|
25
|
+
)
|
26
|
+
from zenml.logger import get_logger
|
27
|
+
from zenml.models import ServiceConnectorRequirements
|
28
|
+
from zenml.orchestrators import BaseOrchestratorConfig, BaseOrchestratorFlavor
|
29
|
+
|
30
|
+
if TYPE_CHECKING:
|
31
|
+
from zenml.integrations.skypilot_kubernetes.orchestrators import (
|
32
|
+
SkypilotKubernetesOrchestrator,
|
33
|
+
)
|
34
|
+
|
35
|
+
|
36
|
+
logger = get_logger(__name__)
|
37
|
+
|
38
|
+
|
39
|
+
class SkypilotKubernetesOrchestratorSettings(SkypilotBaseOrchestratorSettings):
|
40
|
+
"""Skypilot orchestrator settings."""
|
41
|
+
|
42
|
+
|
43
|
+
class SkypilotKubernetesOrchestratorConfig(
|
44
|
+
SkypilotBaseOrchestratorConfig, SkypilotKubernetesOrchestratorSettings
|
45
|
+
):
|
46
|
+
"""Skypilot orchestrator config."""
|
47
|
+
|
48
|
+
|
49
|
+
class SkypilotKubernetesOrchestratorFlavor(BaseOrchestratorFlavor):
|
50
|
+
"""Flavor for the Skypilot Kubernetes orchestrator."""
|
51
|
+
|
52
|
+
@property
|
53
|
+
def name(self) -> str:
|
54
|
+
"""Name of the orchestrator flavor.
|
55
|
+
|
56
|
+
Returns:
|
57
|
+
Name of the orchestrator flavor.
|
58
|
+
"""
|
59
|
+
return SKYPILOT_KUBERNETES_ORCHESTRATOR_FLAVOR
|
60
|
+
|
61
|
+
@property
|
62
|
+
def service_connector_requirements(
|
63
|
+
self,
|
64
|
+
) -> Optional[ServiceConnectorRequirements]:
|
65
|
+
"""Service connector resource requirements for service connectors.
|
66
|
+
|
67
|
+
Specifies resource requirements that are used to filter the available
|
68
|
+
service connector types that are compatible with this flavor.
|
69
|
+
|
70
|
+
Returns:
|
71
|
+
Requirements for compatible service connectors, if a service
|
72
|
+
connector is required for this flavor.
|
73
|
+
"""
|
74
|
+
return ServiceConnectorRequirements(
|
75
|
+
resource_type=KUBERNETES_CLUSTER_RESOURCE_TYPE,
|
76
|
+
)
|
77
|
+
|
78
|
+
@property
|
79
|
+
def docs_url(self) -> Optional[str]:
|
80
|
+
"""A url to point at docs explaining this flavor.
|
81
|
+
|
82
|
+
Returns:
|
83
|
+
A flavor docs url.
|
84
|
+
"""
|
85
|
+
return self.generate_default_docs_url()
|
86
|
+
|
87
|
+
@property
|
88
|
+
def sdk_docs_url(self) -> Optional[str]:
|
89
|
+
"""A url to point at SDK docs explaining this flavor.
|
90
|
+
|
91
|
+
Returns:
|
92
|
+
A flavor SDK docs url.
|
93
|
+
"""
|
94
|
+
return self.generate_default_sdk_docs_url()
|
95
|
+
|
96
|
+
@property
|
97
|
+
def logo_url(self) -> str:
|
98
|
+
"""A url to represent the flavor in the dashboard.
|
99
|
+
|
100
|
+
Returns:
|
101
|
+
The flavor logo.
|
102
|
+
"""
|
103
|
+
return "https://public-flavor-logos.s3.eu-central-1.amazonaws.com/orchestrator/kubernetes-skypilot.png"
|
104
|
+
|
105
|
+
@property
|
106
|
+
def config_class(self) -> Type[BaseOrchestratorConfig]:
|
107
|
+
"""Config class for the base orchestrator flavor.
|
108
|
+
|
109
|
+
Returns:
|
110
|
+
The config class.
|
111
|
+
"""
|
112
|
+
return SkypilotKubernetesOrchestratorConfig
|
113
|
+
|
114
|
+
@property
|
115
|
+
def implementation_class(self) -> Type["SkypilotKubernetesOrchestrator"]:
|
116
|
+
"""Implementation class for this flavor.
|
117
|
+
|
118
|
+
Returns:
|
119
|
+
Implementation class for this flavor.
|
120
|
+
"""
|
121
|
+
from zenml.integrations.skypilot_kubernetes.orchestrators import (
|
122
|
+
SkypilotKubernetesOrchestrator,
|
123
|
+
)
|
124
|
+
|
125
|
+
return SkypilotKubernetesOrchestrator
|
@@ -0,0 +1,25 @@
|
|
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 Skypilot Kubernetes ZenML orchestrator."""
|
15
|
+
|
16
|
+
from zenml.integrations.skypilot.orchestrators.skypilot_base_vm_orchestrator import ( # noqa
|
17
|
+
SkypilotBaseOrchestrator,
|
18
|
+
)
|
19
|
+
from zenml.integrations.skypilot_kubernetes.orchestrators.skypilot_kubernetes_vm_orchestrator import ( # noqa
|
20
|
+
SkypilotKubernetesOrchestrator,
|
21
|
+
)
|
22
|
+
__all__ = [
|
23
|
+
"SkypilotBaseOrchestrator",
|
24
|
+
"SkypilotKubernetesOrchestrator",
|
25
|
+
]
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# Copyright (c) ZenML GmbH 2023. 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
|
+
"""Implementation of the a Skypilot based Kubernetes VM orchestrator."""
|
15
|
+
|
16
|
+
from typing import TYPE_CHECKING, Optional, Type, cast
|
17
|
+
|
18
|
+
import sky
|
19
|
+
|
20
|
+
from zenml.integrations.skypilot.orchestrators.skypilot_base_vm_orchestrator import (
|
21
|
+
SkypilotBaseOrchestrator,
|
22
|
+
)
|
23
|
+
from zenml.integrations.skypilot_kubernetes.flavors.skypilot_orchestrator_kubernetes_vm_flavor import (
|
24
|
+
SkypilotKubernetesOrchestratorConfig,
|
25
|
+
SkypilotKubernetesOrchestratorSettings,
|
26
|
+
)
|
27
|
+
from zenml.logger import get_logger
|
28
|
+
|
29
|
+
if TYPE_CHECKING:
|
30
|
+
from zenml.config.base_settings import BaseSettings
|
31
|
+
|
32
|
+
logger = get_logger(__name__)
|
33
|
+
|
34
|
+
|
35
|
+
class SkypilotKubernetesOrchestrator(SkypilotBaseOrchestrator):
|
36
|
+
"""Orchestrator responsible for running pipelines remotely in a VM on Kubernetes.
|
37
|
+
|
38
|
+
This orchestrator does not support running on a schedule.
|
39
|
+
"""
|
40
|
+
|
41
|
+
@property
|
42
|
+
def cloud(self) -> sky.clouds.Cloud:
|
43
|
+
"""The type of sky cloud to use.
|
44
|
+
|
45
|
+
Returns:
|
46
|
+
A `sky.clouds.Cloud` instance.
|
47
|
+
"""
|
48
|
+
return sky.clouds.Kubernetes()
|
49
|
+
|
50
|
+
@property
|
51
|
+
def config(self) -> SkypilotKubernetesOrchestratorConfig:
|
52
|
+
"""Returns the `SkypilotKubernetesOrchestratorConfig` config.
|
53
|
+
|
54
|
+
Returns:
|
55
|
+
The configuration.
|
56
|
+
"""
|
57
|
+
return cast(SkypilotKubernetesOrchestratorConfig, self._config)
|
58
|
+
|
59
|
+
@property
|
60
|
+
def settings_class(self) -> Optional[Type["BaseSettings"]]:
|
61
|
+
"""Settings class for the Skypilot orchestrator.
|
62
|
+
|
63
|
+
Returns:
|
64
|
+
The settings class.
|
65
|
+
"""
|
66
|
+
return SkypilotKubernetesOrchestratorSettings
|
67
|
+
|
68
|
+
def prepare_environment_variable(self, set: bool = True) -> None:
|
69
|
+
"""Set up Environment variables that are required for the orchestrator.
|
70
|
+
|
71
|
+
Args:
|
72
|
+
set: Whether to set the environment variables or not.
|
73
|
+
"""
|
74
|
+
pass
|
@@ -194,7 +194,7 @@ def get_step(pipeline_name: str, step_name: str) -> "StepRunResponse":
|
|
194
194
|
Raises:
|
195
195
|
RuntimeError: If the step is not found.
|
196
196
|
"""
|
197
|
-
runs = Client().list_pipeline_runs(
|
197
|
+
runs = Client().list_pipeline_runs(pipeline=pipeline_name)
|
198
198
|
if runs.total == 0:
|
199
199
|
raise RuntimeError(
|
200
200
|
f"No pipeline runs for pipeline `{pipeline_name}` were found"
|