zenml-nightly 0.75.0.dev20250313__py3-none-any.whl → 0.75.0.dev20250315__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/analytics/context.py +4 -4
- zenml/analytics/enums.py +2 -2
- zenml/artifacts/utils.py +2 -2
- zenml/cli/__init__.py +8 -9
- zenml/cli/base.py +2 -2
- zenml/cli/code_repository.py +1 -1
- zenml/cli/login.py +21 -18
- zenml/cli/pipeline.py +3 -3
- zenml/cli/project.py +172 -0
- zenml/cli/server.py +5 -5
- zenml/cli/service_accounts.py +0 -1
- zenml/cli/service_connectors.py +15 -16
- zenml/cli/stack.py +0 -2
- zenml/cli/stack_components.py +2 -2
- zenml/cli/utils.py +3 -3
- zenml/client.py +352 -341
- zenml/config/global_config.py +41 -43
- zenml/config/server_config.py +9 -9
- zenml/constants.py +5 -3
- zenml/event_hub/event_hub.py +1 -1
- zenml/integrations/gcp/__init__.py +1 -0
- zenml/integrations/gcp/flavors/vertex_orchestrator_flavor.py +5 -0
- zenml/integrations/gcp/flavors/vertex_step_operator_flavor.py +5 -28
- zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +125 -78
- zenml/integrations/gcp/service_connectors/gcp_service_connector.py +7 -6
- zenml/integrations/gcp/vertex_custom_job_parameters.py +50 -0
- zenml/integrations/mlflow/steps/mlflow_registry.py +3 -3
- zenml/integrations/wandb/__init__.py +1 -1
- zenml/integrations/wandb/experiment_trackers/wandb_experiment_tracker.py +29 -9
- zenml/integrations/wandb/flavors/wandb_experiment_tracker_flavor.py +2 -0
- zenml/login/credentials.py +26 -27
- zenml/login/credentials_store.py +5 -5
- zenml/login/pro/client.py +9 -9
- zenml/login/pro/utils.py +8 -8
- zenml/login/pro/{tenant → workspace}/__init__.py +1 -1
- zenml/login/pro/{tenant → workspace}/client.py +25 -25
- zenml/login/pro/{tenant → workspace}/models.py +27 -28
- zenml/model/model.py +2 -2
- zenml/model_registries/base_model_registry.py +1 -1
- zenml/models/__init__.py +29 -29
- zenml/models/v2/base/filter.py +1 -1
- zenml/models/v2/base/scoped.py +49 -53
- zenml/models/v2/core/action.py +12 -12
- zenml/models/v2/core/artifact.py +15 -15
- zenml/models/v2/core/artifact_version.py +15 -15
- zenml/models/v2/core/code_repository.py +12 -12
- zenml/models/v2/core/event_source.py +12 -12
- zenml/models/v2/core/model.py +26 -18
- zenml/models/v2/core/model_version.py +15 -15
- zenml/models/v2/core/pipeline.py +15 -15
- zenml/models/v2/core/pipeline_build.py +14 -14
- zenml/models/v2/core/pipeline_deployment.py +12 -14
- zenml/models/v2/core/pipeline_run.py +16 -16
- zenml/models/v2/core/project.py +203 -0
- zenml/models/v2/core/run_metadata.py +2 -2
- zenml/models/v2/core/run_template.py +15 -15
- zenml/models/v2/core/schedule.py +12 -12
- zenml/models/v2/core/secret.py +1 -1
- zenml/models/v2/core/service.py +14 -14
- zenml/models/v2/core/step_run.py +13 -13
- zenml/models/v2/core/tag.py +96 -3
- zenml/models/v2/core/trigger.py +13 -13
- zenml/models/v2/core/trigger_execution.py +2 -2
- zenml/models/v2/core/user.py +0 -17
- zenml/models/v2/misc/server_models.py +6 -6
- zenml/models/v2/misc/statistics.py +4 -4
- zenml/orchestrators/cache_utils.py +7 -7
- zenml/orchestrators/input_utils.py +1 -1
- zenml/orchestrators/step_launcher.py +1 -1
- zenml/orchestrators/step_run_utils.py +3 -3
- zenml/orchestrators/utils.py +4 -4
- zenml/pipelines/build_utils.py +2 -2
- zenml/pipelines/pipeline_definition.py +5 -5
- zenml/pipelines/run_utils.py +1 -1
- zenml/service_connectors/service_connector.py +0 -3
- zenml/service_connectors/service_connector_utils.py +0 -1
- zenml/stack/stack.py +0 -1
- zenml/steps/base_step.py +10 -2
- zenml/utils/dashboard_utils.py +1 -1
- zenml/utils/tag_utils.py +0 -12
- zenml/zen_server/cloud_utils.py +3 -3
- zenml/zen_server/feature_gate/endpoint_utils.py +1 -1
- zenml/zen_server/feature_gate/zenml_cloud_feature_gate.py +1 -1
- zenml/zen_server/rbac/endpoint_utils.py +17 -17
- zenml/zen_server/rbac/models.py +47 -22
- zenml/zen_server/rbac/rbac_sql_zen_store.py +3 -3
- zenml/zen_server/rbac/utils.py +23 -25
- zenml/zen_server/rbac/zenml_cloud_rbac.py +7 -74
- zenml/zen_server/routers/artifact_version_endpoints.py +10 -10
- zenml/zen_server/routers/auth_endpoints.py +6 -6
- zenml/zen_server/routers/code_repositories_endpoints.py +12 -14
- zenml/zen_server/routers/model_versions_endpoints.py +13 -15
- zenml/zen_server/routers/models_endpoints.py +7 -9
- zenml/zen_server/routers/pipeline_builds_endpoints.py +14 -16
- zenml/zen_server/routers/pipeline_deployments_endpoints.py +13 -15
- zenml/zen_server/routers/pipelines_endpoints.py +16 -18
- zenml/zen_server/routers/{workspaces_endpoints.py → projects_endpoints.py} +111 -68
- zenml/zen_server/routers/run_metadata_endpoints.py +7 -9
- zenml/zen_server/routers/run_templates_endpoints.py +15 -17
- zenml/zen_server/routers/runs_endpoints.py +12 -14
- zenml/zen_server/routers/schedule_endpoints.py +12 -14
- zenml/zen_server/routers/secrets_endpoints.py +1 -3
- zenml/zen_server/routers/server_endpoints.py +7 -7
- zenml/zen_server/routers/service_connectors_endpoints.py +11 -13
- zenml/zen_server/routers/service_endpoints.py +7 -9
- zenml/zen_server/routers/stack_components_endpoints.py +9 -11
- zenml/zen_server/routers/stacks_endpoints.py +9 -11
- zenml/zen_server/routers/steps_endpoints.py +6 -6
- zenml/zen_server/routers/users_endpoints.py +5 -43
- zenml/zen_server/template_execution/utils.py +4 -4
- zenml/zen_server/utils.py +10 -10
- zenml/zen_server/zen_server_api.py +6 -5
- zenml/zen_stores/base_zen_store.py +38 -42
- zenml/zen_stores/migrations/versions/12eff0206201_rename_workspace_to_project.py +768 -0
- zenml/zen_stores/migrations/versions/41b28cae31ce_make_artifacts_workspace_scoped.py +3 -3
- zenml/zen_stores/migrations/versions/cbc6acd71f92_add_workspace_display_name.py +58 -0
- zenml/zen_stores/rest_zen_store.py +55 -63
- zenml/zen_stores/schemas/__init__.py +2 -2
- zenml/zen_stores/schemas/action_schemas.py +9 -9
- zenml/zen_stores/schemas/artifact_schemas.py +15 -17
- zenml/zen_stores/schemas/code_repository_schemas.py +16 -18
- zenml/zen_stores/schemas/event_source_schemas.py +9 -9
- zenml/zen_stores/schemas/model_schemas.py +15 -17
- zenml/zen_stores/schemas/pipeline_build_schemas.py +7 -7
- zenml/zen_stores/schemas/pipeline_deployment_schemas.py +7 -7
- zenml/zen_stores/schemas/pipeline_run_schemas.py +9 -9
- zenml/zen_stores/schemas/pipeline_schemas.py +9 -9
- zenml/zen_stores/schemas/{workspace_schemas.py → project_schemas.py} +47 -41
- zenml/zen_stores/schemas/run_metadata_schemas.py +5 -5
- zenml/zen_stores/schemas/run_template_schemas.py +9 -9
- zenml/zen_stores/schemas/schedule_schema.py +9 -9
- zenml/zen_stores/schemas/service_schemas.py +7 -7
- zenml/zen_stores/schemas/step_run_schemas.py +7 -7
- zenml/zen_stores/schemas/trigger_schemas.py +9 -9
- zenml/zen_stores/schemas/user_schemas.py +0 -12
- zenml/zen_stores/sql_zen_store.py +318 -275
- zenml/zen_stores/zen_store_interface.py +56 -70
- {zenml_nightly-0.75.0.dev20250313.dist-info → zenml_nightly-0.75.0.dev20250315.dist-info}/METADATA +1 -1
- {zenml_nightly-0.75.0.dev20250313.dist-info → zenml_nightly-0.75.0.dev20250315.dist-info}/RECORD +143 -140
- zenml/cli/workspace.py +0 -160
- zenml/models/v2/core/workspace.py +0 -131
- {zenml_nightly-0.75.0.dev20250313.dist-info → zenml_nightly-0.75.0.dev20250315.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.75.0.dev20250313.dist-info → zenml_nightly-0.75.0.dev20250315.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.75.0.dev20250313.dist-info → zenml_nightly-0.75.0.dev20250315.dist-info}/entry_points.txt +0 -0
@@ -90,6 +90,10 @@ from zenml.models import (
|
|
90
90
|
PipelineRunResponse,
|
91
91
|
PipelineRunUpdate,
|
92
92
|
PipelineUpdate,
|
93
|
+
ProjectFilter,
|
94
|
+
ProjectRequest,
|
95
|
+
ProjectResponse,
|
96
|
+
ProjectUpdate,
|
93
97
|
RunMetadataRequest,
|
94
98
|
RunTemplateFilter,
|
95
99
|
RunTemplateRequest,
|
@@ -146,10 +150,6 @@ from zenml.models import (
|
|
146
150
|
UserRequest,
|
147
151
|
UserResponse,
|
148
152
|
UserUpdate,
|
149
|
-
WorkspaceFilter,
|
150
|
-
WorkspaceRequest,
|
151
|
-
WorkspaceResponse,
|
152
|
-
WorkspaceUpdate,
|
153
153
|
)
|
154
154
|
|
155
155
|
|
@@ -196,24 +196,19 @@ class ZenStoreInterface(ABC):
|
|
196
196
|
them call the generic get or list method in this interface.
|
197
197
|
* keep the logic required to convert between ZenML domain Model classes
|
198
198
|
and internal store representations outside the ZenML domain Model classes
|
199
|
-
* methods for resources that have two or more unique keys (e.g. a
|
199
|
+
* methods for resources that have two or more unique keys (e.g. a project
|
200
200
|
is uniquely identified by its name as well as its UUID) should reflect
|
201
201
|
that in the method variants and/or method arguments:
|
202
202
|
* methods that take in a resource identifier as argument should accept
|
203
|
-
all variants of the identifier (e.g. `
|
204
|
-
that get/list/update/delete
|
203
|
+
all variants of the identifier (e.g. `project_name_or_uuid` for methods
|
204
|
+
that get/list/update/delete projects)
|
205
205
|
* if a compound key is involved, separate get methods should be
|
206
206
|
implemented (e.g. `get_pipeline` to get a pipeline by ID and
|
207
|
-
`
|
208
|
-
the
|
207
|
+
`get_pipeline_in_project` to get a pipeline by its name and the ID of
|
208
|
+
the project it belongs to)
|
209
209
|
* methods for resources that are scoped as children of other resources
|
210
|
-
(e.g. a
|
211
|
-
key(s) of the parent resource in the provided
|
212
|
-
arguments:
|
213
|
-
* create methods should take the parent resource UUID(s) as an argument
|
214
|
-
(e.g. `create_stack` takes in the workspace ID)
|
215
|
-
* get methods should be provided to retrieve a resource by the compound
|
216
|
-
key that includes the parent resource key(s)
|
210
|
+
(e.g. a pipeline is always owned by a project) should reflect the
|
211
|
+
key(s) of the parent resource in the provided method arguments:
|
217
212
|
* list methods should feature optional filter arguments that reflect
|
218
213
|
the parent resource key(s)
|
219
214
|
"""
|
@@ -746,13 +741,13 @@ class ZenStoreInterface(ABC):
|
|
746
741
|
@abstractmethod
|
747
742
|
def prune_artifact_versions(
|
748
743
|
self,
|
749
|
-
|
744
|
+
project_name_or_id: Union[str, UUID],
|
750
745
|
only_versions: bool = True,
|
751
746
|
) -> None:
|
752
747
|
"""Prunes unused artifact versions and their artifacts.
|
753
748
|
|
754
749
|
Args:
|
755
|
-
|
750
|
+
project_name_or_id: The project name or ID to prune artifact
|
756
751
|
versions for.
|
757
752
|
only_versions: Only delete artifact versions, keeping artifacts
|
758
753
|
"""
|
@@ -895,7 +890,7 @@ class ZenStoreInterface(ABC):
|
|
895
890
|
|
896
891
|
Raises:
|
897
892
|
EntityExistsError: If a stack component with the same name
|
898
|
-
and type
|
893
|
+
and type already exists.
|
899
894
|
"""
|
900
895
|
|
901
896
|
@abstractmethod
|
@@ -1048,7 +1043,7 @@ class ZenStoreInterface(ABC):
|
|
1048
1043
|
|
1049
1044
|
Raises:
|
1050
1045
|
EntityExistsError: If a flavor with the same name and type
|
1051
|
-
|
1046
|
+
already exists.
|
1052
1047
|
"""
|
1053
1048
|
|
1054
1049
|
@abstractmethod
|
@@ -1136,7 +1131,7 @@ class ZenStoreInterface(ABC):
|
|
1136
1131
|
self,
|
1137
1132
|
pipeline: PipelineRequest,
|
1138
1133
|
) -> PipelineResponse:
|
1139
|
-
"""Creates a new pipeline
|
1134
|
+
"""Creates a new pipeline.
|
1140
1135
|
|
1141
1136
|
Args:
|
1142
1137
|
pipeline: The pipeline to create.
|
@@ -1145,7 +1140,6 @@ class ZenStoreInterface(ABC):
|
|
1145
1140
|
The newly created pipeline.
|
1146
1141
|
|
1147
1142
|
Raises:
|
1148
|
-
KeyError: if the workspace does not exist.
|
1149
1143
|
EntityExistsError: If an identical pipeline already exists.
|
1150
1144
|
"""
|
1151
1145
|
|
@@ -1222,7 +1216,7 @@ class ZenStoreInterface(ABC):
|
|
1222
1216
|
self,
|
1223
1217
|
build: PipelineBuildRequest,
|
1224
1218
|
) -> PipelineBuildResponse:
|
1225
|
-
"""Creates a new build
|
1219
|
+
"""Creates a new build.
|
1226
1220
|
|
1227
1221
|
Args:
|
1228
1222
|
build: The build to create.
|
@@ -1231,7 +1225,6 @@ class ZenStoreInterface(ABC):
|
|
1231
1225
|
The newly created build.
|
1232
1226
|
|
1233
1227
|
Raises:
|
1234
|
-
KeyError: If the workspace does not exist.
|
1235
1228
|
EntityExistsError: If an identical build already exists.
|
1236
1229
|
"""
|
1237
1230
|
|
@@ -1289,7 +1282,7 @@ class ZenStoreInterface(ABC):
|
|
1289
1282
|
self,
|
1290
1283
|
deployment: PipelineDeploymentRequest,
|
1291
1284
|
) -> PipelineDeploymentResponse:
|
1292
|
-
"""Creates a new deployment
|
1285
|
+
"""Creates a new deployment.
|
1293
1286
|
|
1294
1287
|
Args:
|
1295
1288
|
deployment: The deployment to create.
|
@@ -1298,7 +1291,6 @@ class ZenStoreInterface(ABC):
|
|
1298
1291
|
The newly created deployment.
|
1299
1292
|
|
1300
1293
|
Raises:
|
1301
|
-
KeyError: If the workspace does not exist.
|
1302
1294
|
EntityExistsError: If an identical deployment already exists.
|
1303
1295
|
"""
|
1304
1296
|
|
@@ -1666,7 +1658,7 @@ class ZenStoreInterface(ABC):
|
|
1666
1658
|
schedule_filter_model: ScheduleFilter,
|
1667
1659
|
hydrate: bool = False,
|
1668
1660
|
) -> Page[ScheduleResponse]:
|
1669
|
-
"""List all schedules
|
1661
|
+
"""List all schedules.
|
1670
1662
|
|
1671
1663
|
Args:
|
1672
1664
|
schedule_filter_model: All filter parameters including pagination
|
@@ -1720,10 +1712,8 @@ class ZenStoreInterface(ABC):
|
|
1720
1712
|
The new secret is also validated against the scoping rules enforced in
|
1721
1713
|
the secrets store:
|
1722
1714
|
|
1723
|
-
- only one
|
1724
|
-
|
1725
|
-
- only one user-scoped secret with the given name can exist in the
|
1726
|
-
target workspace for the target user.
|
1715
|
+
- only one private secret with the given name can exist.
|
1716
|
+
- only one public secret with the given name can exist.
|
1727
1717
|
|
1728
1718
|
Args:
|
1729
1719
|
secret: The secret to create.
|
@@ -1732,7 +1722,7 @@ class ZenStoreInterface(ABC):
|
|
1732
1722
|
The newly created secret.
|
1733
1723
|
|
1734
1724
|
Raises:
|
1735
|
-
KeyError: if the user
|
1725
|
+
KeyError: if the user does not exist.
|
1736
1726
|
EntityExistsError: If a secret with the same name already exists in
|
1737
1727
|
the same scope.
|
1738
1728
|
"""
|
@@ -1794,10 +1784,8 @@ class ZenStoreInterface(ABC):
|
|
1794
1784
|
If the update includes a change of name or scope, the scoping rules
|
1795
1785
|
enforced in the secrets store are used to validate the update:
|
1796
1786
|
|
1797
|
-
- only one
|
1798
|
-
|
1799
|
-
- only one user-scoped secret with the given name can exist in the
|
1800
|
-
target workspace for the target user.
|
1787
|
+
- only one private secret with the given name can exist.
|
1788
|
+
- only one public secret with the given name can exist.
|
1801
1789
|
|
1802
1790
|
Args:
|
1803
1791
|
secret_id: The ID of the secret to be updated.
|
@@ -1973,7 +1961,7 @@ class ZenStoreInterface(ABC):
|
|
1973
1961
|
|
1974
1962
|
Raises:
|
1975
1963
|
EntityExistsError: If a service connector with the given name
|
1976
|
-
|
1964
|
+
already exists.
|
1977
1965
|
"""
|
1978
1966
|
|
1979
1967
|
@abstractmethod
|
@@ -2606,86 +2594,84 @@ class ZenStoreInterface(ABC):
|
|
2606
2594
|
KeyError: If no user with the given ID exists.
|
2607
2595
|
"""
|
2608
2596
|
|
2609
|
-
# --------------------
|
2597
|
+
# -------------------- Projects --------------------
|
2610
2598
|
|
2611
2599
|
@abstractmethod
|
2612
|
-
def
|
2613
|
-
|
2614
|
-
) -> WorkspaceResponse:
|
2615
|
-
"""Creates a new workspace.
|
2600
|
+
def create_project(self, project: ProjectRequest) -> ProjectResponse:
|
2601
|
+
"""Creates a new project.
|
2616
2602
|
|
2617
2603
|
Args:
|
2618
|
-
|
2604
|
+
project: The project to create.
|
2619
2605
|
|
2620
2606
|
Returns:
|
2621
|
-
The newly created
|
2607
|
+
The newly created project.
|
2622
2608
|
|
2623
2609
|
Raises:
|
2624
|
-
EntityExistsError: If a
|
2610
|
+
EntityExistsError: If a project with the given name already exists.
|
2625
2611
|
"""
|
2626
2612
|
|
2627
2613
|
@abstractmethod
|
2628
|
-
def
|
2629
|
-
self,
|
2630
|
-
) ->
|
2631
|
-
"""Get an existing
|
2614
|
+
def get_project(
|
2615
|
+
self, project_name_or_id: Union[UUID, str], hydrate: bool = True
|
2616
|
+
) -> ProjectResponse:
|
2617
|
+
"""Get an existing project by name or ID.
|
2632
2618
|
|
2633
2619
|
Args:
|
2634
|
-
|
2620
|
+
project_name_or_id: Name or ID of the project to get.
|
2635
2621
|
hydrate: Flag deciding whether to hydrate the output model(s)
|
2636
2622
|
by including metadata fields in the response.
|
2637
2623
|
|
2638
2624
|
Returns:
|
2639
|
-
The requested
|
2625
|
+
The requested project.
|
2640
2626
|
|
2641
2627
|
Raises:
|
2642
|
-
KeyError: If there is no such
|
2628
|
+
KeyError: If there is no such project.
|
2643
2629
|
"""
|
2644
2630
|
|
2645
2631
|
@abstractmethod
|
2646
|
-
def
|
2632
|
+
def list_projects(
|
2647
2633
|
self,
|
2648
|
-
|
2634
|
+
project_filter_model: ProjectFilter,
|
2649
2635
|
hydrate: bool = False,
|
2650
|
-
) -> Page[
|
2651
|
-
"""List all
|
2636
|
+
) -> Page[ProjectResponse]:
|
2637
|
+
"""List all projects matching the given filter criteria.
|
2652
2638
|
|
2653
2639
|
Args:
|
2654
|
-
|
2640
|
+
project_filter_model: All filter parameters including pagination
|
2655
2641
|
params.
|
2656
2642
|
hydrate: Flag deciding whether to hydrate the output model(s)
|
2657
2643
|
by including metadata fields in the response.
|
2658
2644
|
|
2659
2645
|
Returns:
|
2660
|
-
A list of all
|
2646
|
+
A list of all projects matching the filter criteria.
|
2661
2647
|
"""
|
2662
2648
|
|
2663
2649
|
@abstractmethod
|
2664
|
-
def
|
2665
|
-
self,
|
2666
|
-
) ->
|
2667
|
-
"""Update an existing
|
2650
|
+
def update_project(
|
2651
|
+
self, project_id: UUID, project_update: ProjectUpdate
|
2652
|
+
) -> ProjectResponse:
|
2653
|
+
"""Update an existing project.
|
2668
2654
|
|
2669
2655
|
Args:
|
2670
|
-
|
2671
|
-
|
2656
|
+
project_id: The ID of the project to be updated.
|
2657
|
+
project_update: The update to be applied to the project.
|
2672
2658
|
|
2673
2659
|
Returns:
|
2674
|
-
The updated
|
2660
|
+
The updated project.
|
2675
2661
|
|
2676
2662
|
Raises:
|
2677
|
-
KeyError: if the
|
2663
|
+
KeyError: if the project does not exist.
|
2678
2664
|
"""
|
2679
2665
|
|
2680
2666
|
@abstractmethod
|
2681
|
-
def
|
2682
|
-
"""Deletes a
|
2667
|
+
def delete_project(self, project_name_or_id: Union[str, UUID]) -> None:
|
2668
|
+
"""Deletes a project.
|
2683
2669
|
|
2684
2670
|
Args:
|
2685
|
-
|
2671
|
+
project_name_or_id: Name or ID of the project to delete.
|
2686
2672
|
|
2687
2673
|
Raises:
|
2688
|
-
KeyError: If no
|
2674
|
+
KeyError: If no project with the given name exists.
|
2689
2675
|
"""
|
2690
2676
|
|
2691
2677
|
# -------------------- Models --------------------
|