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.
Files changed (145) hide show
  1. zenml/VERSION +1 -1
  2. zenml/analytics/context.py +4 -4
  3. zenml/analytics/enums.py +2 -2
  4. zenml/artifacts/utils.py +2 -2
  5. zenml/cli/__init__.py +8 -9
  6. zenml/cli/base.py +2 -2
  7. zenml/cli/code_repository.py +1 -1
  8. zenml/cli/login.py +21 -18
  9. zenml/cli/pipeline.py +3 -3
  10. zenml/cli/project.py +172 -0
  11. zenml/cli/server.py +5 -5
  12. zenml/cli/service_accounts.py +0 -1
  13. zenml/cli/service_connectors.py +15 -16
  14. zenml/cli/stack.py +0 -2
  15. zenml/cli/stack_components.py +2 -2
  16. zenml/cli/utils.py +3 -3
  17. zenml/client.py +352 -341
  18. zenml/config/global_config.py +41 -43
  19. zenml/config/server_config.py +9 -9
  20. zenml/constants.py +5 -3
  21. zenml/event_hub/event_hub.py +1 -1
  22. zenml/integrations/gcp/__init__.py +1 -0
  23. zenml/integrations/gcp/flavors/vertex_orchestrator_flavor.py +5 -0
  24. zenml/integrations/gcp/flavors/vertex_step_operator_flavor.py +5 -28
  25. zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +125 -78
  26. zenml/integrations/gcp/service_connectors/gcp_service_connector.py +7 -6
  27. zenml/integrations/gcp/vertex_custom_job_parameters.py +50 -0
  28. zenml/integrations/mlflow/steps/mlflow_registry.py +3 -3
  29. zenml/integrations/wandb/__init__.py +1 -1
  30. zenml/integrations/wandb/experiment_trackers/wandb_experiment_tracker.py +29 -9
  31. zenml/integrations/wandb/flavors/wandb_experiment_tracker_flavor.py +2 -0
  32. zenml/login/credentials.py +26 -27
  33. zenml/login/credentials_store.py +5 -5
  34. zenml/login/pro/client.py +9 -9
  35. zenml/login/pro/utils.py +8 -8
  36. zenml/login/pro/{tenant → workspace}/__init__.py +1 -1
  37. zenml/login/pro/{tenant → workspace}/client.py +25 -25
  38. zenml/login/pro/{tenant → workspace}/models.py +27 -28
  39. zenml/model/model.py +2 -2
  40. zenml/model_registries/base_model_registry.py +1 -1
  41. zenml/models/__init__.py +29 -29
  42. zenml/models/v2/base/filter.py +1 -1
  43. zenml/models/v2/base/scoped.py +49 -53
  44. zenml/models/v2/core/action.py +12 -12
  45. zenml/models/v2/core/artifact.py +15 -15
  46. zenml/models/v2/core/artifact_version.py +15 -15
  47. zenml/models/v2/core/code_repository.py +12 -12
  48. zenml/models/v2/core/event_source.py +12 -12
  49. zenml/models/v2/core/model.py +26 -18
  50. zenml/models/v2/core/model_version.py +15 -15
  51. zenml/models/v2/core/pipeline.py +15 -15
  52. zenml/models/v2/core/pipeline_build.py +14 -14
  53. zenml/models/v2/core/pipeline_deployment.py +12 -14
  54. zenml/models/v2/core/pipeline_run.py +16 -16
  55. zenml/models/v2/core/project.py +203 -0
  56. zenml/models/v2/core/run_metadata.py +2 -2
  57. zenml/models/v2/core/run_template.py +15 -15
  58. zenml/models/v2/core/schedule.py +12 -12
  59. zenml/models/v2/core/secret.py +1 -1
  60. zenml/models/v2/core/service.py +14 -14
  61. zenml/models/v2/core/step_run.py +13 -13
  62. zenml/models/v2/core/tag.py +96 -3
  63. zenml/models/v2/core/trigger.py +13 -13
  64. zenml/models/v2/core/trigger_execution.py +2 -2
  65. zenml/models/v2/core/user.py +0 -17
  66. zenml/models/v2/misc/server_models.py +6 -6
  67. zenml/models/v2/misc/statistics.py +4 -4
  68. zenml/orchestrators/cache_utils.py +7 -7
  69. zenml/orchestrators/input_utils.py +1 -1
  70. zenml/orchestrators/step_launcher.py +1 -1
  71. zenml/orchestrators/step_run_utils.py +3 -3
  72. zenml/orchestrators/utils.py +4 -4
  73. zenml/pipelines/build_utils.py +2 -2
  74. zenml/pipelines/pipeline_definition.py +5 -5
  75. zenml/pipelines/run_utils.py +1 -1
  76. zenml/service_connectors/service_connector.py +0 -3
  77. zenml/service_connectors/service_connector_utils.py +0 -1
  78. zenml/stack/stack.py +0 -1
  79. zenml/steps/base_step.py +10 -2
  80. zenml/utils/dashboard_utils.py +1 -1
  81. zenml/utils/tag_utils.py +0 -12
  82. zenml/zen_server/cloud_utils.py +3 -3
  83. zenml/zen_server/feature_gate/endpoint_utils.py +1 -1
  84. zenml/zen_server/feature_gate/zenml_cloud_feature_gate.py +1 -1
  85. zenml/zen_server/rbac/endpoint_utils.py +17 -17
  86. zenml/zen_server/rbac/models.py +47 -22
  87. zenml/zen_server/rbac/rbac_sql_zen_store.py +3 -3
  88. zenml/zen_server/rbac/utils.py +23 -25
  89. zenml/zen_server/rbac/zenml_cloud_rbac.py +7 -74
  90. zenml/zen_server/routers/artifact_version_endpoints.py +10 -10
  91. zenml/zen_server/routers/auth_endpoints.py +6 -6
  92. zenml/zen_server/routers/code_repositories_endpoints.py +12 -14
  93. zenml/zen_server/routers/model_versions_endpoints.py +13 -15
  94. zenml/zen_server/routers/models_endpoints.py +7 -9
  95. zenml/zen_server/routers/pipeline_builds_endpoints.py +14 -16
  96. zenml/zen_server/routers/pipeline_deployments_endpoints.py +13 -15
  97. zenml/zen_server/routers/pipelines_endpoints.py +16 -18
  98. zenml/zen_server/routers/{workspaces_endpoints.py → projects_endpoints.py} +111 -68
  99. zenml/zen_server/routers/run_metadata_endpoints.py +7 -9
  100. zenml/zen_server/routers/run_templates_endpoints.py +15 -17
  101. zenml/zen_server/routers/runs_endpoints.py +12 -14
  102. zenml/zen_server/routers/schedule_endpoints.py +12 -14
  103. zenml/zen_server/routers/secrets_endpoints.py +1 -3
  104. zenml/zen_server/routers/server_endpoints.py +7 -7
  105. zenml/zen_server/routers/service_connectors_endpoints.py +11 -13
  106. zenml/zen_server/routers/service_endpoints.py +7 -9
  107. zenml/zen_server/routers/stack_components_endpoints.py +9 -11
  108. zenml/zen_server/routers/stacks_endpoints.py +9 -11
  109. zenml/zen_server/routers/steps_endpoints.py +6 -6
  110. zenml/zen_server/routers/users_endpoints.py +5 -43
  111. zenml/zen_server/template_execution/utils.py +4 -4
  112. zenml/zen_server/utils.py +10 -10
  113. zenml/zen_server/zen_server_api.py +6 -5
  114. zenml/zen_stores/base_zen_store.py +38 -42
  115. zenml/zen_stores/migrations/versions/12eff0206201_rename_workspace_to_project.py +768 -0
  116. zenml/zen_stores/migrations/versions/41b28cae31ce_make_artifacts_workspace_scoped.py +3 -3
  117. zenml/zen_stores/migrations/versions/cbc6acd71f92_add_workspace_display_name.py +58 -0
  118. zenml/zen_stores/rest_zen_store.py +55 -63
  119. zenml/zen_stores/schemas/__init__.py +2 -2
  120. zenml/zen_stores/schemas/action_schemas.py +9 -9
  121. zenml/zen_stores/schemas/artifact_schemas.py +15 -17
  122. zenml/zen_stores/schemas/code_repository_schemas.py +16 -18
  123. zenml/zen_stores/schemas/event_source_schemas.py +9 -9
  124. zenml/zen_stores/schemas/model_schemas.py +15 -17
  125. zenml/zen_stores/schemas/pipeline_build_schemas.py +7 -7
  126. zenml/zen_stores/schemas/pipeline_deployment_schemas.py +7 -7
  127. zenml/zen_stores/schemas/pipeline_run_schemas.py +9 -9
  128. zenml/zen_stores/schemas/pipeline_schemas.py +9 -9
  129. zenml/zen_stores/schemas/{workspace_schemas.py → project_schemas.py} +47 -41
  130. zenml/zen_stores/schemas/run_metadata_schemas.py +5 -5
  131. zenml/zen_stores/schemas/run_template_schemas.py +9 -9
  132. zenml/zen_stores/schemas/schedule_schema.py +9 -9
  133. zenml/zen_stores/schemas/service_schemas.py +7 -7
  134. zenml/zen_stores/schemas/step_run_schemas.py +7 -7
  135. zenml/zen_stores/schemas/trigger_schemas.py +9 -9
  136. zenml/zen_stores/schemas/user_schemas.py +0 -12
  137. zenml/zen_stores/sql_zen_store.py +318 -275
  138. zenml/zen_stores/zen_store_interface.py +56 -70
  139. {zenml_nightly-0.75.0.dev20250313.dist-info → zenml_nightly-0.75.0.dev20250315.dist-info}/METADATA +1 -1
  140. {zenml_nightly-0.75.0.dev20250313.dist-info → zenml_nightly-0.75.0.dev20250315.dist-info}/RECORD +143 -140
  141. zenml/cli/workspace.py +0 -160
  142. zenml/models/v2/core/workspace.py +0 -131
  143. {zenml_nightly-0.75.0.dev20250313.dist-info → zenml_nightly-0.75.0.dev20250315.dist-info}/LICENSE +0 -0
  144. {zenml_nightly-0.75.0.dev20250313.dist-info → zenml_nightly-0.75.0.dev20250315.dist-info}/WHEEL +0 -0
  145. {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 Workspace
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. `workspace_name_or_uuid` for methods
204
- that get/list/update/delete Workspaces)
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
- `get_pipeline_in_workspace` to get a pipeline by its name and the ID of
208
- the workspace it belongs to)
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 Stack is always owned by a Workspace) should reflect the
211
- key(s) of the parent resource in the provided methods and method
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
- workspace_name_or_id: Union[str, UUID],
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
- workspace_name_or_id: The workspace name or ID to prune artifact
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 is already owned by this user in this workspace.
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
- is already owned by this user in this workspace.
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 in a workspace.
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 in a workspace.
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 in a workspace.
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 in the workspace.
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 workspace-scoped secret with the given name can exist
1724
- in the target workspace.
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 or workspace does not exist.
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 workspace-scoped secret with the given name can exist
1798
- in the target workspace.
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
- is already owned by this user in this workspace.
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
- # -------------------- Workspaces --------------------
2597
+ # -------------------- Projects --------------------
2610
2598
 
2611
2599
  @abstractmethod
2612
- def create_workspace(
2613
- self, workspace: WorkspaceRequest
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
- workspace: The workspace to create.
2604
+ project: The project to create.
2619
2605
 
2620
2606
  Returns:
2621
- The newly created workspace.
2607
+ The newly created project.
2622
2608
 
2623
2609
  Raises:
2624
- EntityExistsError: If a workspace with the given name already exists.
2610
+ EntityExistsError: If a project with the given name already exists.
2625
2611
  """
2626
2612
 
2627
2613
  @abstractmethod
2628
- def get_workspace(
2629
- self, workspace_name_or_id: Union[UUID, str], hydrate: bool = True
2630
- ) -> WorkspaceResponse:
2631
- """Get an existing workspace by name or ID.
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
- workspace_name_or_id: Name or ID of the workspace to get.
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 workspace.
2625
+ The requested project.
2640
2626
 
2641
2627
  Raises:
2642
- KeyError: If there is no such workspace.
2628
+ KeyError: If there is no such project.
2643
2629
  """
2644
2630
 
2645
2631
  @abstractmethod
2646
- def list_workspaces(
2632
+ def list_projects(
2647
2633
  self,
2648
- workspace_filter_model: WorkspaceFilter,
2634
+ project_filter_model: ProjectFilter,
2649
2635
  hydrate: bool = False,
2650
- ) -> Page[WorkspaceResponse]:
2651
- """List all workspace matching the given filter criteria.
2636
+ ) -> Page[ProjectResponse]:
2637
+ """List all projects matching the given filter criteria.
2652
2638
 
2653
2639
  Args:
2654
- workspace_filter_model: All filter parameters including pagination
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 workspace matching the filter criteria.
2646
+ A list of all projects matching the filter criteria.
2661
2647
  """
2662
2648
 
2663
2649
  @abstractmethod
2664
- def update_workspace(
2665
- self, workspace_id: UUID, workspace_update: WorkspaceUpdate
2666
- ) -> WorkspaceResponse:
2667
- """Update an existing workspace.
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
- workspace_id: The ID of the workspace to be updated.
2671
- workspace_update: The update to be applied to the workspace.
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 workspace.
2660
+ The updated project.
2675
2661
 
2676
2662
  Raises:
2677
- KeyError: if the workspace does not exist.
2663
+ KeyError: if the project does not exist.
2678
2664
  """
2679
2665
 
2680
2666
  @abstractmethod
2681
- def delete_workspace(self, workspace_name_or_id: Union[str, UUID]) -> None:
2682
- """Deletes a workspace.
2667
+ def delete_project(self, project_name_or_id: Union[str, UUID]) -> None:
2668
+ """Deletes a project.
2683
2669
 
2684
2670
  Args:
2685
- workspace_name_or_id: Name or ID of the workspace to delete.
2671
+ project_name_or_id: Name or ID of the project to delete.
2686
2672
 
2687
2673
  Raises:
2688
- KeyError: If no workspace with the given name exists.
2674
+ KeyError: If no project with the given name exists.
2689
2675
  """
2690
2676
 
2691
2677
  # -------------------- Models --------------------
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: zenml-nightly
3
- Version: 0.75.0.dev20250313
3
+ Version: 0.75.0.dev20250315
4
4
  Summary: ZenML: Write production-ready ML code.
5
5
  License: Apache-2.0
6
6
  Keywords: machine learning,production,pipeline,mlops,devops