zenml-nightly 0.58.2.dev20240626__py3-none-any.whl → 0.62.0.dev20240726__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- README.md +31 -10
- RELEASE_NOTES.md +280 -0
- zenml/VERSION +1 -1
- zenml/__init__.py +2 -0
- 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 +812 -39
- zenml/cli/stack_components.py +9 -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 +13 -1
- zenml/container_registries/base_container_registry.py +1 -0
- zenml/enums.py +23 -0
- zenml/event_hub/event_hub.py +5 -8
- zenml/integrations/__init__.py +1 -0
- zenml/integrations/aws/__init__.py +1 -0
- zenml/integrations/azure/__init__.py +3 -2
- zenml/integrations/constants.py +1 -0
- zenml/integrations/databricks/__init__.py +52 -0
- zenml/integrations/databricks/flavors/__init__.py +30 -0
- zenml/integrations/databricks/flavors/databricks_model_deployer_flavor.py +118 -0
- zenml/integrations/databricks/flavors/databricks_orchestrator_flavor.py +147 -0
- zenml/integrations/databricks/model_deployers/__init__.py +20 -0
- zenml/integrations/databricks/model_deployers/databricks_model_deployer.py +249 -0
- zenml/integrations/databricks/orchestrators/__init__.py +20 -0
- zenml/integrations/databricks/orchestrators/databricks_orchestrator.py +497 -0
- zenml/integrations/databricks/orchestrators/databricks_orchestrator_entrypoint_config.py +97 -0
- zenml/integrations/databricks/services/__init__.py +19 -0
- zenml/integrations/databricks/services/databricks_deployment.py +407 -0
- zenml/integrations/databricks/utils/__init__.py +14 -0
- zenml/integrations/databricks/utils/databricks_utils.py +87 -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/google_credentials_mixin.py +1 -1
- zenml/integrations/gcp/service_connectors/gcp_service_connector.py +320 -64
- zenml/integrations/great_expectations/data_validators/ge_data_validator.py +12 -8
- zenml/integrations/huggingface/__init__.py +1 -0
- zenml/integrations/huggingface/materializers/huggingface_datasets_materializer.py +88 -3
- zenml/integrations/huggingface/steps/accelerate_runner.py +1 -7
- 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/kubernetes/orchestrators/kubernetes_orchestrator.py +1 -13
- zenml/integrations/kubernetes/orchestrators/manifest_utils.py +22 -4
- zenml/integrations/kubernetes/pod_settings.py +4 -0
- zenml/integrations/label_studio/annotators/label_studio_annotator.py +1 -0
- zenml/integrations/langchain/__init__.py +1 -0
- zenml/integrations/lightgbm/__init__.py +1 -0
- zenml/integrations/mlflow/__init__.py +4 -2
- zenml/integrations/mlflow/model_registries/mlflow_model_registry.py +6 -2
- zenml/integrations/mlflow/services/mlflow_deployment.py +1 -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 -3
- 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/logging/step_logging.py +34 -35
- zenml/materializers/built_in_materializer.py +1 -1
- zenml/materializers/cloudpickle_materializer.py +1 -1
- zenml/model/model.py +1 -1
- zenml/models/__init__.py +11 -0
- zenml/models/v2/core/component.py +47 -0
- zenml/models/v2/core/model.py +1 -2
- zenml/models/v2/core/server_settings.py +0 -20
- zenml/models/v2/core/service_connector.py +17 -0
- zenml/models/v2/core/stack.py +31 -0
- zenml/models/v2/misc/full_stack.py +129 -0
- zenml/models/v2/misc/stack_deployment.py +91 -0
- zenml/new/pipelines/pipeline.py +1 -1
- zenml/new/pipelines/run_utils.py +1 -1
- zenml/orchestrators/__init__.py +4 -0
- zenml/orchestrators/input_utils.py +3 -6
- zenml/orchestrators/step_launcher.py +1 -0
- zenml/orchestrators/wheeled_orchestrator.py +147 -0
- zenml/service_connectors/service_connector_utils.py +408 -0
- zenml/stack/stack.py +3 -6
- zenml/stack_deployments/__init__.py +14 -0
- zenml/stack_deployments/aws_stack_deployment.py +254 -0
- zenml/stack_deployments/azure_stack_deployment.py +179 -0
- zenml/stack_deployments/gcp_stack_deployment.py +269 -0
- zenml/stack_deployments/stack_deployment.py +218 -0
- zenml/stack_deployments/utils.py +48 -0
- zenml/steps/base_step.py +7 -5
- zenml/utils/function_utils.py +2 -2
- zenml/utils/pagination_utils.py +7 -5
- zenml/utils/pipeline_docker_image_builder.py +105 -68
- zenml/utils/pydantic_utils.py +6 -5
- zenml/utils/source_utils.py +4 -1
- zenml/zen_server/cloud_utils.py +18 -3
- zenml/zen_server/dashboard/assets/{404-CDPQCl4D.js → 404-B_YdvmwS.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-CHBapDaj.js → @reactflow-l_1hUr1S.js} +2 -2
- zenml/zen_server/dashboard/assets/@tanstack-DYiOyJUL.js +22 -0
- zenml/zen_server/dashboard/assets/AwarenessChannel-CFg5iX4Z.js +1 -0
- zenml/zen_server/dashboard/assets/{CodeSnippet-BidtnWOi.js → CodeSnippet-Dvkx_82E.js} +2 -2
- zenml/zen_server/dashboard/assets/CollapsibleCard-opiuBHHc.js +1 -0
- zenml/zen_server/dashboard/assets/Commands-DoN1xrEq.js +1 -0
- zenml/zen_server/dashboard/assets/CopyButton-Cr7xYEPb.js +2 -0
- zenml/zen_server/dashboard/assets/{CsvVizualization-BOuez-fG.js → CsvVizualization-Ck-nZ43m.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-kLtljEOM.js +1 -0
- zenml/zen_server/dashboard/assets/ExecutionStatus-DguLLgTK.js +1 -0
- zenml/zen_server/dashboard/assets/Helpbox-BXUMP21n.js +1 -0
- zenml/zen_server/dashboard/assets/Infobox-DSt0O-dm.js +1 -0
- zenml/zen_server/dashboard/assets/InlineAvatar-xsrsIGE-.js +1 -0
- zenml/zen_server/dashboard/assets/{MarkdownVisualization-DsB2QZiK.js → MarkdownVisualization-xp3hhULl.js} +2 -2
- zenml/zen_server/dashboard/assets/Pagination-C6X-mifw.js +1 -0
- zenml/zen_server/dashboard/assets/PasswordChecker-DUveqlva.js +1 -0
- zenml/zen_server/dashboard/assets/SetPassword-BXGTWiwj.js +1 -0
- zenml/zen_server/dashboard/assets/SuccessStep-DZC60t0x.js +1 -0
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-DnM-c11H.js → UpdatePasswordSchemas-DGvwFWO1.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-right-double-CJ50E9Gr.js → chevron-right-double-CZBOf6JM.js} +1 -1
- zenml/zen_server/dashboard/assets/cloud-only-C_yFCAkP.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-BczVOqUf.js +55 -0
- zenml/zen_server/dashboard/assets/index-EpMIKgrI.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-wzzl23C6.js → login-mutation-CrHrndTI.js} +1 -1
- zenml/zen_server/dashboard/assets/logs-D8k8BVFf.js +1 -0
- zenml/zen_server/dashboard/assets/not-found-DYa4pC-C.js +1 -0
- zenml/zen_server/dashboard/assets/package-B3fWP-Dh.js +1 -0
- zenml/zen_server/dashboard/assets/page-1h_sD1jz.js +1 -0
- zenml/zen_server/dashboard/assets/{page-yN4rZ-ZS.js → page-1iL8aMqs.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Bi5AI0S7.js → page-2grKx_MY.js} +1 -1
- zenml/zen_server/dashboard/assets/page-5NCOHOsy.js +1 -0
- zenml/zen_server/dashboard/assets/page-8a4UMKXZ.js +1 -0
- zenml/zen_server/dashboard/assets/{page-AQKopn_4.js → page-B6h3iaHJ.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BDns21Iz.js +1 -0
- zenml/zen_server/dashboard/assets/{page-BmkSiYeQ.js → page-BhgCDInH.js} +2 -2
- zenml/zen_server/dashboard/assets/{page-BzVZGExK.js → page-Bi-wtWiO.js} +2 -2
- zenml/zen_server/dashboard/assets/page-BkeAAYwp.js +1 -0
- zenml/zen_server/dashboard/assets/page-BkuQDIf-.js +1 -0
- zenml/zen_server/dashboard/assets/page-BnaevhnB.js +1 -0
- zenml/zen_server/dashboard/assets/page-Bq0YxkLV.js +1 -0
- zenml/zen_server/dashboard/assets/page-Bs2F4eoD.js +2 -0
- zenml/zen_server/dashboard/assets/page-C6-UGEbH.js +1 -0
- zenml/zen_server/dashboard/assets/page-CCNRIt_f.js +1 -0
- zenml/zen_server/dashboard/assets/page-CHNxpz3n.js +1 -0
- zenml/zen_server/dashboard/assets/page-DgorQFqi.js +1 -0
- zenml/zen_server/dashboard/assets/page-K8ebxVIs.js +1 -0
- zenml/zen_server/dashboard/assets/{page-CuT1SUik.js → page-MFQyIJd3.js} +1 -1
- zenml/zen_server/dashboard/assets/page-TgCF0P_U.js +1 -0
- zenml/zen_server/dashboard/assets/page-ZnCEe-eK.js +9 -0
- zenml/zen_server/dashboard/assets/{page-BW6Ket3a.js → page-uA5prJGY.js} +1 -1
- zenml/zen_server/dashboard/assets/persist-D7HJNBWx.js +1 -0
- zenml/zen_server/dashboard/assets/{play-circle-DK5QMJyp.js → play-circle-CNtZKDnW.js} +1 -1
- zenml/zen_server/dashboard/assets/plus-C8WOyCzt.js +1 -0
- zenml/zen_server/dashboard/assets/stack-detail-query-Cficsl6d.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-7d8xi1tS.js +1 -0
- zenml/zen_server/dashboard/assets/{url-6_xv0WJS.js → url-D7mAQGUM.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.f4abc5b7cfa7d90c1caf5521918e29a8.js → precache-manifest.12246c7548e71e2c4438e496360de80c.js} +4 -4
- zenml/zen_server/dashboard_legacy/service-worker.js +1 -1
- zenml/zen_server/dashboard_legacy/static/js/main.3b27024b.chunk.js +2 -0
- zenml/zen_server/dashboard_legacy/static/js/{main.ac2f17d0.chunk.js.map → main.3b27024b.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/utils.py +10 -2
- zenml/zen_server/rbac/zenml_cloud_rbac.py +11 -5
- zenml/zen_server/routers/devices_endpoints.py +4 -1
- zenml/zen_server/routers/server_endpoints.py +29 -2
- zenml/zen_server/routers/service_connectors_endpoints.py +57 -0
- zenml/zen_server/routers/stack_deployment_endpoints.py +158 -0
- zenml/zen_server/routers/steps_endpoints.py +2 -1
- 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.60.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.61.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.62.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0d707865f404_adding_labels_to_stacks.py +30 -0
- zenml/zen_stores/migrations/versions/b4fca5241eea_migrate_onboarding_state.py +167 -0
- zenml/zen_stores/rest_zen_store.py +149 -4
- zenml/zen_stores/schemas/component_schemas.py +14 -0
- zenml/zen_stores/schemas/server_settings_schemas.py +23 -11
- 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 +450 -6
- zenml/zen_stores/zen_store_interface.py +80 -0
- {zenml_nightly-0.58.2.dev20240626.dist-info → zenml_nightly-0.62.0.dev20240726.dist-info}/METADATA +35 -13
- {zenml_nightly-0.58.2.dev20240626.dist-info → zenml_nightly-0.62.0.dev20240726.dist-info}/RECORD +227 -191
- 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-nXGpmj_f.js +0 -1
- zenml/zen_server/dashboard/assets/Cards-nwsvQLVS.js +0 -1
- zenml/zen_server/dashboard/assets/Commands-DuIWKg_Q.js +0 -1
- zenml/zen_server/dashboard/assets/CopyButton-B_YSm-Ds.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-B6M0dPph.js +0 -1
- zenml/zen_server/dashboard/assets/Helpbox-BQoqCm04.js +0 -1
- zenml/zen_server/dashboard/assets/Infobox-Ce9mefqU.js +0 -1
- zenml/zen_server/dashboard/assets/InlineAvatar-DGf3dVhV.js +0 -1
- zenml/zen_server/dashboard/assets/PageHeader-DGaemzjc.js +0 -1
- zenml/zen_server/dashboard/assets/Pagination-DVYfBCCc.js +0 -1
- zenml/zen_server/dashboard/assets/PasswordChecker-DSLBp7Vl.js +0 -1
- zenml/zen_server/dashboard/assets/SetPassword-B5s7DJug.js +0 -1
- zenml/zen_server/dashboard/assets/SuccessStep-ZzczaM7g.js +0 -1
- zenml/zen_server/dashboard/assets/chevron-down-zcvCWmyP.js +0 -1
- zenml/zen_server/dashboard/assets/cloud-only-Ba_ShBR5.js +0 -1
- zenml/zen_server/dashboard/assets/index-CWJ3xbIf.css +0 -1
- zenml/zen_server/dashboard/assets/index-QORVVTMN.js +0 -55
- zenml/zen_server/dashboard/assets/index.esm-F7nqy9zY.js +0 -1
- zenml/zen_server/dashboard/assets/not-found-Dh2la7kh.js +0 -1
- zenml/zen_server/dashboard/assets/page-B-5jAKoO.js +0 -1
- zenml/zen_server/dashboard/assets/page-B-vWk8a6.js +0 -1
- zenml/zen_server/dashboard/assets/page-B0BrqfS8.js +0 -1
- zenml/zen_server/dashboard/assets/page-BQxVFlUl.js +0 -1
- zenml/zen_server/dashboard/assets/page-ByrHy6Ss.js +0 -1
- zenml/zen_server/dashboard/assets/page-CPtY4Kv_.js +0 -1
- zenml/zen_server/dashboard/assets/page-CmmukLsl.js +0 -1
- zenml/zen_server/dashboard/assets/page-D2D-7qyr.js +0 -9
- zenml/zen_server/dashboard/assets/page-DAQQyLxT.js +0 -1
- zenml/zen_server/dashboard/assets/page-DHkUMl_E.js +0 -1
- zenml/zen_server/dashboard/assets/page-DZCbwOEs.js +0 -2
- zenml/zen_server/dashboard/assets/page-DdaIt20-.js +0 -1
- zenml/zen_server/dashboard/assets/page-LqLs24Ot.js +0 -1
- zenml/zen_server/dashboard/assets/page-lebv0c7C.js +0 -1
- zenml/zen_server/dashboard/assets/update-server-settings-mutation-0Wgz8pUE.js +0 -1
- zenml/zen_server/dashboard_legacy/static/js/main.ac2f17d0.chunk.js +0 -2
- {zenml_nightly-0.58.2.dev20240626.dist-info → zenml_nightly-0.62.0.dev20240726.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.58.2.dev20240626.dist-info → zenml_nightly-0.62.0.dev20240726.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.58.2.dev20240626.dist-info → zenml_nightly-0.62.0.dev20240726.dist-info}/entry_points.txt +0 -0
@@ -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]
|
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/logging/step_logging.py
CHANGED
@@ -240,8 +240,6 @@ class StepLogsStorage:
|
|
240
240
|
|
241
241
|
# Immutable filesystems state
|
242
242
|
self.last_merge_time = time.time()
|
243
|
-
self.log_files_not_merged: List[str] = []
|
244
|
-
self.next_merged_file_name: str = self._get_timestamped_filename()
|
245
243
|
|
246
244
|
@property
|
247
245
|
def artifact_store(self) -> "BaseArtifactStore":
|
@@ -279,13 +277,16 @@ class StepLogsStorage:
|
|
279
277
|
or time.time() - self.last_save_time >= self.time_interval
|
280
278
|
)
|
281
279
|
|
282
|
-
def _get_timestamped_filename(self) -> str:
|
280
|
+
def _get_timestamped_filename(self, suffix: str = "") -> str:
|
283
281
|
"""Returns a timestamped filename.
|
284
282
|
|
283
|
+
Args:
|
284
|
+
suffix: optional suffix for the file name
|
285
|
+
|
285
286
|
Returns:
|
286
287
|
The timestamped filename.
|
287
288
|
"""
|
288
|
-
return f"{time.time()}{LOGS_EXTENSION}"
|
289
|
+
return f"{time.time()}{suffix}{LOGS_EXTENSION}"
|
289
290
|
|
290
291
|
def save_to_file(self, force: bool = False) -> None:
|
291
292
|
"""Method to save the buffer to the given URI.
|
@@ -302,12 +303,7 @@ class StepLogsStorage:
|
|
302
303
|
try:
|
303
304
|
if self.buffer:
|
304
305
|
if self.artifact_store.config.IS_IMMUTABLE_FILESYSTEM:
|
305
|
-
if not self.log_files_not_merged:
|
306
|
-
self.next_merged_file_name = (
|
307
|
-
self._get_timestamped_filename()
|
308
|
-
)
|
309
306
|
_logs_uri = self._get_timestamped_filename()
|
310
|
-
self.log_files_not_merged.append(_logs_uri)
|
311
307
|
with self.artifact_store.open(
|
312
308
|
os.path.join(
|
313
309
|
self.logs_uri,
|
@@ -346,42 +342,40 @@ class StepLogsStorage:
|
|
346
342
|
and time.time() - self.last_merge_time > self.merge_files_interval
|
347
343
|
):
|
348
344
|
try:
|
349
|
-
self.merge_log_files(
|
350
|
-
self.next_merged_file_name, self.log_files_not_merged
|
351
|
-
)
|
345
|
+
self.merge_log_files()
|
352
346
|
except (OSError, IOError) as e:
|
353
347
|
logger.error(f"Error while trying to roll up logs: {e}")
|
354
|
-
else:
|
355
|
-
self.log_files_not_merged = []
|
356
348
|
finally:
|
357
349
|
self.last_merge_time = time.time()
|
358
350
|
|
359
|
-
def merge_log_files(
|
360
|
-
self,
|
361
|
-
file_name: Optional[str] = None,
|
362
|
-
files: Optional[List[str]] = None,
|
363
|
-
) -> None:
|
351
|
+
def merge_log_files(self, merge_all_files: bool = False) -> None:
|
364
352
|
"""Merges all log files into one in the given URI.
|
365
353
|
|
366
354
|
Called on the logging context exit.
|
367
355
|
|
368
356
|
Args:
|
369
|
-
|
370
|
-
files: The list of log files to merge.
|
357
|
+
merge_all_files: whether to merge all files or only raw files
|
371
358
|
"""
|
372
359
|
if self.artifact_store.config.IS_IMMUTABLE_FILESYSTEM:
|
373
|
-
|
374
|
-
|
360
|
+
merged_file_suffix = "_merged"
|
361
|
+
files_ = self.artifact_store.listdir(self.logs_uri)
|
362
|
+
if not merge_all_files:
|
363
|
+
# already merged files will not be merged again
|
364
|
+
files_ = [f for f in files_ if merged_file_suffix not in f]
|
365
|
+
file_name_ = self._get_timestamped_filename(
|
366
|
+
suffix=merged_file_suffix
|
367
|
+
)
|
375
368
|
if len(files_) > 1:
|
376
369
|
files_.sort()
|
377
370
|
logger.debug("Log files count: %s", len(files_))
|
378
371
|
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
372
|
+
missing_files = set()
|
373
|
+
# dump all logs to a local file first
|
374
|
+
with self.artifact_store.open(
|
375
|
+
os.path.join(self.logs_uri, file_name_), "w"
|
376
|
+
) as merged_file:
|
377
|
+
for file in files_:
|
378
|
+
try:
|
385
379
|
merged_file.write(
|
386
380
|
str(
|
387
381
|
_load_file_from_artifact_store(
|
@@ -391,11 +385,12 @@ class StepLogsStorage:
|
|
391
385
|
)
|
392
386
|
)
|
393
387
|
)
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
388
|
+
except DoesNotExistException:
|
389
|
+
missing_files.add(file)
|
390
|
+
|
391
|
+
# clean up left over files
|
392
|
+
for file in files_:
|
393
|
+
if file not in missing_files:
|
399
394
|
self.artifact_store.remove(
|
400
395
|
os.path.join(self.logs_uri, str(file))
|
401
396
|
)
|
@@ -452,7 +447,6 @@ class StepLogsStorageContext:
|
|
452
447
|
Restores the `write` method of both stderr and stdout.
|
453
448
|
"""
|
454
449
|
self.storage.save_to_file(force=True)
|
455
|
-
self.storage.merge_log_files()
|
456
450
|
|
457
451
|
setattr(sys.stdout, "write", self.stdout_write)
|
458
452
|
setattr(sys.stdout, "flush", self.stdout_flush)
|
@@ -462,6 +456,11 @@ class StepLogsStorageContext:
|
|
462
456
|
|
463
457
|
redirected.set(False)
|
464
458
|
|
459
|
+
try:
|
460
|
+
self.storage.merge_log_files(merge_all_files=True)
|
461
|
+
except (OSError, IOError) as e:
|
462
|
+
logger.warning(f"Step logs roll-up failed: {e}")
|
463
|
+
|
465
464
|
def _wrap_write(self, method: Callable[..., Any]) -> Callable[..., Any]:
|
466
465
|
"""Wrapper function that utilizes the storage object to store logs.
|
467
466
|
|
@@ -80,7 +80,7 @@ class BuiltInMaterializer(BaseMaterializer):
|
|
80
80
|
The data read.
|
81
81
|
"""
|
82
82
|
contents = yaml_utils.read_json(self.data_path)
|
83
|
-
if type(contents)
|
83
|
+
if type(contents) is not data_type:
|
84
84
|
# TODO [ENG-142]: Raise error or try to coerce
|
85
85
|
logger.debug(
|
86
86
|
f"Contents {contents} was type {type(contents)} but expected "
|
@@ -94,7 +94,7 @@ class CloudpickleMaterializer(BaseMaterializer):
|
|
94
94
|
"""
|
95
95
|
# Log a warning if this materializer was not explicitly specified for
|
96
96
|
# the given data type.
|
97
|
-
if type(self)
|
97
|
+
if type(self) is CloudpickleMaterializer:
|
98
98
|
logger.warning(
|
99
99
|
f"No materializer is registered for type `{type(data)}`, so "
|
100
100
|
"the default Pickle materializer was used. Pickle is not "
|
zenml/model/model.py
CHANGED
@@ -518,7 +518,7 @@ class Model(BaseModel):
|
|
518
518
|
and not suppress_class_validation_warnings
|
519
519
|
):
|
520
520
|
logger.info(
|
521
|
-
f"
|
521
|
+
f"Version `{version}` matches one of the possible "
|
522
522
|
"`ModelStages` and will be fetched using stage."
|
523
523
|
)
|
524
524
|
if str(version).isnumeric() and not suppress_class_validation_warnings:
|
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,11 @@ 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
|
+
StackDeploymentConfig,
|
393
|
+
StackDeploymentInfo,
|
394
|
+
)
|
389
395
|
|
390
396
|
# ----------------------------- Forward References -----------------------------
|
391
397
|
|
@@ -405,6 +411,7 @@ EventSourceResponseMetadata.model_rebuild()
|
|
405
411
|
EventSourceResponseResources.model_rebuild()
|
406
412
|
FlavorResponseBody.model_rebuild()
|
407
413
|
FlavorResponseMetadata.model_rebuild()
|
414
|
+
FullStackRequest.model_rebuild()
|
408
415
|
LazyArtifactVersionResponse.model_rebuild()
|
409
416
|
LazyRunMetadataResponse.model_rebuild()
|
410
417
|
ModelResponseBody.model_rebuild()
|
@@ -701,11 +708,13 @@ __all__ = [
|
|
701
708
|
"WorkspaceResponseMetadata",
|
702
709
|
# V2 Misc
|
703
710
|
"AuthenticationMethodModel",
|
711
|
+
"DeployedStack",
|
704
712
|
"ServiceConnectorResourcesModel",
|
705
713
|
"ServiceConnectorTypeModel",
|
706
714
|
"ServiceConnectorTypedResourcesModel",
|
707
715
|
"ServiceConnectorRequirements",
|
708
716
|
"ResourceTypeModel",
|
717
|
+
"FullStackRequest",
|
709
718
|
"UserAuthModel",
|
710
719
|
"ExternalUserModel",
|
711
720
|
"BuildItem",
|
@@ -718,6 +727,8 @@ __all__ = [
|
|
718
727
|
"ServerModel",
|
719
728
|
"ServerDatabaseType",
|
720
729
|
"ServerDeploymentType",
|
730
|
+
"StackDeploymentConfig",
|
731
|
+
"StackDeploymentInfo",
|
721
732
|
"OAuthDeviceAuthorizationRequest",
|
722
733
|
"OAuthDeviceAuthorizationResponse",
|
723
734
|
"OAuthDeviceTokenRequest",
|
@@ -191,6 +191,17 @@ class ComponentResponseBody(WorkspaceScopedResponseBody):
|
|
191
191
|
title="The flavor of the stack component.",
|
192
192
|
max_length=STR_FIELD_MAX_LENGTH,
|
193
193
|
)
|
194
|
+
integration: Optional[str] = Field(
|
195
|
+
default=None,
|
196
|
+
title="The name of the integration that the component's flavor "
|
197
|
+
"belongs to.",
|
198
|
+
max_length=STR_FIELD_MAX_LENGTH,
|
199
|
+
)
|
200
|
+
logo_url: Optional[str] = Field(
|
201
|
+
default=None,
|
202
|
+
title="Optionally, a url pointing to a png,"
|
203
|
+
"svg or jpg can be attached.",
|
204
|
+
)
|
194
205
|
|
195
206
|
|
196
207
|
class ComponentResponseMetadata(WorkspaceScopedResponseMetadata):
|
@@ -238,6 +249,24 @@ class ComponentResponse(
|
|
238
249
|
max_length=STR_FIELD_MAX_LENGTH,
|
239
250
|
)
|
240
251
|
|
252
|
+
def get_analytics_metadata(self) -> Dict[str, Any]:
|
253
|
+
"""Add the component labels to analytics metadata.
|
254
|
+
|
255
|
+
Returns:
|
256
|
+
Dict of analytics metadata.
|
257
|
+
"""
|
258
|
+
metadata = super().get_analytics_metadata()
|
259
|
+
|
260
|
+
if self.labels is not None:
|
261
|
+
metadata.update(
|
262
|
+
{
|
263
|
+
label[6:]: value
|
264
|
+
for label, value in self.labels.items()
|
265
|
+
if label.startswith("zenml:")
|
266
|
+
}
|
267
|
+
)
|
268
|
+
return metadata
|
269
|
+
|
241
270
|
def get_hydrated_version(self) -> "ComponentResponse":
|
242
271
|
"""Get the hydrated version of this component.
|
243
272
|
|
@@ -267,6 +296,24 @@ class ComponentResponse(
|
|
267
296
|
"""
|
268
297
|
return self.get_body().flavor
|
269
298
|
|
299
|
+
@property
|
300
|
+
def integration(self) -> Optional[str]:
|
301
|
+
"""The `integration` property.
|
302
|
+
|
303
|
+
Returns:
|
304
|
+
the value of the property.
|
305
|
+
"""
|
306
|
+
return self.get_body().integration
|
307
|
+
|
308
|
+
@property
|
309
|
+
def logo_url(self) -> Optional[str]:
|
310
|
+
"""The `logo_url` property.
|
311
|
+
|
312
|
+
Returns:
|
313
|
+
the value of the property.
|
314
|
+
"""
|
315
|
+
return self.get_body().logo_url
|
316
|
+
|
270
317
|
@property
|
271
318
|
def configuration(self) -> Dict[str, Any]:
|
272
319
|
"""The `configuration` property.
|
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)
|
@@ -15,8 +15,6 @@
|
|
15
15
|
|
16
16
|
from datetime import datetime
|
17
17
|
from typing import (
|
18
|
-
Any,
|
19
|
-
Dict,
|
20
18
|
Optional,
|
21
19
|
)
|
22
20
|
from uuid import UUID
|
@@ -57,10 +55,6 @@ class ServerSettingsUpdate(BaseZenModel):
|
|
57
55
|
default=None,
|
58
56
|
title="Whether to display notifications about ZenML updates in the dashboard.",
|
59
57
|
)
|
60
|
-
onboarding_state: Optional[Dict[str, Any]] = Field(
|
61
|
-
default=None,
|
62
|
-
title="The server's onboarding state.",
|
63
|
-
)
|
64
58
|
|
65
59
|
|
66
60
|
# ------------------ Response Model ------------------
|
@@ -96,11 +90,6 @@ class ServerSettingsResponseBody(BaseResponseBody):
|
|
96
90
|
class ServerSettingsResponseMetadata(BaseResponseMetadata):
|
97
91
|
"""Response metadata for server settings."""
|
98
92
|
|
99
|
-
onboarding_state: Dict[str, Any] = Field(
|
100
|
-
default={},
|
101
|
-
title="The server's onboarding state.",
|
102
|
-
)
|
103
|
-
|
104
93
|
|
105
94
|
class ServerSettingsResponseResources(BaseResponseResources):
|
106
95
|
"""Response resources for server settings."""
|
@@ -199,15 +188,6 @@ class ServerSettingsResponse(
|
|
199
188
|
"""
|
200
189
|
return self.get_body().updated
|
201
190
|
|
202
|
-
@property
|
203
|
-
def onboarding_state(self) -> Dict[str, Any]:
|
204
|
-
"""The `onboarding_state` property.
|
205
|
-
|
206
|
-
Returns:
|
207
|
-
the value of the property.
|
208
|
-
"""
|
209
|
-
return self.get_metadata().onboarding_state
|
210
|
-
|
211
191
|
|
212
192
|
# ------------------ Filter Model ------------------
|
213
193
|
|
@@ -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
|
|