zenml-nightly 0.75.0.dev20250317__py3-none-any.whl → 0.80.0.dev20250321__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/__init__.py +3 -1
- zenml/artifacts/artifact_config.py +2 -2
- zenml/artifacts/utils.py +4 -8
- zenml/cli/__init__.py +6 -6
- zenml/cli/base.py +2 -2
- zenml/cli/login.py +2 -2
- zenml/cli/server.py +6 -4
- zenml/cli/utils.py +3 -3
- zenml/client.py +9 -9
- zenml/config/compiler.py +1 -1
- zenml/config/server_config.py +1 -1
- zenml/constants.py +2 -1
- zenml/enums.py +12 -0
- zenml/integrations/airflow/__init__.py +0 -2
- zenml/integrations/argilla/__init__.py +0 -1
- zenml/integrations/aws/__init__.py +0 -3
- zenml/integrations/azure/__init__.py +0 -2
- zenml/integrations/azure/service_connectors/azure_service_connector.py +1 -1
- zenml/integrations/bentoml/__init__.py +0 -2
- zenml/integrations/bentoml/services/bentoml_container_deployment.py +2 -2
- zenml/integrations/bentoml/services/bentoml_local_deployment.py +1 -1
- zenml/integrations/bentoml/steps/bentoml_deployer.py +1 -1
- zenml/integrations/bitbucket/__init__.py +0 -2
- zenml/integrations/comet/__init__.py +0 -2
- zenml/integrations/databricks/__init__.py +0 -2
- zenml/integrations/databricks/services/databricks_deployment.py +3 -1
- zenml/integrations/deepchecks/__init__.py +0 -2
- zenml/integrations/discord/__init__.py +0 -2
- zenml/integrations/evidently/__init__.py +0 -2
- zenml/integrations/facets/__init__.py +0 -2
- zenml/integrations/feast/__init__.py +0 -2
- zenml/integrations/gcp/__init__.py +0 -3
- zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +5 -0
- zenml/integrations/github/__init__.py +0 -2
- zenml/integrations/github/code_repositories/github_code_repository.py +10 -3
- zenml/integrations/gitlab/__init__.py +0 -1
- zenml/integrations/gitlab/code_repositories/gitlab_code_repository.py +5 -2
- zenml/integrations/great_expectations/__init__.py +0 -3
- zenml/integrations/huggingface/__init__.py +0 -1
- zenml/integrations/huggingface/services/huggingface_deployment.py +3 -1
- zenml/integrations/hyperai/__init__.py +0 -2
- zenml/integrations/kaniko/__init__.py +0 -2
- zenml/integrations/kubeflow/__init__.py +0 -1
- zenml/integrations/kubeflow/orchestrators/kubeflow_orchestrator.py +6 -0
- zenml/integrations/kubernetes/__init__.py +0 -2
- zenml/integrations/kubernetes/flavors/kubernetes_orchestrator_flavor.py +4 -0
- zenml/integrations/kubernetes/orchestrators/kube_utils.py +89 -1
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator.py +82 -48
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator_entrypoint.py +44 -10
- zenml/integrations/kubernetes/orchestrators/manifest_utils.py +45 -1
- zenml/integrations/kubernetes/pod_settings.py +52 -0
- zenml/integrations/label_studio/__init__.py +0 -2
- zenml/integrations/langchain/__init__.py +0 -2
- zenml/integrations/lightgbm/__init__.py +0 -1
- zenml/integrations/lightning/__init__.py +0 -2
- zenml/integrations/mlflow/__init__.py +1 -3
- zenml/integrations/mlflow/services/mlflow_deployment.py +1 -1
- zenml/integrations/modal/__init__.py +0 -1
- zenml/integrations/neptune/__init__.py +0 -2
- zenml/integrations/neural_prophet/__init__.py +0 -2
- zenml/integrations/numpy/__init__.py +0 -2
- zenml/integrations/openai/__init__.py +0 -1
- zenml/integrations/pandas/__init__.py +0 -2
- zenml/integrations/pigeon/__init__.py +0 -1
- zenml/integrations/pillow/__init__.py +0 -3
- zenml/integrations/polars/__init__.py +0 -2
- zenml/integrations/prodigy/__init__.py +0 -1
- zenml/integrations/pycaret/__init__.py +0 -2
- zenml/integrations/pytorch/__init__.py +0 -1
- zenml/integrations/pytorch_lightning/__init__.py +0 -2
- zenml/integrations/s3/__init__.py +0 -2
- zenml/integrations/scipy/__init__.py +0 -2
- zenml/integrations/seldon/__init__.py +0 -2
- zenml/integrations/seldon/services/seldon_deployment.py +3 -2
- zenml/integrations/sklearn/__init__.py +1 -1
- zenml/integrations/skypilot/orchestrators/skypilot_base_vm_orchestrator.py +43 -18
- zenml/integrations/skypilot_aws/__init__.py +1 -3
- zenml/integrations/skypilot_azure/__init__.py +1 -2
- zenml/integrations/skypilot_gcp/__init__.py +1 -3
- zenml/integrations/skypilot_kubernetes/__init__.py +1 -3
- zenml/integrations/skypilot_lambda/__init__.py +1 -3
- zenml/integrations/slack/__init__.py +0 -1
- zenml/integrations/spark/__init__.py +0 -1
- zenml/integrations/tekton/__init__.py +0 -1
- zenml/integrations/tekton/orchestrators/tekton_orchestrator.py +5 -0
- zenml/integrations/tensorboard/__init__.py +0 -2
- zenml/integrations/tensorboard/services/tensorboard_service.py +1 -1
- zenml/integrations/tensorflow/__init__.py +0 -2
- zenml/integrations/vllm/__init__.py +0 -1
- zenml/integrations/vllm/services/vllm_deployment.py +1 -1
- zenml/integrations/wandb/__init__.py +0 -1
- zenml/integrations/whylogs/__init__.py +0 -1
- zenml/integrations/xgboost/__init__.py +0 -2
- zenml/login/credentials.py +1 -1
- zenml/login/pro/utils.py +1 -0
- zenml/materializers/__init__.py +1 -0
- zenml/model_deployers/base_model_deployer.py +1 -1
- zenml/models/__init__.py +4 -0
- zenml/models/v2/base/filter.py +162 -54
- zenml/models/v2/base/scoped.py +132 -0
- zenml/models/v2/core/artifact_version.py +12 -33
- zenml/models/v2/core/model_version.py +12 -50
- zenml/models/v2/core/pipeline_run.py +12 -32
- zenml/models/v2/core/service.py +2 -2
- zenml/models/v2/core/step_run.py +15 -32
- zenml/{services/service_type.py → models/v2/misc/service.py} +1 -1
- zenml/orchestrators/step_run_utils.py +1 -1
- zenml/orchestrators/utils.py +1 -1
- zenml/services/__init__.py +3 -5
- zenml/services/container/container_service.py +2 -1
- zenml/services/local/local_service.py +2 -1
- zenml/services/service.py +3 -2
- zenml/services/service_endpoint.py +2 -1
- zenml/services/service_monitor.py +1 -1
- zenml/services/service_status.py +1 -12
- zenml/steps/entrypoint_function_utils.py +1 -1
- zenml/utils/dashboard_utils.py +73 -8
- zenml/utils/server_utils.py +52 -0
- zenml/zen_server/dashboard/assets/{404-BbAvjc7Z.js → 404-2I8egBQu.js} +1 -1
- zenml/zen_server/dashboard/assets/@reactflow-BHoFKFSZ.js +17 -0
- zenml/zen_server/dashboard/assets/{AlertDialogDropdownItem-XL2NfFgP.js → AlertDialogDropdownItem-D7KZcPFw.js} +1 -1
- zenml/zen_server/dashboard/assets/CodeSnippet-DUkCnBpQ.js +9 -0
- zenml/zen_server/dashboard/assets/{CollapsibleCard-Djtd_ocf.js → CollapsibleCard-B5-5Plnd.js} +1 -1
- zenml/zen_server/dashboard/assets/{Commands-V-hH_IKQ.js → Commands-CbOMmarC.js} +1 -1
- zenml/zen_server/dashboard/assets/{ComponentBadge-CVN2FsiW.js → ComponentBadge-FrujKBC6.js} +1 -1
- zenml/zen_server/dashboard/assets/ComponentIcon-Dx5fBrDX.js +1 -0
- zenml/zen_server/dashboard/assets/{CsvVizualization-CWaQcWIN.js → CsvVizualization-B8E3p9we.js} +1 -1
- zenml/zen_server/dashboard/assets/{DeleteAlertDialog-CTLRrcFM.js → DeleteAlertDialog-BgTZbbAt.js} +1 -1
- zenml/zen_server/dashboard/assets/{DialogItem-ST291Hsl.js → DialogItem-CNWLiJcc.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-CIBjAdSc.js → Error-BkUP4Luv.js} +1 -1
- zenml/zen_server/dashboard/assets/ExecutionStatus-CD8Vj7sp.js +1 -0
- zenml/zen_server/dashboard/assets/{Helpbox-cwQNH06F.js → Helpbox-DIx6mDOH.js} +1 -1
- zenml/zen_server/dashboard/assets/{Infobox-DYKoAVhW.js → Infobox-BHEdNmME.js} +1 -1
- zenml/zen_server/dashboard/assets/{InlineAvatar-Bk4QLPTU.js → InlineAvatar-Bin9UPKJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{NestedCollapsible-CE4OF670.js → NestedCollapsible-Da-k0Mff.js} +1 -1
- zenml/zen_server/dashboard/assets/{Partials-cL1-u_sT.js → Partials-TNaYjHsV.js} +1 -1
- zenml/zen_server/dashboard/assets/ProBadge-BfPp-B97.js +1 -0
- zenml/zen_server/dashboard/assets/{ProCta-DtUutIul.js → ProCta-7_FtpX3I.js} +1 -1
- zenml/zen_server/dashboard/assets/ProviderIcon-CxeziA5a.js +1 -0
- zenml/zen_server/dashboard/assets/{ProviderRadio-C4bltH6-.js → ProviderRadio-DPmZHff_.js} +1 -1
- zenml/zen_server/dashboard/assets/RunSelector-BVKB4Z8F.js +1 -0
- zenml/zen_server/dashboard/assets/{RunsBody-D2VoO-cR.js → RunsBody-Cj4sIqQB.js} +1 -1
- zenml/zen_server/dashboard/assets/{SearchField-DfNxVtjV.js → SearchField-DjAOZic5.js} +1 -1
- zenml/zen_server/dashboard/assets/SecretTooltip-mMAAP4dM.js +1 -0
- zenml/zen_server/dashboard/assets/{SetPassword-CWl2mwz8.js → SetPassword-B0o5kSJU.js} +1 -1
- zenml/zen_server/dashboard/assets/{StackList-C8KNd00o.js → StackList-5UB8LoEq.js} +1 -1
- zenml/zen_server/dashboard/assets/{Tabs-BEWDPvPV.js → Tabs-AuhCyzle.js} +1 -1
- zenml/zen_server/dashboard/assets/Tick-CHW0jc8Y.js +1 -0
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-DCuCj7NK.js → UpdatePasswordSchemas-Bauivjf-.js} +1 -1
- zenml/zen_server/dashboard/assets/{UsageReason-CwUrEwEz.js → UsageReason-Dr5ca5M4.js} +1 -1
- zenml/zen_server/dashboard/assets/{Wizard-CynnoHg4.js → Wizard-XEp9rGmf.js} +1 -1
- zenml/zen_server/dashboard/assets/{WizardFooter-B2bYs89C.js → WizardFooter-BtL1Gi1k.js} +1 -1
- zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-B509kMlL.js → all-pipeline-runs-query-COvsm3bC.js} +1 -1
- zenml/zen_server/dashboard/assets/configuration-form-BJUCr0wl.js +1 -0
- zenml/zen_server/dashboard/assets/{create-stack-BjWXz5nx.js → create-stack-B2c98UlP.js} +1 -1
- zenml/zen_server/dashboard/assets/{delete-run-CzPWbsBy.js → delete-run-Do3XyF4W.js} +1 -1
- zenml/zen_server/dashboard/assets/flavor-select-D8CranSY.js +1 -0
- zenml/zen_server/dashboard/assets/{form-schemas-B6u3P_a4.js → form-schemas-Bm-dTV3L.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-BCKg1Y5r.css → index-6mLFgFwe.css} +1 -1
- zenml/zen_server/dashboard/assets/{index-Bjeu4_0O.js → index-CzhJC6pc.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-CaRx22lH.js → index-D-n6tspq.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-DWoLoYDY.js → index-DPjvk73v.js} +8 -8
- zenml/zen_server/dashboard/assets/{index-Dba8yULY.js → index-eIIP-0dQ.js} +1 -1
- zenml/zen_server/dashboard/assets/login-mutation-D6uiKsKk.js +1 -0
- zenml/zen_server/dashboard/assets/{not-found-DGQ8rm7B.js → not-found-DFrksY0r.js} +1 -1
- zenml/zen_server/dashboard/assets/page-B-uHUFcm.js +1 -0
- zenml/zen_server/dashboard/assets/page-B0Llmzo_.js +1 -0
- zenml/zen_server/dashboard/assets/page-B150LbzG.js +1 -0
- zenml/zen_server/dashboard/assets/{page-CfeQbejg.js → page-B1Un9vAU.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CxrLV30P.js → page-B80TE04v.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BIseZTJt.js +2 -0
- zenml/zen_server/dashboard/assets/{page-C5xq6rqE.js → page-BJ15SGwt.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-B6msmF1h.js → page-BJrZsPSh.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BMZaECzB.js +1 -0
- zenml/zen_server/dashboard/assets/{page-D1upvSPi.js → page-BTvnIFGR.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DLw1Apss.js → page-BXh1mF-D.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BZUxCBoD.js +1 -0
- zenml/zen_server/dashboard/assets/page-BeFiRx31.js +1 -0
- zenml/zen_server/dashboard/assets/{page-C89bN6VV.js → page-BnUwQBeg.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-k-UXKVnV.js → page-BqQ6y8Hb.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BwAFqFCf.js +1 -0
- zenml/zen_server/dashboard/assets/page-BzlVs5tC.js +1 -0
- zenml/zen_server/dashboard/assets/{page-C3BbJ-5n.js → page-C11vPVkH.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-AnG2ilmi.js → page-CAKBSE9f.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CPe9nQSo.js +1 -0
- zenml/zen_server/dashboard/assets/page-D0Zt2-7X.js +1 -0
- zenml/zen_server/dashboard/assets/page-D2F0Rvak.js +1 -0
- zenml/zen_server/dashboard/assets/{page-2EzZ5aWS.js → page-D5GZlpKq.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CxoG4zme.js → page-DBNBYSwq.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DDvwWgKP.js +6 -0
- zenml/zen_server/dashboard/assets/page-DF9q7ySu.js +1 -0
- zenml/zen_server/dashboard/assets/page-DOzFoJuo.js +1 -0
- zenml/zen_server/dashboard/assets/page-DaHH2ZEF.js +1 -0
- zenml/zen_server/dashboard/assets/{page-B9ELcPAy.js → page-Dd-0y3SU.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Dy6HYsJr.js → page-DhNnHHmX.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CZ_3LB0U.js → page-DkJfgcDi.js} +1 -1
- zenml/zen_server/dashboard/assets/page-EhqRFAZc.js +1 -0
- zenml/zen_server/dashboard/assets/{page-nHAZvd76.js → page-NIWnUdVg.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DazwBcbq.js → page-kYlFrH53.js} +1 -1
- zenml/zen_server/dashboard/assets/page-ygCPGHAV.js +1 -0
- zenml/zen_server/dashboard/assets/{persist-BglceT_t.js → persist-C5RlwSq6.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-CMkLV2Cs.js → persist-DHGuHP2H.js} +1 -1
- zenml/zen_server/dashboard/assets/{service-DNKY_ZYd.js → service-Do7yitqe.js} +1 -1
- zenml/zen_server/dashboard/assets/{sharedSchema-BOmQa793.js → sharedSchema-i_9Y4WcA.js} +1 -1
- zenml/zen_server/dashboard/assets/stack-detail-query-omCumL7U.js +1 -0
- zenml/zen_server/dashboard/assets/update-server-settings-mutation-B4eE33z-.js +1 -0
- zenml/zen_server/dashboard/index.html +4 -4
- zenml/zen_server/deploy/daemon/daemon_zen_server.py +1 -1
- zenml/zen_server/deploy/deployment.py +1 -2
- zenml/zen_server/deploy/docker/docker_zen_server.py +1 -1
- zenml/zen_server/rbac/endpoint_utils.py +1 -2
- zenml/zen_server/routers/projects_endpoints.py +14 -3
- zenml/zen_server/utils.py +2 -86
- zenml/zen_stores/migrations/versions/0.80.0_release.py +23 -0
- zenml/zen_stores/schemas/artifact_visualization_schemas.py +1 -1
- zenml/zen_stores/schemas/model_schemas.py +1 -1
- zenml/zen_stores/schemas/service_schemas.py +1 -1
- zenml/zen_stores/schemas/step_run_schemas.py +1 -1
- zenml/zen_stores/schemas/trigger_schemas.py +1 -1
- zenml/zen_stores/sql_zen_store.py +5 -0
- {zenml_nightly-0.75.0.dev20250317.dist-info → zenml_nightly-0.80.0.dev20250321.dist-info}/METADATA +7 -8
- {zenml_nightly-0.75.0.dev20250317.dist-info → zenml_nightly-0.80.0.dev20250321.dist-info}/RECORD +226 -225
- zenml/zen_server/dashboard/assets/@reactflow-DMaYqp8l.js +0 -17
- zenml/zen_server/dashboard/assets/CodeSnippet-D8ptwPjg.js +0 -9
- zenml/zen_server/dashboard/assets/ComponentIcon-gpMJ2Y2e.js +0 -1
- zenml/zen_server/dashboard/assets/ExecutionStatus-DHiK3Am-.js +0 -1
- zenml/zen_server/dashboard/assets/ProBadge-ypma7R8i.js +0 -1
- zenml/zen_server/dashboard/assets/ProviderIcon-DKN3Gdcg.js +0 -1
- zenml/zen_server/dashboard/assets/RunSelector-CYmRHGdm.js +0 -1
- zenml/zen_server/dashboard/assets/SecretTooltip-CHPWF0bu.js +0 -1
- zenml/zen_server/dashboard/assets/Tick-DgU4udUn.js +0 -1
- zenml/zen_server/dashboard/assets/configuration-form-BEwWCxqY.js +0 -1
- zenml/zen_server/dashboard/assets/flavor-select-C1pyy8gq.js +0 -1
- zenml/zen_server/dashboard/assets/login-mutation-7WFxPe10.js +0 -1
- zenml/zen_server/dashboard/assets/page-BKN4SYXY.js +0 -1
- zenml/zen_server/dashboard/assets/page-BNrOW_3T.js +0 -2
- zenml/zen_server/dashboard/assets/page-BX6ZrAVH.js +0 -1
- zenml/zen_server/dashboard/assets/page-BnOdORy3.js +0 -1
- zenml/zen_server/dashboard/assets/page-BtkfcEI7.js +0 -1
- zenml/zen_server/dashboard/assets/page-Bz_grLBY.js +0 -1
- zenml/zen_server/dashboard/assets/page-CCEwuGU4.js +0 -1
- zenml/zen_server/dashboard/assets/page-COAGXWJu.js +0 -1
- zenml/zen_server/dashboard/assets/page-CaibMa0l.js +0 -1
- zenml/zen_server/dashboard/assets/page-CskoTYOC.js +0 -1
- zenml/zen_server/dashboard/assets/page-Cyoe7AtN.js +0 -1
- zenml/zen_server/dashboard/assets/page-D03wm5f1.js +0 -1
- zenml/zen_server/dashboard/assets/page-D8UimvyP.js +0 -1
- zenml/zen_server/dashboard/assets/page-DEnmFyzi.js +0 -1
- zenml/zen_server/dashboard/assets/page-TiOZeeo0.js +0 -1
- zenml/zen_server/dashboard/assets/page-cveasWUr.js +0 -6
- zenml/zen_server/dashboard/assets/page-iTvxfhgZ.js +0 -1
- zenml/zen_server/dashboard/assets/page-niRD8Hqz.js +0 -1
- zenml/zen_server/dashboard/assets/stack-detail-query-CI_YMUx6.js +0 -1
- zenml/zen_server/dashboard/assets/transform-DKsRLKTv.js +0 -1
- zenml/zen_server/dashboard/assets/update-server-settings-mutation-CNYCc-FU.js +0 -1
- {zenml_nightly-0.75.0.dev20250317.dist-info → zenml_nightly-0.80.0.dev20250321.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.75.0.dev20250317.dist-info → zenml_nightly-0.80.0.dev20250321.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.75.0.dev20250317.dist-info → zenml_nightly-0.80.0.dev20250321.dist-info}/entry_points.txt +0 -0
@@ -42,6 +42,7 @@ from zenml.models.v2.base.scoped import (
|
|
42
42
|
ProjectScopedResponseBody,
|
43
43
|
ProjectScopedResponseMetadata,
|
44
44
|
ProjectScopedResponseResources,
|
45
|
+
RunMetadataFilterMixin,
|
45
46
|
TaggableFilter,
|
46
47
|
)
|
47
48
|
from zenml.models.v2.core.model_version import ModelVersionResponse
|
@@ -582,12 +583,15 @@ class PipelineRunResponse(
|
|
582
583
|
# ------------------ Filter Model ------------------
|
583
584
|
|
584
585
|
|
585
|
-
class PipelineRunFilter(
|
586
|
+
class PipelineRunFilter(
|
587
|
+
ProjectScopedFilter, TaggableFilter, RunMetadataFilterMixin
|
588
|
+
):
|
586
589
|
"""Model to enable advanced filtering of all pipeline runs."""
|
587
590
|
|
588
591
|
CUSTOM_SORTING_OPTIONS: ClassVar[List[str]] = [
|
589
592
|
*ProjectScopedFilter.CUSTOM_SORTING_OPTIONS,
|
590
593
|
*TaggableFilter.CUSTOM_SORTING_OPTIONS,
|
594
|
+
*RunMetadataFilterMixin.CUSTOM_SORTING_OPTIONS,
|
591
595
|
"tag",
|
592
596
|
"stack",
|
593
597
|
"pipeline",
|
@@ -597,6 +601,7 @@ class PipelineRunFilter(ProjectScopedFilter, TaggableFilter):
|
|
597
601
|
FILTER_EXCLUDE_FIELDS: ClassVar[List[str]] = [
|
598
602
|
*ProjectScopedFilter.FILTER_EXCLUDE_FIELDS,
|
599
603
|
*TaggableFilter.FILTER_EXCLUDE_FIELDS,
|
604
|
+
*RunMetadataFilterMixin.FILTER_EXCLUDE_FIELDS,
|
600
605
|
"unlisted",
|
601
606
|
"code_repository_id",
|
602
607
|
"build_id",
|
@@ -610,11 +615,16 @@ class PipelineRunFilter(ProjectScopedFilter, TaggableFilter):
|
|
610
615
|
"stack_component",
|
611
616
|
"pipeline_name",
|
612
617
|
"templatable",
|
613
|
-
"run_metadata",
|
614
618
|
]
|
615
619
|
CLI_EXCLUDE_FIELDS = [
|
616
620
|
*ProjectScopedFilter.CLI_EXCLUDE_FIELDS,
|
617
621
|
*TaggableFilter.CLI_EXCLUDE_FIELDS,
|
622
|
+
*RunMetadataFilterMixin.CLI_EXCLUDE_FIELDS,
|
623
|
+
]
|
624
|
+
API_MULTI_INPUT_PARAMS: ClassVar[List[str]] = [
|
625
|
+
*ProjectScopedFilter.API_MULTI_INPUT_PARAMS,
|
626
|
+
*TaggableFilter.API_MULTI_INPUT_PARAMS,
|
627
|
+
*RunMetadataFilterMixin.API_MULTI_INPUT_PARAMS,
|
618
628
|
]
|
619
629
|
|
620
630
|
name: Optional[str] = Field(
|
@@ -680,10 +690,6 @@ class PipelineRunFilter(ProjectScopedFilter, TaggableFilter):
|
|
680
690
|
union_mode="left_to_right",
|
681
691
|
)
|
682
692
|
unlisted: Optional[bool] = None
|
683
|
-
run_metadata: Optional[Dict[str, Any]] = Field(
|
684
|
-
default=None,
|
685
|
-
description="The run_metadata to filter the pipeline runs by.",
|
686
|
-
)
|
687
693
|
# TODO: Remove once frontend is ready for it. This is replaced by the more
|
688
694
|
# generic `pipeline` filter below.
|
689
695
|
pipeline_name: Optional[str] = Field(
|
@@ -740,8 +746,6 @@ class PipelineRunFilter(ProjectScopedFilter, TaggableFilter):
|
|
740
746
|
PipelineDeploymentSchema,
|
741
747
|
PipelineRunSchema,
|
742
748
|
PipelineSchema,
|
743
|
-
RunMetadataResourceSchema,
|
744
|
-
RunMetadataSchema,
|
745
749
|
ScheduleSchema,
|
746
750
|
StackComponentSchema,
|
747
751
|
StackCompositionSchema,
|
@@ -899,30 +903,6 @@ class PipelineRunFilter(ProjectScopedFilter, TaggableFilter):
|
|
899
903
|
)
|
900
904
|
|
901
905
|
custom_filters.append(templatable_filter)
|
902
|
-
if self.run_metadata is not None:
|
903
|
-
from zenml.enums import MetadataResourceTypes
|
904
|
-
|
905
|
-
for key, value in self.run_metadata.items():
|
906
|
-
additional_filter = and_(
|
907
|
-
RunMetadataResourceSchema.resource_id
|
908
|
-
== PipelineRunSchema.id,
|
909
|
-
RunMetadataResourceSchema.resource_type
|
910
|
-
== MetadataResourceTypes.PIPELINE_RUN.value,
|
911
|
-
RunMetadataResourceSchema.run_metadata_id
|
912
|
-
== RunMetadataSchema.id,
|
913
|
-
self.generate_custom_query_conditions_for_column(
|
914
|
-
value=key,
|
915
|
-
table=RunMetadataSchema,
|
916
|
-
column="key",
|
917
|
-
),
|
918
|
-
self.generate_custom_query_conditions_for_column(
|
919
|
-
value=value,
|
920
|
-
table=RunMetadataSchema,
|
921
|
-
column="value",
|
922
|
-
json_encode_value=True,
|
923
|
-
),
|
924
|
-
)
|
925
|
-
custom_filters.append(additional_filter)
|
926
906
|
|
927
907
|
return custom_filters
|
928
908
|
|
zenml/models/v2/core/service.py
CHANGED
@@ -31,6 +31,7 @@ from pydantic import ConfigDict, Field
|
|
31
31
|
from sqlalchemy.sql.elements import ColumnElement
|
32
32
|
|
33
33
|
from zenml.constants import STR_FIELD_MAX_LENGTH
|
34
|
+
from zenml.enums import ServiceState
|
34
35
|
from zenml.models.v2.base.base import BaseUpdate
|
35
36
|
from zenml.models.v2.base.scoped import (
|
36
37
|
ProjectScopedFilter,
|
@@ -40,8 +41,7 @@ from zenml.models.v2.base.scoped import (
|
|
40
41
|
ProjectScopedResponseMetadata,
|
41
42
|
ProjectScopedResponseResources,
|
42
43
|
)
|
43
|
-
from zenml.
|
44
|
-
from zenml.services.service_type import ServiceType
|
44
|
+
from zenml.models.v2.misc.service import ServiceType
|
45
45
|
|
46
46
|
if TYPE_CHECKING:
|
47
47
|
from zenml.models.v2.core.model_version import ModelVersionResponse
|
zenml/models/v2/core/step_run.py
CHANGED
@@ -16,7 +16,6 @@
|
|
16
16
|
from datetime import datetime
|
17
17
|
from typing import (
|
18
18
|
TYPE_CHECKING,
|
19
|
-
Any,
|
20
19
|
ClassVar,
|
21
20
|
Dict,
|
22
21
|
List,
|
@@ -41,6 +40,7 @@ from zenml.models.v2.base.scoped import (
|
|
41
40
|
ProjectScopedResponseBody,
|
42
41
|
ProjectScopedResponseMetadata,
|
43
42
|
ProjectScopedResponseResources,
|
43
|
+
RunMetadataFilterMixin,
|
44
44
|
)
|
45
45
|
from zenml.models.v2.core.artifact_version import ArtifactVersionResponse
|
46
46
|
from zenml.models.v2.core.model_version import ModelVersionResponse
|
@@ -504,13 +504,25 @@ class StepRunResponse(
|
|
504
504
|
# ------------------ Filter Model ------------------
|
505
505
|
|
506
506
|
|
507
|
-
class StepRunFilter(ProjectScopedFilter):
|
507
|
+
class StepRunFilter(ProjectScopedFilter, RunMetadataFilterMixin):
|
508
508
|
"""Model to enable advanced filtering of step runs."""
|
509
509
|
|
510
510
|
FILTER_EXCLUDE_FIELDS: ClassVar[List[str]] = [
|
511
511
|
*ProjectScopedFilter.FILTER_EXCLUDE_FIELDS,
|
512
|
+
*RunMetadataFilterMixin.FILTER_EXCLUDE_FIELDS,
|
512
513
|
"model",
|
513
|
-
|
514
|
+
]
|
515
|
+
CLI_EXCLUDE_FIELDS: ClassVar[List[str]] = [
|
516
|
+
*ProjectScopedFilter.CLI_EXCLUDE_FIELDS,
|
517
|
+
*RunMetadataFilterMixin.CLI_EXCLUDE_FIELDS,
|
518
|
+
]
|
519
|
+
CUSTOM_SORTING_OPTIONS: ClassVar[List[str]] = [
|
520
|
+
*ProjectScopedFilter.CUSTOM_SORTING_OPTIONS,
|
521
|
+
*RunMetadataFilterMixin.CUSTOM_SORTING_OPTIONS,
|
522
|
+
]
|
523
|
+
API_MULTI_INPUT_PARAMS: ClassVar[List[str]] = [
|
524
|
+
*ProjectScopedFilter.API_MULTI_INPUT_PARAMS,
|
525
|
+
*RunMetadataFilterMixin.API_MULTI_INPUT_PARAMS,
|
514
526
|
]
|
515
527
|
|
516
528
|
name: Optional[str] = Field(
|
@@ -563,10 +575,6 @@ class StepRunFilter(ProjectScopedFilter):
|
|
563
575
|
default=None,
|
564
576
|
description="Name/ID of the model associated with the step run.",
|
565
577
|
)
|
566
|
-
run_metadata: Optional[Dict[str, Any]] = Field(
|
567
|
-
default=None,
|
568
|
-
description="The run_metadata to filter the step runs by.",
|
569
|
-
)
|
570
578
|
model_config = ConfigDict(protected_namespaces=())
|
571
579
|
|
572
580
|
def get_custom_filters(
|
@@ -587,8 +595,6 @@ class StepRunFilter(ProjectScopedFilter):
|
|
587
595
|
from zenml.zen_stores.schemas import (
|
588
596
|
ModelSchema,
|
589
597
|
ModelVersionSchema,
|
590
|
-
RunMetadataResourceSchema,
|
591
|
-
RunMetadataSchema,
|
592
598
|
StepRunSchema,
|
593
599
|
)
|
594
600
|
|
@@ -601,28 +607,5 @@ class StepRunFilter(ProjectScopedFilter):
|
|
601
607
|
),
|
602
608
|
)
|
603
609
|
custom_filters.append(model_filter)
|
604
|
-
if self.run_metadata is not None:
|
605
|
-
from zenml.enums import MetadataResourceTypes
|
606
|
-
|
607
|
-
for key, value in self.run_metadata.items():
|
608
|
-
additional_filter = and_(
|
609
|
-
RunMetadataResourceSchema.resource_id == StepRunSchema.id,
|
610
|
-
RunMetadataResourceSchema.resource_type
|
611
|
-
== MetadataResourceTypes.STEP_RUN.value,
|
612
|
-
RunMetadataResourceSchema.run_metadata_id
|
613
|
-
== RunMetadataSchema.id,
|
614
|
-
self.generate_custom_query_conditions_for_column(
|
615
|
-
value=key,
|
616
|
-
table=RunMetadataSchema,
|
617
|
-
column="key",
|
618
|
-
),
|
619
|
-
self.generate_custom_query_conditions_for_column(
|
620
|
-
value=value,
|
621
|
-
table=RunMetadataSchema,
|
622
|
-
column="value",
|
623
|
-
json_encode_value=True,
|
624
|
-
),
|
625
|
-
)
|
626
|
-
custom_filters.append(additional_filter)
|
627
610
|
|
628
611
|
return custom_filters
|
@@ -11,7 +11,7 @@
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
12
12
|
# or implied. See the License for the specific language governing
|
13
13
|
# permissions and limitations under the License.
|
14
|
-
"""
|
14
|
+
"""Misc models for services."""
|
15
15
|
|
16
16
|
from pydantic import BaseModel, ConfigDict
|
17
17
|
|
@@ -352,7 +352,7 @@ def log_model_version_dashboard_url(
|
|
352
352
|
"""
|
353
353
|
from zenml.utils.dashboard_utils import get_model_version_url
|
354
354
|
|
355
|
-
if model_version_url := get_model_version_url(model_version
|
355
|
+
if model_version_url := get_model_version_url(model_version):
|
356
356
|
logger.info(
|
357
357
|
"Dashboard URL for Model Version `%s (%s)`:\n%s",
|
358
358
|
model_version.model.name,
|
zenml/orchestrators/utils.py
CHANGED
@@ -184,7 +184,7 @@ def get_config_environment_vars(
|
|
184
184
|
"service account API key to authenticate to the ZenML "
|
185
185
|
"server instead of your regular user account. For more "
|
186
186
|
"information, see "
|
187
|
-
"https://docs.zenml.io/how-to/connecting-to-zenml/connect-with-a-service-account"
|
187
|
+
"https://docs.zenml.io/how-to/manage-zenml-server/connecting-to-zenml/connect-with-a-service-account"
|
188
188
|
)
|
189
189
|
|
190
190
|
# The schedule, pipeline run or step run credentials are scoped to
|
zenml/services/__init__.py
CHANGED
@@ -51,19 +51,17 @@ from zenml.services.service_monitor import (
|
|
51
51
|
TCPEndpointHealthMonitor,
|
52
52
|
TCPEndpointHealthMonitorConfig,
|
53
53
|
)
|
54
|
-
from zenml.services.service_status import
|
55
|
-
from zenml.
|
56
|
-
|
54
|
+
from zenml.services.service_status import ServiceStatus
|
55
|
+
from zenml.enums import ServiceState
|
56
|
+
from zenml.models.v2.misc.service import ServiceType
|
57
57
|
|
58
58
|
__all__ = [
|
59
|
-
"ServiceState",
|
60
59
|
"ServiceConfig",
|
61
60
|
"ServiceStatus",
|
62
61
|
"ServiceEndpointProtocol",
|
63
62
|
"ServiceEndpointConfig",
|
64
63
|
"ServiceEndpointStatus",
|
65
64
|
"BaseServiceEndpoint",
|
66
|
-
"ServiceType",
|
67
65
|
"BaseService",
|
68
66
|
"ServiceEndpointHealthMonitorConfig",
|
69
67
|
"BaseServiceEndpointHealthMonitor",
|
@@ -27,12 +27,13 @@ from docker.models.containers import Container
|
|
27
27
|
from pydantic import Field
|
28
28
|
|
29
29
|
from zenml.constants import ENV_ZENML_CONFIG_PATH
|
30
|
+
from zenml.enums import ServiceState
|
30
31
|
from zenml.logger import get_logger
|
31
32
|
from zenml.services.container.container_service_endpoint import (
|
32
33
|
ContainerServiceEndpoint,
|
33
34
|
)
|
34
35
|
from zenml.services.service import BaseService, ServiceConfig
|
35
|
-
from zenml.services.service_status import
|
36
|
+
from zenml.services.service_status import ServiceStatus
|
36
37
|
from zenml.utils import docker_utils
|
37
38
|
from zenml.utils.io_utils import (
|
38
39
|
create_dir_recursive_if_not_exists,
|
@@ -26,12 +26,13 @@ import psutil
|
|
26
26
|
from psutil import NoSuchProcess
|
27
27
|
from pydantic import Field
|
28
28
|
|
29
|
+
from zenml.enums import ServiceState
|
29
30
|
from zenml.logger import get_logger
|
30
31
|
from zenml.services.local.local_service_endpoint import (
|
31
32
|
LocalDaemonServiceEndpoint,
|
32
33
|
)
|
33
34
|
from zenml.services.service import BaseService, ServiceConfig
|
34
|
-
from zenml.services.service_status import
|
35
|
+
from zenml.services.service_status import ServiceStatus
|
35
36
|
from zenml.utils.io_utils import create_dir_recursive_if_not_exists
|
36
37
|
|
37
38
|
logger = get_logger(__name__)
|
zenml/services/service.py
CHANGED
@@ -34,11 +34,12 @@ from uuid import UUID
|
|
34
34
|
from pydantic import ConfigDict
|
35
35
|
|
36
36
|
from zenml.console import console
|
37
|
+
from zenml.enums import ServiceState
|
37
38
|
from zenml.logger import get_logger
|
39
|
+
from zenml.models.v2.misc.service import ServiceType
|
38
40
|
from zenml.services.service_endpoint import BaseServiceEndpoint
|
39
41
|
from zenml.services.service_monitor import HTTPEndpointHealthMonitor
|
40
|
-
from zenml.services.service_status import
|
41
|
-
from zenml.services.service_type import ServiceType
|
42
|
+
from zenml.services.service_status import ServiceStatus
|
42
43
|
from zenml.utils import source_utils
|
43
44
|
from zenml.utils.typed_model import BaseTypedModel
|
44
45
|
|
@@ -16,9 +16,10 @@
|
|
16
16
|
from typing import Any, Optional, Tuple
|
17
17
|
|
18
18
|
from zenml.constants import DEFAULT_LOCAL_SERVICE_IP_ADDRESS
|
19
|
+
from zenml.enums import ServiceState
|
19
20
|
from zenml.logger import get_logger
|
20
21
|
from zenml.services.service_monitor import BaseServiceEndpointHealthMonitor
|
21
|
-
from zenml.services.service_status import
|
22
|
+
from zenml.services.service_status import ServiceStatus
|
22
23
|
from zenml.utils.enum_utils import StrEnum
|
23
24
|
from zenml.utils.typed_model import BaseTypedModel
|
24
25
|
|
@@ -19,8 +19,8 @@ from typing import TYPE_CHECKING, Optional, Tuple
|
|
19
19
|
import requests
|
20
20
|
from pydantic import Field
|
21
21
|
|
22
|
+
from zenml.enums import ServiceState
|
22
23
|
from zenml.logger import get_logger
|
23
|
-
from zenml.services.service_status import ServiceState
|
24
24
|
from zenml.utils.networking_utils import port_is_open
|
25
25
|
from zenml.utils.typed_model import BaseTypedModel
|
26
26
|
|
zenml/services/service_status.py
CHANGED
@@ -15,24 +15,13 @@
|
|
15
15
|
|
16
16
|
from typing import Optional
|
17
17
|
|
18
|
+
from zenml.enums import ServiceState
|
18
19
|
from zenml.logger import get_logger
|
19
|
-
from zenml.utils.enum_utils import StrEnum
|
20
20
|
from zenml.utils.typed_model import BaseTypedModel
|
21
21
|
|
22
22
|
logger = get_logger(__name__)
|
23
23
|
|
24
24
|
|
25
|
-
class ServiceState(StrEnum):
|
26
|
-
"""Possible states for the service and service endpoint."""
|
27
|
-
|
28
|
-
INACTIVE = "inactive"
|
29
|
-
ACTIVE = "active"
|
30
|
-
PENDING_STARTUP = "pending_startup"
|
31
|
-
PENDING_SHUTDOWN = "pending_shutdown"
|
32
|
-
ERROR = "error"
|
33
|
-
SCALED_TO_ZERO = "scaled_to_zero"
|
34
|
-
|
35
|
-
|
36
25
|
class ServiceStatus(BaseTypedModel):
|
37
26
|
"""Information about the status of a service or process.
|
38
27
|
|
@@ -174,7 +174,7 @@ class EntrypointFunctionDefinition(NamedTuple):
|
|
174
174
|
f"'{key}' is not JSON serializable and can not be passed as "
|
175
175
|
"a parameter. This input can either be provided by the "
|
176
176
|
"output of another step or as an external artifact: "
|
177
|
-
"https://docs.zenml.io/user-
|
177
|
+
"https://docs.zenml.io/user-guides/starter-guide/manage-artifacts#managing-artifacts-not-produced-by-zenml-pipelines"
|
178
178
|
)
|
179
179
|
|
180
180
|
try:
|
zenml/utils/dashboard_utils.py
CHANGED
@@ -15,19 +15,22 @@
|
|
15
15
|
|
16
16
|
import os
|
17
17
|
from typing import Optional
|
18
|
-
from
|
18
|
+
from urllib.parse import urlparse
|
19
19
|
|
20
20
|
from zenml import constants
|
21
21
|
from zenml.client import Client
|
22
|
+
from zenml.config.global_config import GlobalConfiguration
|
22
23
|
from zenml.enums import EnvironmentType, StoreType
|
23
24
|
from zenml.environment import get_environment
|
24
25
|
from zenml.logger import get_logger
|
25
26
|
from zenml.models import (
|
26
27
|
ComponentResponse,
|
28
|
+
ModelVersionResponse,
|
27
29
|
PipelineRunResponse,
|
28
30
|
ServerDeploymentType,
|
29
31
|
StackResponse,
|
30
32
|
)
|
33
|
+
from zenml.utils.server_utils import get_local_server
|
31
34
|
|
32
35
|
logger = get_logger(__name__)
|
33
36
|
|
@@ -79,10 +82,17 @@ def get_stack_url(stack: StackResponse) -> Optional[str]:
|
|
79
82
|
Returns:
|
80
83
|
the URL to the stack if the dashboard is available, else None.
|
81
84
|
"""
|
85
|
+
cloud_url = get_cloud_dashboard_url()
|
86
|
+
if cloud_url:
|
87
|
+
# We don't have a stack detail page here, so just link to the filtered
|
88
|
+
# list of stacks.
|
89
|
+
return f"{cloud_url}{constants.STACKS}?id={stack.id}"
|
90
|
+
|
82
91
|
base_url = get_server_dashboard_url()
|
83
92
|
|
84
93
|
if base_url:
|
85
|
-
|
94
|
+
# There is no filtering in OSS, we just link to the stack list.
|
95
|
+
return f"{base_url}{constants.STACKS}"
|
86
96
|
|
87
97
|
return None
|
88
98
|
|
@@ -96,10 +106,14 @@ def get_component_url(component: ComponentResponse) -> Optional[str]:
|
|
96
106
|
Returns:
|
97
107
|
the URL to the component if the dashboard is available, else None.
|
98
108
|
"""
|
109
|
+
cloud_url = get_cloud_dashboard_url()
|
110
|
+
if cloud_url:
|
111
|
+
return f"{cloud_url}{constants.STACK_COMPONENTS}/{component.id}"
|
112
|
+
|
99
113
|
base_url = get_server_dashboard_url()
|
100
114
|
|
101
115
|
if base_url:
|
102
|
-
return base_url
|
116
|
+
return f"{base_url}{constants.STACK_COMPONENTS}/{component.id}"
|
103
117
|
|
104
118
|
return None
|
105
119
|
|
@@ -115,7 +129,7 @@ def get_run_url(run: PipelineRunResponse) -> Optional[str]:
|
|
115
129
|
"""
|
116
130
|
cloud_url = get_cloud_dashboard_url()
|
117
131
|
if cloud_url:
|
118
|
-
return f"{cloud_url}{constants.RUNS}/{run.id}"
|
132
|
+
return f"{cloud_url}{constants.PROJECTS}/{run.project.id}{constants.RUNS}/{run.id}"
|
119
133
|
|
120
134
|
dashboard_url = get_server_dashboard_url()
|
121
135
|
if dashboard_url:
|
@@ -124,23 +138,25 @@ def get_run_url(run: PipelineRunResponse) -> Optional[str]:
|
|
124
138
|
return None
|
125
139
|
|
126
140
|
|
127
|
-
def get_model_version_url(
|
141
|
+
def get_model_version_url(
|
142
|
+
model_version: ModelVersionResponse,
|
143
|
+
) -> Optional[str]:
|
128
144
|
"""Function to get the dashboard URL of a given model version.
|
129
145
|
|
130
146
|
Args:
|
131
|
-
|
147
|
+
model_version: the response model of the given model version.
|
132
148
|
|
133
149
|
Returns:
|
134
150
|
the URL to the model version if the dashboard is available, else None.
|
135
151
|
"""
|
136
152
|
cloud_url = get_cloud_dashboard_url()
|
137
153
|
if cloud_url:
|
138
|
-
return f"{cloud_url}/model-versions/{str(
|
154
|
+
return f"{cloud_url}{constants.PROJECTS}/{model_version.project.id}/model-versions/{str(model_version.id)}"
|
139
155
|
|
140
156
|
return None
|
141
157
|
|
142
158
|
|
143
|
-
def
|
159
|
+
def show_dashboard_with_url(url: str) -> None:
|
144
160
|
"""Show the ZenML dashboard at the given URL.
|
145
161
|
|
146
162
|
In native environments, the dashboard is opened in the default browser.
|
@@ -202,3 +218,52 @@ def show_dashboard(url: str) -> None:
|
|
202
218
|
|
203
219
|
else:
|
204
220
|
logger.info(f"The ZenML dashboard is available at {url}.")
|
221
|
+
|
222
|
+
|
223
|
+
def show_dashboard(
|
224
|
+
local: bool = False,
|
225
|
+
ngrok_token: Optional[str] = None,
|
226
|
+
) -> None:
|
227
|
+
"""Show the ZenML dashboard.
|
228
|
+
|
229
|
+
Args:
|
230
|
+
local: Whether to show the dashboard for the local server or the
|
231
|
+
one for the active server.
|
232
|
+
ngrok_token: An ngrok auth token to use for exposing the ZenML
|
233
|
+
dashboard on a public domain. Primarily used for accessing the
|
234
|
+
dashboard in Colab.
|
235
|
+
|
236
|
+
Raises:
|
237
|
+
RuntimeError: If no server is connected.
|
238
|
+
"""
|
239
|
+
from zenml.utils.networking_utils import get_or_create_ngrok_tunnel
|
240
|
+
|
241
|
+
url: Optional[str] = None
|
242
|
+
if not local:
|
243
|
+
gc = GlobalConfiguration()
|
244
|
+
if gc.store_configuration.type == StoreType.REST:
|
245
|
+
url = gc.store_configuration.url
|
246
|
+
|
247
|
+
if not url:
|
248
|
+
# Else, check for local servers
|
249
|
+
server = get_local_server()
|
250
|
+
if server and server.status and server.status.url:
|
251
|
+
url = server.status.url
|
252
|
+
|
253
|
+
if not url:
|
254
|
+
raise RuntimeError(
|
255
|
+
"ZenML is not connected to any server right now. Please use "
|
256
|
+
"`zenml login` to connect to a server or spin up a new local server "
|
257
|
+
"via `zenml login --local`."
|
258
|
+
)
|
259
|
+
|
260
|
+
if ngrok_token:
|
261
|
+
parsed_url = urlparse(url)
|
262
|
+
|
263
|
+
ngrok_url = get_or_create_ngrok_tunnel(
|
264
|
+
ngrok_token=ngrok_token, port=parsed_url.port or 80
|
265
|
+
)
|
266
|
+
logger.debug(f"Tunneling dashboard from {url} to {ngrok_url}.")
|
267
|
+
url = ngrok_url
|
268
|
+
|
269
|
+
show_dashboard_with_url(url)
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# Copyright (c) ZenML GmbH 2025. 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
|
+
"""Utility functions for ZenML servers."""
|
15
|
+
|
16
|
+
from typing import TYPE_CHECKING, Optional
|
17
|
+
|
18
|
+
if TYPE_CHECKING:
|
19
|
+
from zenml.zen_server.deploy import LocalServerDeployment
|
20
|
+
|
21
|
+
|
22
|
+
def get_local_server() -> Optional["LocalServerDeployment"]:
|
23
|
+
"""Get the active local server.
|
24
|
+
|
25
|
+
Call this function to retrieve the local server deployed on this machine.
|
26
|
+
|
27
|
+
Returns:
|
28
|
+
The local server deployment or None, if no local server deployment was
|
29
|
+
found.
|
30
|
+
"""
|
31
|
+
from zenml.zen_server.deploy.deployer import LocalServerDeployer
|
32
|
+
from zenml.zen_server.deploy.exceptions import (
|
33
|
+
ServerDeploymentNotFoundError,
|
34
|
+
)
|
35
|
+
|
36
|
+
deployer = LocalServerDeployer()
|
37
|
+
try:
|
38
|
+
return deployer.get_server()
|
39
|
+
except ServerDeploymentNotFoundError:
|
40
|
+
return None
|
41
|
+
|
42
|
+
|
43
|
+
def connected_to_local_server() -> bool:
|
44
|
+
"""Check if the client is connected to a local server.
|
45
|
+
|
46
|
+
Returns:
|
47
|
+
True if the client is connected to a local server, False otherwise.
|
48
|
+
"""
|
49
|
+
from zenml.zen_server.deploy.deployer import LocalServerDeployer
|
50
|
+
|
51
|
+
deployer = LocalServerDeployer()
|
52
|
+
return deployer.is_connected_to_server()
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e}from"./@radix-AvWw-1nd.js";import{
|
1
|
+
import{j as e}from"./@radix-AvWw-1nd.js";import{h as s,r as t}from"./index-DPjvk73v.js";import{E as r}from"./EmptyState-DpbfQBDE.js";import{S as a}from"./help-CfT0tY2I.js";import{L as o}from"./@react-router-BUo5vhN4.js";import"./@tanstack-CcI3lvwB.js";import"./@reactflow-BHoFKFSZ.js";function d(){return e.jsx("div",{className:"flex min-h-screen w-full flex-col",children:e.jsx(r,{icon:e.jsx(a,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-2 text-display-xs font-semibold",children:"We can't find the page you are looking for"}),e.jsx("p",{className:"text-lg text-theme-text-secondary",children:"You can try typing a different URL or we can bring you back to your Homepage."}),e.jsx("div",{className:"mt-5 flex justify-center",children:e.jsx(s,{size:"md",asChild:!0,children:e.jsx(o,{className:"w-min self-center whitespace-nowrap",to:t.home,children:e.jsx("span",{className:"px-0.5",children:"Go to Home"})})})})]})})})}export{d as default};
|