zenml-nightly 0.75.0.dev20250312__py3-none-any.whl → 0.75.0.dev20250314__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 +2 -0
- zenml/analytics/context.py +7 -0
- zenml/analytics/enums.py +2 -2
- zenml/artifacts/utils.py +2 -4
- zenml/cli/__init__.py +8 -9
- zenml/cli/base.py +2 -2
- zenml/cli/code_repository.py +1 -1
- zenml/cli/login.py +6 -0
- zenml/cli/model.py +7 -15
- zenml/cli/pipeline.py +3 -3
- zenml/cli/project.py +172 -0
- zenml/cli/secret.py +47 -44
- zenml/cli/service_accounts.py +0 -1
- zenml/cli/service_connectors.py +15 -17
- zenml/cli/stack.py +0 -3
- zenml/cli/stack_components.py +2 -2
- zenml/cli/tag.py +3 -5
- zenml/cli/utils.py +25 -23
- zenml/client.py +749 -475
- zenml/config/global_config.py +48 -37
- zenml/config/pipeline_configurations.py +3 -2
- zenml/config/pipeline_run_configuration.py +2 -1
- zenml/config/secret_reference_mixin.py +1 -1
- zenml/constants.py +6 -6
- zenml/enums.py +0 -7
- zenml/event_hub/event_hub.py +3 -1
- zenml/exceptions.py +0 -24
- zenml/integrations/aws/orchestrators/sagemaker_orchestrator.py +5 -3
- zenml/integrations/bitbucket/plugins/event_sources/bitbucket_webhook_event_source.py +1 -4
- zenml/integrations/gcp/service_connectors/gcp_service_connector.py +7 -6
- zenml/integrations/github/plugins/event_sources/github_webhook_event_source.py +1 -4
- zenml/integrations/mlflow/steps/mlflow_registry.py +3 -3
- zenml/integrations/seldon/model_deployers/seldon_model_deployer.py +1 -1
- 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 +5 -3
- zenml/model/model.py +10 -10
- zenml/model_registries/base_model_registry.py +1 -1
- zenml/models/__init__.py +45 -28
- zenml/models/v2/base/base.py +0 -5
- zenml/models/v2/base/filter.py +2 -2
- zenml/models/v2/base/scoped.py +135 -156
- zenml/models/v2/core/action.py +12 -12
- zenml/models/v2/core/api_key.py +1 -1
- zenml/models/v2/core/artifact.py +31 -18
- zenml/models/v2/core/artifact_version.py +57 -40
- zenml/models/v2/core/code_repository.py +12 -12
- zenml/models/v2/core/component.py +22 -33
- zenml/models/v2/core/device.py +3 -2
- zenml/models/v2/core/event_source.py +14 -14
- zenml/models/v2/core/flavor.py +19 -47
- zenml/models/v2/core/logs.py +1 -2
- zenml/models/v2/core/model.py +23 -20
- zenml/models/v2/core/model_version.py +51 -42
- zenml/models/v2/core/pipeline.py +16 -16
- 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 +21 -29
- zenml/models/v2/core/project.py +203 -0
- zenml/models/v2/core/run_metadata.py +2 -2
- zenml/models/v2/core/run_template.py +16 -17
- zenml/models/v2/core/schedule.py +12 -21
- zenml/models/v2/core/secret.py +94 -128
- zenml/models/v2/core/server_settings.py +2 -2
- zenml/models/v2/core/service.py +57 -26
- zenml/models/v2/core/service_connector.py +14 -16
- zenml/models/v2/core/stack.py +24 -26
- zenml/models/v2/core/step_run.py +16 -28
- zenml/models/v2/core/tag.py +41 -15
- zenml/models/v2/core/trigger.py +13 -13
- zenml/models/v2/core/trigger_execution.py +2 -2
- zenml/models/v2/core/user.py +2 -2
- zenml/models/v2/misc/statistics.py +45 -0
- zenml/models/v2/misc/tag.py +27 -0
- zenml/orchestrators/cache_utils.py +7 -7
- zenml/orchestrators/input_utils.py +1 -0
- zenml/orchestrators/step_launcher.py +1 -2
- zenml/orchestrators/step_run_utils.py +2 -4
- zenml/orchestrators/step_runner.py +10 -1
- zenml/orchestrators/utils.py +4 -4
- zenml/pipelines/build_utils.py +2 -4
- zenml/pipelines/pipeline_decorator.py +3 -2
- zenml/pipelines/pipeline_definition.py +8 -9
- zenml/pipelines/run_utils.py +4 -4
- zenml/service_connectors/service_connector.py +0 -10
- zenml/service_connectors/service_connector_utils.py +0 -2
- zenml/stack/authentication_mixin.py +1 -1
- zenml/stack/flavor.py +3 -14
- zenml/stack/stack.py +0 -1
- zenml/stack/stack_component.py +1 -5
- zenml/steps/base_step.py +10 -2
- zenml/steps/step_context.py +19 -0
- zenml/utils/string_utils.py +1 -1
- zenml/utils/tag_utils.py +642 -0
- zenml/zen_server/cloud_utils.py +21 -0
- zenml/zen_server/exceptions.py +0 -6
- zenml/zen_server/rbac/endpoint_utils.py +134 -46
- zenml/zen_server/rbac/models.py +65 -3
- zenml/zen_server/rbac/rbac_interface.py +9 -0
- zenml/zen_server/rbac/rbac_sql_zen_store.py +15 -7
- zenml/zen_server/rbac/utils.py +155 -30
- zenml/zen_server/rbac/zenml_cloud_rbac.py +39 -11
- zenml/zen_server/routers/actions_endpoints.py +3 -5
- zenml/zen_server/routers/artifact_endpoint.py +0 -5
- zenml/zen_server/routers/artifact_version_endpoints.py +15 -9
- zenml/zen_server/routers/auth_endpoints.py +22 -7
- zenml/zen_server/routers/code_repositories_endpoints.py +54 -3
- zenml/zen_server/routers/devices_endpoints.py +0 -4
- zenml/zen_server/routers/event_source_endpoints.py +0 -5
- zenml/zen_server/routers/flavors_endpoints.py +0 -5
- zenml/zen_server/routers/logs_endpoints.py +0 -1
- zenml/zen_server/routers/model_versions_endpoints.py +100 -23
- zenml/zen_server/routers/models_endpoints.py +50 -69
- zenml/zen_server/routers/pipeline_builds_endpoints.py +55 -3
- zenml/zen_server/routers/pipeline_deployments_endpoints.py +56 -4
- zenml/zen_server/routers/pipelines_endpoints.py +70 -3
- zenml/zen_server/routers/plugin_endpoints.py +0 -1
- zenml/zen_server/routers/projects_endpoints.py +283 -0
- zenml/zen_server/routers/run_metadata_endpoints.py +97 -0
- zenml/zen_server/routers/run_templates_endpoints.py +64 -3
- zenml/zen_server/routers/runs_endpoints.py +58 -8
- zenml/zen_server/routers/schedule_endpoints.py +67 -6
- zenml/zen_server/routers/secrets_endpoints.py +38 -4
- zenml/zen_server/routers/server_endpoints.py +53 -1
- zenml/zen_server/routers/service_accounts_endpoints.py +14 -15
- zenml/zen_server/routers/service_connectors_endpoints.py +94 -14
- zenml/zen_server/routers/service_endpoints.py +18 -7
- zenml/zen_server/routers/stack_components_endpoints.py +66 -7
- zenml/zen_server/routers/stacks_endpoints.py +95 -6
- zenml/zen_server/routers/steps_endpoints.py +17 -11
- zenml/zen_server/routers/tag_resource_endpoints.py +115 -0
- zenml/zen_server/routers/tags_endpoints.py +6 -17
- zenml/zen_server/routers/triggers_endpoints.py +5 -8
- zenml/zen_server/routers/users_endpoints.py +9 -12
- zenml/zen_server/template_execution/utils.py +8 -7
- zenml/zen_server/utils.py +21 -0
- zenml/zen_server/zen_server_api.py +7 -2
- zenml/zen_stores/base_zen_store.py +50 -69
- zenml/zen_stores/migrations/versions/12eff0206201_rename_workspace_to_project.py +768 -0
- zenml/zen_stores/migrations/versions/1cb6477f72d6_move_artifact_save_type.py +20 -10
- zenml/zen_stores/migrations/versions/1f9d1cd00b90_add_unique_name_constraints.py +231 -0
- zenml/zen_stores/migrations/versions/288f4fb6e112_make_tags_user_scoped.py +74 -0
- zenml/zen_stores/migrations/versions/2e695a26fe7a_add_user_default_workspace.py +45 -0
- zenml/zen_stores/migrations/versions/3b1776345020_remove_workspace_from_globals.py +81 -0
- zenml/zen_stores/migrations/versions/41b28cae31ce_make_artifacts_workspace_scoped.py +136 -0
- zenml/zen_stores/migrations/versions/9e7bf0970266_adding_exclusive_attribute_to_tags.py +47 -0
- zenml/zen_stores/migrations/versions/b557b2871693_update_step_run_input_types.py +8 -4
- zenml/zen_stores/migrations/versions/cbc6acd71f92_add_workspace_display_name.py +58 -0
- zenml/zen_stores/migrations/versions/cc269488e5a9_separate_run_metadata.py +12 -6
- zenml/zen_stores/migrations/versions/f1d723fd723b_add_secret_private_attr.py +61 -0
- zenml/zen_stores/migrations/versions/f76a368a25a5_add_stack_description.py +35 -0
- zenml/zen_stores/rest_zen_store.py +223 -230
- zenml/zen_stores/schemas/__init__.py +2 -2
- zenml/zen_stores/schemas/action_schemas.py +15 -8
- zenml/zen_stores/schemas/api_key_schemas.py +8 -1
- zenml/zen_stores/schemas/artifact_schemas.py +35 -10
- zenml/zen_stores/schemas/code_repository_schemas.py +22 -17
- zenml/zen_stores/schemas/component_schemas.py +9 -14
- zenml/zen_stores/schemas/event_source_schemas.py +15 -8
- zenml/zen_stores/schemas/flavor_schemas.py +14 -20
- zenml/zen_stores/schemas/model_schemas.py +18 -17
- zenml/zen_stores/schemas/pipeline_build_schemas.py +7 -7
- zenml/zen_stores/schemas/pipeline_deployment_schemas.py +10 -8
- zenml/zen_stores/schemas/pipeline_run_schemas.py +9 -12
- zenml/zen_stores/schemas/pipeline_schemas.py +9 -9
- zenml/zen_stores/schemas/{workspace_schemas.py → project_schemas.py} +53 -65
- zenml/zen_stores/schemas/run_metadata_schemas.py +5 -5
- zenml/zen_stores/schemas/run_template_schemas.py +17 -13
- zenml/zen_stores/schemas/schedule_schema.py +16 -21
- zenml/zen_stores/schemas/secret_schemas.py +15 -25
- zenml/zen_stores/schemas/service_connector_schemas.py +8 -17
- zenml/zen_stores/schemas/service_schemas.py +7 -8
- zenml/zen_stores/schemas/stack_schemas.py +12 -15
- zenml/zen_stores/schemas/step_run_schemas.py +14 -15
- zenml/zen_stores/schemas/tag_schemas.py +30 -2
- zenml/zen_stores/schemas/trigger_schemas.py +15 -8
- zenml/zen_stores/schemas/user_schemas.py +12 -2
- zenml/zen_stores/schemas/utils.py +16 -0
- zenml/zen_stores/secrets_stores/service_connector_secrets_store.py +0 -3
- zenml/zen_stores/sql_zen_store.py +2984 -2369
- zenml/zen_stores/template_utils.py +1 -1
- zenml/zen_stores/zen_store_interface.py +136 -126
- {zenml_nightly-0.75.0.dev20250312.dist-info → zenml_nightly-0.75.0.dev20250314.dist-info}/METADATA +1 -1
- {zenml_nightly-0.75.0.dev20250312.dist-info → zenml_nightly-0.75.0.dev20250314.dist-info}/RECORD +188 -173
- zenml/cli/workspace.py +0 -86
- zenml/models/v2/core/workspace.py +0 -131
- zenml/zen_server/routers/workspaces_endpoints.py +0 -1469
- {zenml_nightly-0.75.0.dev20250312.dist-info → zenml_nightly-0.75.0.dev20250314.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.75.0.dev20250312.dist-info → zenml_nightly-0.75.0.dev20250314.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.75.0.dev20250312.dist-info → zenml_nightly-0.75.0.dev20250314.dist-info}/entry_points.txt +0 -0
@@ -63,7 +63,7 @@ def validate_deployment_is_templatable(
|
|
63
63
|
"associated stack has no flavor."
|
64
64
|
)
|
65
65
|
|
66
|
-
if component.flavor_schema.
|
66
|
+
if component.flavor_schema.is_custom:
|
67
67
|
raise ValueError(
|
68
68
|
"Unable to create run template as a component of the "
|
69
69
|
"associated stack has a custom flavor."
|
@@ -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,
|
@@ -132,6 +136,8 @@ from zenml.models import (
|
|
132
136
|
StepRunUpdate,
|
133
137
|
TagFilter,
|
134
138
|
TagRequest,
|
139
|
+
TagResourceRequest,
|
140
|
+
TagResourceResponse,
|
135
141
|
TagResponse,
|
136
142
|
TagUpdate,
|
137
143
|
TriggerExecutionFilter,
|
@@ -144,10 +150,6 @@ from zenml.models import (
|
|
144
150
|
UserRequest,
|
145
151
|
UserResponse,
|
146
152
|
UserUpdate,
|
147
|
-
WorkspaceFilter,
|
148
|
-
WorkspaceRequest,
|
149
|
-
WorkspaceResponse,
|
150
|
-
WorkspaceUpdate,
|
151
153
|
)
|
152
154
|
|
153
155
|
|
@@ -194,24 +196,19 @@ class ZenStoreInterface(ABC):
|
|
194
196
|
them call the generic get or list method in this interface.
|
195
197
|
* keep the logic required to convert between ZenML domain Model classes
|
196
198
|
and internal store representations outside the ZenML domain Model classes
|
197
|
-
* 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
|
198
200
|
is uniquely identified by its name as well as its UUID) should reflect
|
199
201
|
that in the method variants and/or method arguments:
|
200
202
|
* methods that take in a resource identifier as argument should accept
|
201
|
-
all variants of the identifier (e.g. `
|
202
|
-
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)
|
203
205
|
* if a compound key is involved, separate get methods should be
|
204
206
|
implemented (e.g. `get_pipeline` to get a pipeline by ID and
|
205
|
-
`
|
206
|
-
the
|
207
|
+
`get_pipeline_in_project` to get a pipeline by its name and the ID of
|
208
|
+
the project it belongs to)
|
207
209
|
* methods for resources that are scoped as children of other resources
|
208
|
-
(e.g. a
|
209
|
-
key(s) of the parent resource in the provided
|
210
|
-
arguments:
|
211
|
-
* create methods should take the parent resource UUID(s) as an argument
|
212
|
-
(e.g. `create_stack` takes in the workspace ID)
|
213
|
-
* get methods should be provided to retrieve a resource by the compound
|
214
|
-
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:
|
215
212
|
* list methods should feature optional filter arguments that reflect
|
216
213
|
the parent resource key(s)
|
217
214
|
"""
|
@@ -744,11 +741,14 @@ class ZenStoreInterface(ABC):
|
|
744
741
|
@abstractmethod
|
745
742
|
def prune_artifact_versions(
|
746
743
|
self,
|
744
|
+
project_name_or_id: Union[str, UUID],
|
747
745
|
only_versions: bool = True,
|
748
746
|
) -> None:
|
749
747
|
"""Prunes unused artifact versions and their artifacts.
|
750
748
|
|
751
749
|
Args:
|
750
|
+
project_name_or_id: The project name or ID to prune artifact
|
751
|
+
versions for.
|
752
752
|
only_versions: Only delete artifact versions, keeping artifacts
|
753
753
|
"""
|
754
754
|
|
@@ -889,8 +889,8 @@ class ZenStoreInterface(ABC):
|
|
889
889
|
The created stack component.
|
890
890
|
|
891
891
|
Raises:
|
892
|
-
|
893
|
-
and type
|
892
|
+
EntityExistsError: If a stack component with the same name
|
893
|
+
and type already exists.
|
894
894
|
"""
|
895
895
|
|
896
896
|
@abstractmethod
|
@@ -1043,7 +1043,7 @@ class ZenStoreInterface(ABC):
|
|
1043
1043
|
|
1044
1044
|
Raises:
|
1045
1045
|
EntityExistsError: If a flavor with the same name and type
|
1046
|
-
|
1046
|
+
already exists.
|
1047
1047
|
"""
|
1048
1048
|
|
1049
1049
|
@abstractmethod
|
@@ -1131,7 +1131,7 @@ class ZenStoreInterface(ABC):
|
|
1131
1131
|
self,
|
1132
1132
|
pipeline: PipelineRequest,
|
1133
1133
|
) -> PipelineResponse:
|
1134
|
-
"""Creates a new pipeline
|
1134
|
+
"""Creates a new pipeline.
|
1135
1135
|
|
1136
1136
|
Args:
|
1137
1137
|
pipeline: The pipeline to create.
|
@@ -1140,7 +1140,6 @@ class ZenStoreInterface(ABC):
|
|
1140
1140
|
The newly created pipeline.
|
1141
1141
|
|
1142
1142
|
Raises:
|
1143
|
-
KeyError: if the workspace does not exist.
|
1144
1143
|
EntityExistsError: If an identical pipeline already exists.
|
1145
1144
|
"""
|
1146
1145
|
|
@@ -1217,7 +1216,7 @@ class ZenStoreInterface(ABC):
|
|
1217
1216
|
self,
|
1218
1217
|
build: PipelineBuildRequest,
|
1219
1218
|
) -> PipelineBuildResponse:
|
1220
|
-
"""Creates a new build
|
1219
|
+
"""Creates a new build.
|
1221
1220
|
|
1222
1221
|
Args:
|
1223
1222
|
build: The build to create.
|
@@ -1226,7 +1225,6 @@ class ZenStoreInterface(ABC):
|
|
1226
1225
|
The newly created build.
|
1227
1226
|
|
1228
1227
|
Raises:
|
1229
|
-
KeyError: If the workspace does not exist.
|
1230
1228
|
EntityExistsError: If an identical build already exists.
|
1231
1229
|
"""
|
1232
1230
|
|
@@ -1284,7 +1282,7 @@ class ZenStoreInterface(ABC):
|
|
1284
1282
|
self,
|
1285
1283
|
deployment: PipelineDeploymentRequest,
|
1286
1284
|
) -> PipelineDeploymentResponse:
|
1287
|
-
"""Creates a new deployment
|
1285
|
+
"""Creates a new deployment.
|
1288
1286
|
|
1289
1287
|
Args:
|
1290
1288
|
deployment: The deployment to create.
|
@@ -1293,7 +1291,6 @@ class ZenStoreInterface(ABC):
|
|
1293
1291
|
The newly created deployment.
|
1294
1292
|
|
1295
1293
|
Raises:
|
1296
|
-
KeyError: If the workspace does not exist.
|
1297
1294
|
EntityExistsError: If an identical deployment already exists.
|
1298
1295
|
"""
|
1299
1296
|
|
@@ -1531,30 +1528,30 @@ class ZenStoreInterface(ABC):
|
|
1531
1528
|
# -------------------- Pipeline runs --------------------
|
1532
1529
|
|
1533
1530
|
@abstractmethod
|
1534
|
-
def
|
1531
|
+
def get_or_create_run(
|
1535
1532
|
self, pipeline_run: PipelineRunRequest
|
1536
|
-
) -> PipelineRunResponse:
|
1537
|
-
"""
|
1533
|
+
) -> Tuple[PipelineRunResponse, bool]:
|
1534
|
+
"""Gets or creates a pipeline run.
|
1535
|
+
|
1536
|
+
If a run with the same ID or name already exists, it is returned.
|
1537
|
+
Otherwise, a new run is created.
|
1538
1538
|
|
1539
1539
|
Args:
|
1540
|
-
pipeline_run: The pipeline run to create.
|
1540
|
+
pipeline_run: The pipeline run to get or create.
|
1541
1541
|
|
1542
1542
|
Returns:
|
1543
|
-
The
|
1544
|
-
|
1545
|
-
Raises:
|
1546
|
-
EntityExistsError: If an identical pipeline run already exists.
|
1547
|
-
KeyError: If the pipeline does not exist.
|
1543
|
+
The pipeline run, and a boolean indicating whether the run was
|
1544
|
+
created or not.
|
1548
1545
|
"""
|
1549
1546
|
|
1550
1547
|
@abstractmethod
|
1551
1548
|
def get_run(
|
1552
|
-
self,
|
1549
|
+
self, run_id: UUID, hydrate: bool = True
|
1553
1550
|
) -> PipelineRunResponse:
|
1554
1551
|
"""Gets a pipeline run.
|
1555
1552
|
|
1556
1553
|
Args:
|
1557
|
-
|
1554
|
+
run_id: The ID of the pipeline run to get.
|
1558
1555
|
hydrate: Flag deciding whether to hydrate the output model(s)
|
1559
1556
|
by including metadata fields in the response.
|
1560
1557
|
|
@@ -1611,23 +1608,6 @@ class ZenStoreInterface(ABC):
|
|
1611
1608
|
KeyError: if the pipeline run doesn't exist.
|
1612
1609
|
"""
|
1613
1610
|
|
1614
|
-
@abstractmethod
|
1615
|
-
def get_or_create_run(
|
1616
|
-
self, pipeline_run: PipelineRunRequest
|
1617
|
-
) -> Tuple[PipelineRunResponse, bool]:
|
1618
|
-
"""Gets or creates a pipeline run.
|
1619
|
-
|
1620
|
-
If a run with the same ID or name already exists, it is returned.
|
1621
|
-
Otherwise, a new run is created.
|
1622
|
-
|
1623
|
-
Args:
|
1624
|
-
pipeline_run: The pipeline run to get or create.
|
1625
|
-
|
1626
|
-
Returns:
|
1627
|
-
The pipeline run, and a boolean indicating whether the run was
|
1628
|
-
created or not.
|
1629
|
-
"""
|
1630
|
-
|
1631
1611
|
# -------------------- Run metadata --------------------
|
1632
1612
|
|
1633
1613
|
@abstractmethod
|
@@ -1678,7 +1658,7 @@ class ZenStoreInterface(ABC):
|
|
1678
1658
|
schedule_filter_model: ScheduleFilter,
|
1679
1659
|
hydrate: bool = False,
|
1680
1660
|
) -> Page[ScheduleResponse]:
|
1681
|
-
"""List all schedules
|
1661
|
+
"""List all schedules.
|
1682
1662
|
|
1683
1663
|
Args:
|
1684
1664
|
schedule_filter_model: All filter parameters including pagination
|
@@ -1732,10 +1712,8 @@ class ZenStoreInterface(ABC):
|
|
1732
1712
|
The new secret is also validated against the scoping rules enforced in
|
1733
1713
|
the secrets store:
|
1734
1714
|
|
1735
|
-
- only one
|
1736
|
-
|
1737
|
-
- only one user-scoped secret with the given name can exist in the
|
1738
|
-
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.
|
1739
1717
|
|
1740
1718
|
Args:
|
1741
1719
|
secret: The secret to create.
|
@@ -1744,7 +1722,7 @@ class ZenStoreInterface(ABC):
|
|
1744
1722
|
The newly created secret.
|
1745
1723
|
|
1746
1724
|
Raises:
|
1747
|
-
KeyError: if the user
|
1725
|
+
KeyError: if the user does not exist.
|
1748
1726
|
EntityExistsError: If a secret with the same name already exists in
|
1749
1727
|
the same scope.
|
1750
1728
|
"""
|
@@ -1806,10 +1784,8 @@ class ZenStoreInterface(ABC):
|
|
1806
1784
|
If the update includes a change of name or scope, the scoping rules
|
1807
1785
|
enforced in the secrets store are used to validate the update:
|
1808
1786
|
|
1809
|
-
- only one
|
1810
|
-
|
1811
|
-
- only one user-scoped secret with the given name can exist in the
|
1812
|
-
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.
|
1813
1789
|
|
1814
1790
|
Args:
|
1815
1791
|
secret_id: The ID of the secret to be updated.
|
@@ -1985,7 +1961,7 @@ class ZenStoreInterface(ABC):
|
|
1985
1961
|
|
1986
1962
|
Raises:
|
1987
1963
|
EntityExistsError: If a service connector with the given name
|
1988
|
-
|
1964
|
+
already exists.
|
1989
1965
|
"""
|
1990
1966
|
|
1991
1967
|
@abstractmethod
|
@@ -2147,18 +2123,13 @@ class ZenStoreInterface(ABC):
|
|
2147
2123
|
@abstractmethod
|
2148
2124
|
def list_service_connector_resources(
|
2149
2125
|
self,
|
2150
|
-
|
2151
|
-
connector_type: Optional[str] = None,
|
2152
|
-
resource_type: Optional[str] = None,
|
2153
|
-
resource_id: Optional[str] = None,
|
2126
|
+
filter_model: ServiceConnectorFilter,
|
2154
2127
|
) -> List[ServiceConnectorResourcesModel]:
|
2155
2128
|
"""List resources that can be accessed by service connectors.
|
2156
2129
|
|
2157
2130
|
Args:
|
2158
|
-
|
2159
|
-
|
2160
|
-
resource_type: The type of resource to scope to.
|
2161
|
-
resource_id: The ID of the resource to scope to.
|
2131
|
+
filter_model: The filter model to use when fetching service
|
2132
|
+
connectors.
|
2162
2133
|
|
2163
2134
|
Returns:
|
2164
2135
|
The matching list of resources that available service
|
@@ -2213,11 +2184,8 @@ class ZenStoreInterface(ABC):
|
|
2213
2184
|
The created stack.
|
2214
2185
|
|
2215
2186
|
Raises:
|
2216
|
-
EntityExistsError: If a
|
2217
|
-
already exists.
|
2218
|
-
StackComponentExistsError: If a stack component with the same name
|
2219
|
-
already exists.
|
2220
|
-
StackExistsError: If a stack with the same name already exists.
|
2187
|
+
EntityExistsError: If a stack, stack component or service connector
|
2188
|
+
with the same name already exists.
|
2221
2189
|
"""
|
2222
2190
|
|
2223
2191
|
@abstractmethod
|
@@ -2499,7 +2467,7 @@ class ZenStoreInterface(ABC):
|
|
2499
2467
|
trigger_execution_id: UUID,
|
2500
2468
|
hydrate: bool = True,
|
2501
2469
|
) -> TriggerExecutionResponse:
|
2502
|
-
"""Get
|
2470
|
+
"""Get a trigger execution by ID.
|
2503
2471
|
|
2504
2472
|
Args:
|
2505
2473
|
trigger_execution_id: The ID of the trigger execution to get.
|
@@ -2626,86 +2594,84 @@ class ZenStoreInterface(ABC):
|
|
2626
2594
|
KeyError: If no user with the given ID exists.
|
2627
2595
|
"""
|
2628
2596
|
|
2629
|
-
# --------------------
|
2597
|
+
# -------------------- Projects --------------------
|
2630
2598
|
|
2631
2599
|
@abstractmethod
|
2632
|
-
def
|
2633
|
-
|
2634
|
-
) -> WorkspaceResponse:
|
2635
|
-
"""Creates a new workspace.
|
2600
|
+
def create_project(self, project: ProjectRequest) -> ProjectResponse:
|
2601
|
+
"""Creates a new project.
|
2636
2602
|
|
2637
2603
|
Args:
|
2638
|
-
|
2604
|
+
project: The project to create.
|
2639
2605
|
|
2640
2606
|
Returns:
|
2641
|
-
The newly created
|
2607
|
+
The newly created project.
|
2642
2608
|
|
2643
2609
|
Raises:
|
2644
|
-
EntityExistsError: If a
|
2610
|
+
EntityExistsError: If a project with the given name already exists.
|
2645
2611
|
"""
|
2646
2612
|
|
2647
2613
|
@abstractmethod
|
2648
|
-
def
|
2649
|
-
self,
|
2650
|
-
) ->
|
2651
|
-
"""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.
|
2652
2618
|
|
2653
2619
|
Args:
|
2654
|
-
|
2620
|
+
project_name_or_id: Name or ID of the project to get.
|
2655
2621
|
hydrate: Flag deciding whether to hydrate the output model(s)
|
2656
2622
|
by including metadata fields in the response.
|
2657
2623
|
|
2658
2624
|
Returns:
|
2659
|
-
The requested
|
2625
|
+
The requested project.
|
2660
2626
|
|
2661
2627
|
Raises:
|
2662
|
-
KeyError: If there is no such
|
2628
|
+
KeyError: If there is no such project.
|
2663
2629
|
"""
|
2664
2630
|
|
2665
2631
|
@abstractmethod
|
2666
|
-
def
|
2632
|
+
def list_projects(
|
2667
2633
|
self,
|
2668
|
-
|
2634
|
+
project_filter_model: ProjectFilter,
|
2669
2635
|
hydrate: bool = False,
|
2670
|
-
) -> Page[
|
2671
|
-
"""List all
|
2636
|
+
) -> Page[ProjectResponse]:
|
2637
|
+
"""List all projects matching the given filter criteria.
|
2672
2638
|
|
2673
2639
|
Args:
|
2674
|
-
|
2640
|
+
project_filter_model: All filter parameters including pagination
|
2675
2641
|
params.
|
2676
2642
|
hydrate: Flag deciding whether to hydrate the output model(s)
|
2677
2643
|
by including metadata fields in the response.
|
2678
2644
|
|
2679
2645
|
Returns:
|
2680
|
-
A list of all
|
2646
|
+
A list of all projects matching the filter criteria.
|
2681
2647
|
"""
|
2682
2648
|
|
2683
2649
|
@abstractmethod
|
2684
|
-
def
|
2685
|
-
self,
|
2686
|
-
) ->
|
2687
|
-
"""Update an existing
|
2650
|
+
def update_project(
|
2651
|
+
self, project_id: UUID, project_update: ProjectUpdate
|
2652
|
+
) -> ProjectResponse:
|
2653
|
+
"""Update an existing project.
|
2688
2654
|
|
2689
2655
|
Args:
|
2690
|
-
|
2691
|
-
|
2656
|
+
project_id: The ID of the project to be updated.
|
2657
|
+
project_update: The update to be applied to the project.
|
2692
2658
|
|
2693
2659
|
Returns:
|
2694
|
-
The updated
|
2660
|
+
The updated project.
|
2695
2661
|
|
2696
2662
|
Raises:
|
2697
|
-
KeyError: if the
|
2663
|
+
KeyError: if the project does not exist.
|
2698
2664
|
"""
|
2699
2665
|
|
2700
2666
|
@abstractmethod
|
2701
|
-
def
|
2702
|
-
"""Deletes a
|
2667
|
+
def delete_project(self, project_name_or_id: Union[str, UUID]) -> None:
|
2668
|
+
"""Deletes a project.
|
2703
2669
|
|
2704
2670
|
Args:
|
2705
|
-
|
2671
|
+
project_name_or_id: Name or ID of the project to delete.
|
2706
2672
|
|
2707
2673
|
Raises:
|
2708
|
-
KeyError: If no
|
2674
|
+
KeyError: If no project with the given name exists.
|
2709
2675
|
"""
|
2710
2676
|
|
2711
2677
|
# -------------------- Models --------------------
|
@@ -2725,14 +2691,14 @@ class ZenStoreInterface(ABC):
|
|
2725
2691
|
"""
|
2726
2692
|
|
2727
2693
|
@abstractmethod
|
2728
|
-
def delete_model(self,
|
2694
|
+
def delete_model(self, model_id: UUID) -> None:
|
2729
2695
|
"""Deletes a model.
|
2730
2696
|
|
2731
2697
|
Args:
|
2732
|
-
|
2698
|
+
model_id: id of the model to be deleted.
|
2733
2699
|
|
2734
2700
|
Raises:
|
2735
|
-
KeyError: specified ID
|
2701
|
+
KeyError: model with specified ID not found.
|
2736
2702
|
"""
|
2737
2703
|
|
2738
2704
|
@abstractmethod
|
@@ -2752,13 +2718,11 @@ class ZenStoreInterface(ABC):
|
|
2752
2718
|
"""
|
2753
2719
|
|
2754
2720
|
@abstractmethod
|
2755
|
-
def get_model(
|
2756
|
-
self, model_name_or_id: Union[str, UUID], hydrate: bool = True
|
2757
|
-
) -> ModelResponse:
|
2721
|
+
def get_model(self, model_id: UUID, hydrate: bool = True) -> ModelResponse:
|
2758
2722
|
"""Get an existing model.
|
2759
2723
|
|
2760
2724
|
Args:
|
2761
|
-
|
2725
|
+
model_id: id of the model to be retrieved.
|
2762
2726
|
hydrate: Flag deciding whether to hydrate the output model(s)
|
2763
2727
|
by including metadata fields in the response.
|
2764
2728
|
|
@@ -2766,7 +2730,7 @@ class ZenStoreInterface(ABC):
|
|
2766
2730
|
The model of interest.
|
2767
2731
|
|
2768
2732
|
Raises:
|
2769
|
-
KeyError: specified ID
|
2733
|
+
KeyError: model with specified ID not found.
|
2770
2734
|
"""
|
2771
2735
|
|
2772
2736
|
@abstractmethod
|
@@ -2845,14 +2809,11 @@ class ZenStoreInterface(ABC):
|
|
2845
2809
|
def list_model_versions(
|
2846
2810
|
self,
|
2847
2811
|
model_version_filter_model: ModelVersionFilter,
|
2848
|
-
model_name_or_id: Optional[Union[str, UUID]] = None,
|
2849
2812
|
hydrate: bool = False,
|
2850
2813
|
) -> Page[ModelVersionResponse]:
|
2851
2814
|
"""Get all model versions by filter.
|
2852
2815
|
|
2853
2816
|
Args:
|
2854
|
-
model_name_or_id: name or id of the model containing the model
|
2855
|
-
versions.
|
2856
2817
|
model_version_filter_model: All filter parameters including
|
2857
2818
|
pagination params.
|
2858
2819
|
hydrate: Flag deciding whether to hydrate the output model(s)
|
@@ -3005,9 +2966,7 @@ class ZenStoreInterface(ABC):
|
|
3005
2966
|
KeyError: specified ID not found.
|
3006
2967
|
"""
|
3007
2968
|
|
3008
|
-
|
3009
|
-
# Tags
|
3010
|
-
#################
|
2969
|
+
# -------------------- Tags --------------------
|
3011
2970
|
|
3012
2971
|
@abstractmethod
|
3013
2972
|
def create_tag(self, tag: TagRequest) -> TagResponse:
|
@@ -3039,7 +2998,9 @@ class ZenStoreInterface(ABC):
|
|
3039
2998
|
|
3040
2999
|
@abstractmethod
|
3041
3000
|
def get_tag(
|
3042
|
-
self,
|
3001
|
+
self,
|
3002
|
+
tag_name_or_id: Union[str, UUID],
|
3003
|
+
hydrate: bool = True,
|
3043
3004
|
) -> TagResponse:
|
3044
3005
|
"""Get an existing tag.
|
3045
3006
|
|
@@ -3090,3 +3051,52 @@ class ZenStoreInterface(ABC):
|
|
3090
3051
|
Raises:
|
3091
3052
|
KeyError: If the tag is not found
|
3092
3053
|
"""
|
3054
|
+
|
3055
|
+
# -------------------- Tag Resources --------------------
|
3056
|
+
|
3057
|
+
@abstractmethod
|
3058
|
+
def create_tag_resource(
|
3059
|
+
self, tag_resource: TagResourceRequest
|
3060
|
+
) -> TagResourceResponse:
|
3061
|
+
"""Create a new tag resource relationship.
|
3062
|
+
|
3063
|
+
Args:
|
3064
|
+
tag_resource: The tag resource relationship to be created.
|
3065
|
+
|
3066
|
+
Returns:
|
3067
|
+
The newly created tag resource relationship.
|
3068
|
+
"""
|
3069
|
+
|
3070
|
+
@abstractmethod
|
3071
|
+
def batch_create_tag_resource(
|
3072
|
+
self, tag_resources: List[TagResourceRequest]
|
3073
|
+
) -> List[TagResourceResponse]:
|
3074
|
+
"""Create a new tag resource relationship.
|
3075
|
+
|
3076
|
+
Args:
|
3077
|
+
tag_resources: The tag resource relationships to be created.
|
3078
|
+
|
3079
|
+
Returns:
|
3080
|
+
The newly created tag resource relationships.
|
3081
|
+
"""
|
3082
|
+
|
3083
|
+
@abstractmethod
|
3084
|
+
def delete_tag_resource(
|
3085
|
+
self,
|
3086
|
+
tag_resource: TagResourceRequest,
|
3087
|
+
) -> None:
|
3088
|
+
"""Delete a tag resource relationship.
|
3089
|
+
|
3090
|
+
Args:
|
3091
|
+
tag_resource: The tag resource relationship to delete.
|
3092
|
+
"""
|
3093
|
+
|
3094
|
+
@abstractmethod
|
3095
|
+
def batch_delete_tag_resource(
|
3096
|
+
self, tag_resources: List[TagResourceRequest]
|
3097
|
+
) -> None:
|
3098
|
+
"""Delete a batch of tag resource relationships.
|
3099
|
+
|
3100
|
+
Args:
|
3101
|
+
tag_resources: The tag resource relationships to be deleted.
|
3102
|
+
"""
|