zenml-nightly 0.70.0.dev20241125__py3-none-any.whl → 0.71.0.dev20241220__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 (254) hide show
  1. README.md +4 -4
  2. RELEASE_NOTES.md +112 -0
  3. zenml/VERSION +1 -1
  4. zenml/artifact_stores/base_artifact_store.py +2 -2
  5. zenml/artifacts/artifact_config.py +15 -6
  6. zenml/artifacts/utils.py +59 -32
  7. zenml/cli/__init__.py +22 -4
  8. zenml/cli/base.py +5 -5
  9. zenml/cli/login.py +26 -0
  10. zenml/cli/pipeline.py +111 -62
  11. zenml/cli/server.py +20 -20
  12. zenml/cli/service_connectors.py +3 -3
  13. zenml/cli/stack.py +0 -3
  14. zenml/cli/stack_components.py +0 -1
  15. zenml/cli/utils.py +0 -5
  16. zenml/client.py +62 -20
  17. zenml/config/compiler.py +12 -3
  18. zenml/config/pipeline_configurations.py +20 -0
  19. zenml/config/pipeline_run_configuration.py +1 -0
  20. zenml/config/secret_reference_mixin.py +1 -1
  21. zenml/config/server_config.py +4 -0
  22. zenml/config/step_configurations.py +21 -0
  23. zenml/constants.py +10 -0
  24. zenml/enums.py +1 -0
  25. zenml/image_builders/base_image_builder.py +5 -2
  26. zenml/image_builders/build_context.py +7 -16
  27. zenml/image_builders/local_image_builder.py +13 -3
  28. zenml/integrations/__init__.py +1 -0
  29. zenml/integrations/aws/__init__.py +3 -0
  30. zenml/integrations/aws/flavors/__init__.py +6 -0
  31. zenml/integrations/aws/flavors/aws_image_builder_flavor.py +146 -0
  32. zenml/integrations/aws/image_builders/__init__.py +20 -0
  33. zenml/integrations/aws/image_builders/aws_image_builder.py +307 -0
  34. zenml/integrations/aws/orchestrators/sagemaker_orchestrator.py +14 -6
  35. zenml/integrations/constants.py +1 -0
  36. zenml/integrations/feast/__init__.py +1 -1
  37. zenml/integrations/feast/feature_stores/feast_feature_store.py +13 -9
  38. zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +1 -1
  39. zenml/integrations/kaniko/image_builders/kaniko_image_builder.py +2 -1
  40. zenml/integrations/kubernetes/flavors/kubernetes_orchestrator_flavor.py +11 -0
  41. zenml/integrations/kubernetes/orchestrators/kube_utils.py +46 -2
  42. zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator.py +13 -2
  43. zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator_entrypoint.py +3 -1
  44. zenml/integrations/kubernetes/orchestrators/manifest_utils.py +3 -2
  45. zenml/integrations/kubernetes/step_operators/kubernetes_step_operator.py +3 -2
  46. zenml/integrations/lightning/flavors/lightning_orchestrator_flavor.py +11 -0
  47. zenml/integrations/modal/__init__.py +46 -0
  48. zenml/integrations/modal/flavors/__init__.py +26 -0
  49. zenml/integrations/modal/flavors/modal_step_operator_flavor.py +125 -0
  50. zenml/integrations/modal/step_operators/__init__.py +22 -0
  51. zenml/integrations/modal/step_operators/modal_step_operator.py +242 -0
  52. zenml/integrations/neptune/experiment_trackers/neptune_experiment_tracker.py +7 -5
  53. zenml/integrations/neptune/experiment_trackers/run_state.py +69 -53
  54. zenml/integrations/registry.py +2 -2
  55. zenml/integrations/skypilot/flavors/skypilot_orchestrator_base_vm_config.py +12 -0
  56. zenml/integrations/wandb/flavors/wandb_experiment_tracker_flavor.py +13 -5
  57. zenml/io/filesystem.py +2 -2
  58. zenml/io/local_filesystem.py +3 -3
  59. zenml/materializers/built_in_materializer.py +18 -1
  60. zenml/materializers/structured_string_materializer.py +8 -3
  61. zenml/model/model.py +23 -101
  62. zenml/model/utils.py +21 -17
  63. zenml/models/__init__.py +6 -0
  64. zenml/models/v2/base/filter.py +26 -30
  65. zenml/models/v2/base/scoped.py +258 -5
  66. zenml/models/v2/core/artifact_version.py +21 -29
  67. zenml/models/v2/core/code_repository.py +1 -12
  68. zenml/models/v2/core/component.py +5 -68
  69. zenml/models/v2/core/flavor.py +1 -11
  70. zenml/models/v2/core/model.py +1 -57
  71. zenml/models/v2/core/model_version.py +11 -36
  72. zenml/models/v2/core/model_version_artifact.py +11 -3
  73. zenml/models/v2/core/model_version_pipeline_run.py +14 -3
  74. zenml/models/v2/core/pipeline.py +47 -55
  75. zenml/models/v2/core/pipeline_build.py +67 -12
  76. zenml/models/v2/core/pipeline_deployment.py +0 -10
  77. zenml/models/v2/core/pipeline_run.py +110 -32
  78. zenml/models/v2/core/run_metadata.py +30 -9
  79. zenml/models/v2/core/run_template.py +21 -29
  80. zenml/models/v2/core/schedule.py +0 -10
  81. zenml/models/v2/core/secret.py +0 -14
  82. zenml/models/v2/core/service.py +9 -16
  83. zenml/models/v2/core/service_connector.py +0 -11
  84. zenml/models/v2/core/stack.py +21 -30
  85. zenml/models/v2/core/step_run.py +24 -18
  86. zenml/models/v2/core/trigger.py +19 -3
  87. zenml/models/v2/misc/run_metadata.py +38 -0
  88. zenml/orchestrators/base_orchestrator.py +13 -1
  89. zenml/orchestrators/input_utils.py +19 -6
  90. zenml/orchestrators/output_utils.py +5 -1
  91. zenml/orchestrators/publish_utils.py +12 -5
  92. zenml/orchestrators/step_launcher.py +16 -16
  93. zenml/orchestrators/step_run_utils.py +18 -197
  94. zenml/orchestrators/step_runner.py +40 -3
  95. zenml/orchestrators/utils.py +79 -50
  96. zenml/pipelines/build_utils.py +12 -0
  97. zenml/pipelines/pipeline_decorator.py +4 -0
  98. zenml/pipelines/pipeline_definition.py +26 -8
  99. zenml/pipelines/run_utils.py +9 -5
  100. zenml/service_connectors/service_connector_utils.py +3 -9
  101. zenml/stack/stack_component.py +1 -1
  102. zenml/stack_deployments/aws_stack_deployment.py +22 -0
  103. zenml/steps/base_step.py +11 -1
  104. zenml/steps/entrypoint_function_utils.py +7 -3
  105. zenml/steps/step_decorator.py +4 -0
  106. zenml/steps/utils.py +23 -7
  107. zenml/types.py +4 -0
  108. zenml/utils/archivable.py +65 -36
  109. zenml/utils/code_utils.py +8 -4
  110. zenml/utils/docker_utils.py +9 -0
  111. zenml/utils/metadata_utils.py +186 -153
  112. zenml/utils/string_utils.py +41 -16
  113. zenml/utils/visualization_utils.py +4 -1
  114. zenml/zen_server/auth.py +9 -10
  115. zenml/zen_server/cloud_utils.py +3 -1
  116. zenml/zen_server/dashboard/assets/{404-NVXKFp-x.js → 404-Cqu3EDCm.js} +1 -1
  117. zenml/zen_server/dashboard/assets/{@reactflow-CK0KJUen.js → @reactflow-D2Y7BWwz.js} +1 -1
  118. zenml/zen_server/dashboard/assets/{AlertDialogDropdownItem-DezXKmDf.js → AlertDialogDropdownItem-BHd71pVS.js} +1 -1
  119. zenml/zen_server/dashboard/assets/{CodeSnippet-JzR8CEtw.js → CodeSnippet-DIonwetW.js} +1 -1
  120. zenml/zen_server/dashboard/assets/{CollapsibleCard-DQW_ktMO.js → CollapsibleCard-CDnC97pB.js} +1 -1
  121. zenml/zen_server/dashboard/assets/{Commands-DL2kwkRd.js → Commands-BVEXKAOj.js} +1 -1
  122. zenml/zen_server/dashboard/assets/{ComponentBadge-D_g62Wv8.js → ComponentBadge-CrRvovox.js} +1 -1
  123. zenml/zen_server/dashboard/assets/{CopyButton-LNcWaa14.js → CopyButton-B6wGAhQv.js} +1 -1
  124. zenml/zen_server/dashboard/assets/{CsvVizualization-DknpE5ej.js → CsvVizualization-CjcT7LMm.js} +5 -5
  125. zenml/zen_server/dashboard/assets/DeleteAlertDialog-D2ELtM2W.js +1 -0
  126. zenml/zen_server/dashboard/assets/{DialogItem-Bxf8FuAT.js → DialogItem-DXIMhBgU.js} +1 -1
  127. zenml/zen_server/dashboard/assets/{Error-DYflYyps.js → Error-B8uUfTpL.js} +1 -1
  128. zenml/zen_server/dashboard/assets/{ExecutionStatus-C7zyIQKZ.js → ExecutionStatus-ibAdY-dG.js} +1 -1
  129. zenml/zen_server/dashboard/assets/{Helpbox-oYSGpLqd.js → Helpbox-BfAfhKHw.js} +1 -1
  130. zenml/zen_server/dashboard/assets/{Infobox-Cx4xGoXR.js → Infobox-M_SMOu96.js} +1 -1
  131. zenml/zen_server/dashboard/assets/{InlineAvatar-DiGOWNKF.js → InlineAvatar-DBA0a0-a.js} +1 -1
  132. zenml/zen_server/dashboard/assets/{NestedCollapsible-DYbgyKxK.js → NestedCollapsible-DpgmEFKw.js} +1 -1
  133. zenml/zen_server/dashboard/assets/{Partials-03iZf8-N.js → Partials-D_ldD9if.js} +1 -1
  134. zenml/zen_server/dashboard/assets/{ProBadge-D_EB8HNo.js → ProBadge-DQbfFotM.js} +1 -1
  135. zenml/zen_server/dashboard/assets/{ProCta-DqNS4v3x.js → ProCta-Bcpb4rcY.js} +1 -1
  136. zenml/zen_server/dashboard/assets/{ProviderIcon-Bki2aw8w.js → ProviderIcon-BZpgPigN.js} +1 -1
  137. zenml/zen_server/dashboard/assets/{ProviderRadio-8f43sPD4.js → ProviderRadio-DWPnMuQ1.js} +1 -1
  138. zenml/zen_server/dashboard/assets/RunSelector-DgRGaAc6.js +1 -0
  139. zenml/zen_server/dashboard/assets/{RunsBody-07YEO7qI.js → RunsBody-KecfSkjY.js} +1 -1
  140. zenml/zen_server/dashboard/assets/{SearchField-lp1KgU4e.js → SearchField-n-ILHnaP.js} +1 -1
  141. zenml/zen_server/dashboard/assets/{SecretTooltip-CgnbyeOx.js → SecretTooltip-B8MrX5yu.js} +1 -1
  142. zenml/zen_server/dashboard/assets/{SetPassword-CpP418A2.js → SetPassword-B_IVq_wg.js} +1 -1
  143. zenml/zen_server/dashboard/assets/StackList-TWPBYnkF.js +1 -0
  144. zenml/zen_server/dashboard/assets/{Tabs-BktHkCJJ.js → Tabs-Rg857zmd.js} +1 -1
  145. zenml/zen_server/dashboard/assets/{Tick-BlMoIlJT.js → Tick-COg4A-xo.js} +1 -1
  146. zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-Sc0A0pP-.js → UpdatePasswordSchemas-C6Aj3hm6.js} +1 -1
  147. zenml/zen_server/dashboard/assets/{UsageReason-YYduL4fj.js → UsageReason-BTLbx7w4.js} +1 -1
  148. zenml/zen_server/dashboard/assets/{WizardFooter-dgmizSJC.js → WizardFooter-BCAj69Vj.js} +1 -1
  149. zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-D-c2G6lV.js → all-pipeline-runs-query-DMXkDrV2.js} +1 -1
  150. zenml/zen_server/dashboard/assets/code-snippets-CqONne41.js +13 -0
  151. zenml/zen_server/dashboard/assets/{create-stack-DM_JPgef.js → create-stack-HfdbhLs4.js} +1 -1
  152. zenml/zen_server/dashboard/assets/dates-3pMLCNrD.js +1 -0
  153. zenml/zen_server/dashboard/assets/delete-run-DZ4hIXff.js +1 -0
  154. zenml/zen_server/dashboard/assets/{form-schemas-K6FYKjwa.js → form-schemas-B0AVEd9b.js} +1 -1
  155. zenml/zen_server/dashboard/assets/{index-BAkC7FXi.js → index-DPqSWjug.js} +1 -1
  156. zenml/zen_server/dashboard/assets/{index-CEV4Cvaf.js → index-DScjfBRb.js} +1 -1
  157. zenml/zen_server/dashboard/assets/index-DXvT1_Um.css +1 -0
  158. zenml/zen_server/dashboard/assets/{index-CCOPpudF.js → index-FO-p0GU7.js} +5 -5
  159. zenml/zen_server/dashboard/assets/{index-B1mVPYxf.js → index-I3bKUGUj.js} +1 -1
  160. zenml/zen_server/dashboard/assets/key-icon-aH-QIa5R.js +1 -0
  161. zenml/zen_server/dashboard/assets/login-command-CkqxPtV3.js +1 -0
  162. zenml/zen_server/dashboard/assets/{login-mutation-hf-lK87O.js → login-mutation-BQeo4wTY.js} +1 -1
  163. zenml/zen_server/dashboard/assets/{not-found-BGirLjU-.js → not-found-gAJ5aDdR.js} +1 -1
  164. zenml/zen_server/dashboard/assets/page-9Y9-gig0.js +1 -0
  165. zenml/zen_server/dashboard/assets/{page-DjRJCGb3.js → page-AUwiQ14W.js} +1 -1
  166. zenml/zen_server/dashboard/assets/page-B6XU7yYT.js +2 -0
  167. zenml/zen_server/dashboard/assets/{page-C00YAkaB.js → page-BKZYc2Zv.js} +1 -1
  168. zenml/zen_server/dashboard/assets/{page-CdMWnQak.js → page-BU9FG4sR.js} +1 -1
  169. zenml/zen_server/dashboard/assets/{page-D7S3aCbF.js → page-B_Apk3xg.js} +1 -1
  170. zenml/zen_server/dashboard/assets/{page-Djikxq_S.js → page-BdowiCbr.js} +1 -1
  171. zenml/zen_server/dashboard/assets/page-Bg8OjTRe.js +1 -0
  172. zenml/zen_server/dashboard/assets/page-BxL4qD4_.js +1 -0
  173. zenml/zen_server/dashboard/assets/{page-DakHVWXF.js → page-CWxT5K5J.js} +1 -1
  174. zenml/zen_server/dashboard/assets/page-CXuQufSe.js +1 -0
  175. zenml/zen_server/dashboard/assets/{page-DLC-bNBP.js → page-CcQr8CPP.js} +1 -1
  176. zenml/zen_server/dashboard/assets/{page-CD-DcWoy.js → page-Ce4Hrjnr.js} +1 -1
  177. zenml/zen_server/dashboard/assets/page-CiYxgZP_.js +1 -0
  178. zenml/zen_server/dashboard/assets/page-Cldq1mpe.js +1 -0
  179. zenml/zen_server/dashboard/assets/{page-BDigxVpo.js → page-D4wdonLm.js} +1 -1
  180. zenml/zen_server/dashboard/assets/{page-D6uU2ax4.js → page-D8ObrbH8.js} +1 -1
  181. zenml/zen_server/dashboard/assets/{page-DXSTpqRD.js → page-DFuAUGt4.js} +1 -1
  182. zenml/zen_server/dashboard/assets/{page-CbpvrsDL.js → page-DGazBpuP.js} +1 -1
  183. zenml/zen_server/dashboard/assets/{page-COXXJj1k.js → page-DO1UcqPX.js} +1 -1
  184. zenml/zen_server/dashboard/assets/page-DRYXdL5o.js +1 -0
  185. zenml/zen_server/dashboard/assets/{page-Df-Fw0aq.js → page-DYEquBC2.js} +1 -1
  186. zenml/zen_server/dashboard/assets/page-Dk32IeZm.js +1 -0
  187. zenml/zen_server/dashboard/assets/{page-yYC9OI-E.js → page-I3nKFGie.js} +1 -1
  188. zenml/zen_server/dashboard/assets/{page-6m6yHHlE.js → page-M0w-n6vn.js} +1 -1
  189. zenml/zen_server/dashboard/assets/{page-Vcxara9U.js → page-R5dx3xGF.js} +1 -1
  190. zenml/zen_server/dashboard/assets/{page-BR68V0V1.js → page-bT5pOvcB.js} +1 -1
  191. zenml/zen_server/dashboard/assets/page-hUqK889I.js +6 -0
  192. zenml/zen_server/dashboard/assets/{page-CjGdWY13.js → page-h_Stveon.js} +1 -1
  193. zenml/zen_server/dashboard/assets/{page-D01JhjQB.js → page-r8XK5vR7.js} +1 -1
  194. zenml/zen_server/dashboard/assets/page-u_-ZXBKb.js +1 -0
  195. zenml/zen_server/dashboard/assets/page-zaMqB_ao.js +1 -0
  196. zenml/zen_server/dashboard/assets/{persist-GjC8PZoC.js → persist-AppN1B0J.js} +1 -1
  197. zenml/zen_server/dashboard/assets/{persist-Coz7ZWvz.js → persist-DAUi_3za.js} +1 -1
  198. zenml/zen_server/dashboard/assets/service-BqqeXLEe.js +2 -0
  199. zenml/zen_server/dashboard/assets/{sharedSchema-CQb14VSr.js → sharedSchema-uXN9FLLk.js} +1 -1
  200. zenml/zen_server/dashboard/assets/{stack-detail-query-OPEW-cDJ.js → stack-detail-query-XfZBiBP2.js} +1 -1
  201. zenml/zen_server/dashboard/assets/{update-server-settings-mutation-LwuQfHYn.js → update-server-settings-mutation-BWmgVJwA.js} +1 -1
  202. zenml/zen_server/dashboard/assets/{url-CkvKAnwF.js → url-BLwMbzES.js} +1 -1
  203. zenml/zen_server/dashboard/index.html +4 -4
  204. zenml/zen_server/deploy/helm/Chart.yaml +1 -1
  205. zenml/zen_server/deploy/helm/README.md +2 -2
  206. zenml/zen_server/rbac/endpoint_utils.py +6 -4
  207. zenml/zen_server/rbac/models.py +3 -2
  208. zenml/zen_server/rbac/rbac_sql_zen_store.py +173 -0
  209. zenml/zen_server/rbac/utils.py +4 -7
  210. zenml/zen_server/routers/auth_endpoints.py +22 -11
  211. zenml/zen_server/routers/steps_endpoints.py +7 -1
  212. zenml/zen_server/routers/users_endpoints.py +35 -37
  213. zenml/zen_server/routers/workspaces_endpoints.py +44 -55
  214. zenml/zen_server/template_execution/utils.py +4 -1
  215. zenml/zen_server/utils.py +4 -3
  216. zenml/zen_stores/base_zen_store.py +10 -2
  217. zenml/zen_stores/migrations/versions/0.71.0_release.py +23 -0
  218. zenml/zen_stores/migrations/versions/26351d482b9e_add_step_run_unique_constraint.py +37 -0
  219. zenml/zen_stores/migrations/versions/a1237ba94fd8_add_model_version_producer_run_unique_.py +68 -0
  220. zenml/zen_stores/migrations/versions/b73bc71f1106_remove_component_spec_path.py +36 -0
  221. zenml/zen_stores/migrations/versions/cc269488e5a9_separate_run_metadata.py +135 -0
  222. zenml/zen_stores/migrations/versions/ec6307720f92_simplify_model_version_links.py +7 -6
  223. zenml/zen_stores/rest_zen_store.py +76 -43
  224. zenml/zen_stores/schemas/__init__.py +5 -1
  225. zenml/zen_stores/schemas/artifact_schemas.py +12 -11
  226. zenml/zen_stores/schemas/component_schemas.py +0 -3
  227. zenml/zen_stores/schemas/model_schemas.py +55 -17
  228. zenml/zen_stores/schemas/pipeline_deployment_schemas.py +7 -7
  229. zenml/zen_stores/schemas/pipeline_run_schemas.py +52 -18
  230. zenml/zen_stores/schemas/pipeline_schemas.py +5 -0
  231. zenml/zen_stores/schemas/run_metadata_schemas.py +66 -31
  232. zenml/zen_stores/schemas/step_run_schemas.py +40 -13
  233. zenml/zen_stores/schemas/utils.py +47 -3
  234. zenml/zen_stores/sql_zen_store.py +462 -134
  235. {zenml_nightly-0.70.0.dev20241125.dist-info → zenml_nightly-0.71.0.dev20241220.dist-info}/METADATA +5 -5
  236. {zenml_nightly-0.70.0.dev20241125.dist-info → zenml_nightly-0.71.0.dev20241220.dist-info}/RECORD +239 -217
  237. zenml/utils/cloud_utils.py +0 -40
  238. zenml/zen_server/dashboard/assets/RunSelector-DkPiIiNr.js +0 -1
  239. zenml/zen_server/dashboard/assets/StackList-WvuKQusZ.js +0 -1
  240. zenml/zen_server/dashboard/assets/delete-run-CJdh1P_h.js +0 -1
  241. zenml/zen_server/dashboard/assets/index-DlGvJQPn.css +0 -1
  242. zenml/zen_server/dashboard/assets/page-0JE_-Ec1.js +0 -1
  243. zenml/zen_server/dashboard/assets/page-BRLpxOt0.js +0 -1
  244. zenml/zen_server/dashboard/assets/page-BU7huvKw.js +0 -6
  245. zenml/zen_server/dashboard/assets/page-BvqLv2Ky.js +0 -1
  246. zenml/zen_server/dashboard/assets/page-CwxrFarU.js +0 -1
  247. zenml/zen_server/dashboard/assets/page-DfbXf_8s.js +0 -1
  248. zenml/zen_server/dashboard/assets/page-Dnovpa0i.js +0 -3
  249. zenml/zen_server/dashboard/assets/page-Dot3LPmL.js +0 -1
  250. zenml/zen_server/dashboard/assets/page-Xynx4btY.js +0 -14
  251. zenml/zen_server/dashboard/assets/page-YpKAqVSa.js +0 -1
  252. {zenml_nightly-0.70.0.dev20241125.dist-info → zenml_nightly-0.71.0.dev20241220.dist-info}/LICENSE +0 -0
  253. {zenml_nightly-0.70.0.dev20241125.dist-info → zenml_nightly-0.71.0.dev20241220.dist-info}/WHEEL +0 -0
  254. {zenml_nightly-0.70.0.dev20241125.dist-info → zenml_nightly-0.71.0.dev20241220.dist-info}/entry_points.txt +0 -0
zenml/client.py CHANGED
@@ -60,7 +60,6 @@ from zenml.constants import (
60
60
  from zenml.enums import (
61
61
  ArtifactType,
62
62
  LogicalOperators,
63
- MetadataResourceTypes,
64
63
  ModelStages,
65
64
  OAuthDeviceStatus,
66
65
  PluginSubType,
@@ -137,6 +136,7 @@ from zenml.models import (
137
136
  PipelineRunFilter,
138
137
  PipelineRunResponse,
139
138
  RunMetadataRequest,
139
+ RunMetadataResource,
140
140
  RunTemplateFilter,
141
141
  RunTemplateRequest,
142
142
  RunTemplateResponse,
@@ -1702,6 +1702,7 @@ class Client(metaclass=ClientMetaClass):
1702
1702
  updated: Optional[datetime] = None,
1703
1703
  type: Optional[str] = None,
1704
1704
  flavor: Optional[str] = None,
1705
+ user: Optional[Union[UUID, str]] = None,
1705
1706
  workspace_id: Optional[Union[str, UUID]] = None,
1706
1707
  user_id: Optional[Union[str, UUID]] = None,
1707
1708
  hydrate: bool = False,
@@ -1727,6 +1728,7 @@ class Client(metaclass=ClientMetaClass):
1727
1728
  flavor: Use the service flavor for filtering
1728
1729
  workspace_id: The id of the workspace to filter by.
1729
1730
  user_id: The id of the user to filter by.
1731
+ user: Filter by user name/ID.
1730
1732
  hydrate: Flag deciding whether to hydrate the output model(s)
1731
1733
  by including metadata fields in the response.
1732
1734
  running: Use the running status for filtering
@@ -1753,6 +1755,7 @@ class Client(metaclass=ClientMetaClass):
1753
1755
  flavor=flavor,
1754
1756
  workspace_id=workspace_id,
1755
1757
  user_id=user_id,
1758
+ user=user,
1756
1759
  running=running,
1757
1760
  name=service_name,
1758
1761
  pipeline_name=pipeline_name,
@@ -1979,7 +1982,6 @@ class Client(metaclass=ClientMetaClass):
1979
1982
  flavor: str,
1980
1983
  component_type: StackComponentType,
1981
1984
  configuration: Dict[str, str],
1982
- component_spec_path: Optional[str] = None,
1983
1985
  labels: Optional[Dict[str, Any]] = None,
1984
1986
  ) -> "ComponentResponse":
1985
1987
  """Registers a stack component.
@@ -1987,7 +1989,6 @@ class Client(metaclass=ClientMetaClass):
1987
1989
  Args:
1988
1990
  name: The name of the stack component.
1989
1991
  flavor: The flavor of the stack component.
1990
- component_spec_path: The path to the stack spec file.
1991
1992
  component_type: The type of the stack component.
1992
1993
  configuration: The configuration of the stack component.
1993
1994
  labels: The labels of the stack component.
@@ -2016,7 +2017,6 @@ class Client(metaclass=ClientMetaClass):
2016
2017
  name=name,
2017
2018
  type=component_type,
2018
2019
  flavor=flavor,
2019
- component_spec_path=component_spec_path,
2020
2020
  configuration=configuration,
2021
2021
  user=self.active_user.id,
2022
2022
  workspace=self.active_workspace.id,
@@ -2033,7 +2033,6 @@ class Client(metaclass=ClientMetaClass):
2033
2033
  name_id_or_prefix: Optional[Union[UUID, str]],
2034
2034
  component_type: StackComponentType,
2035
2035
  name: Optional[str] = None,
2036
- component_spec_path: Optional[str] = None,
2037
2036
  configuration: Optional[Dict[str, Any]] = None,
2038
2037
  labels: Optional[Dict[str, Any]] = None,
2039
2038
  disconnect: Optional[bool] = None,
@@ -2047,7 +2046,6 @@ class Client(metaclass=ClientMetaClass):
2047
2046
  update.
2048
2047
  component_type: The type of the stack component to update.
2049
2048
  name: The new name of the stack component.
2050
- component_spec_path: The new path to the stack spec file.
2051
2049
  configuration: The new configuration of the stack component.
2052
2050
  labels: The new labels of the stack component.
2053
2051
  disconnect: Whether to disconnect the stack component from its
@@ -2072,7 +2070,6 @@ class Client(metaclass=ClientMetaClass):
2072
2070
  update_model = ComponentUpdate(
2073
2071
  workspace=self.active_workspace.id,
2074
2072
  user=self.active_user.id,
2075
- component_spec_path=component_spec_path,
2076
2073
  )
2077
2074
 
2078
2075
  if name is not None:
@@ -2255,6 +2252,7 @@ class Client(metaclass=ClientMetaClass):
2255
2252
  type: Optional[str] = None,
2256
2253
  integration: Optional[str] = None,
2257
2254
  user_id: Optional[Union[str, UUID]] = None,
2255
+ user: Optional[Union[UUID, str]] = None,
2258
2256
  hydrate: bool = False,
2259
2257
  ) -> Page[FlavorResponse]:
2260
2258
  """Fetches all the flavor models.
@@ -2268,6 +2266,7 @@ class Client(metaclass=ClientMetaClass):
2268
2266
  created: Use to flavors by time of creation
2269
2267
  updated: Use the last updated date for filtering
2270
2268
  user_id: The id of the user to filter by.
2269
+ user: Filter by user name/ID.
2271
2270
  name: The name of the flavor to filter by.
2272
2271
  type: The type of the flavor to filter by.
2273
2272
  integration: The integration of the flavor to filter by.
@@ -2283,6 +2282,7 @@ class Client(metaclass=ClientMetaClass):
2283
2282
  sort_by=sort_by,
2284
2283
  logical_operator=logical_operator,
2285
2284
  user_id=user_id,
2285
+ user=user,
2286
2286
  name=name,
2287
2287
  type=type,
2288
2288
  integration=integration,
@@ -2667,13 +2667,16 @@ class Client(metaclass=ClientMetaClass):
2667
2667
  updated: Optional[Union[datetime, str]] = None,
2668
2668
  workspace_id: Optional[Union[str, UUID]] = None,
2669
2669
  user_id: Optional[Union[str, UUID]] = None,
2670
+ user: Optional[Union[UUID, str]] = None,
2670
2671
  pipeline_id: Optional[Union[str, UUID]] = None,
2671
2672
  stack_id: Optional[Union[str, UUID]] = None,
2673
+ container_registry_id: Optional[Union[UUID, str]] = None,
2672
2674
  is_local: Optional[bool] = None,
2673
2675
  contains_code: Optional[bool] = None,
2674
2676
  zenml_version: Optional[str] = None,
2675
2677
  python_version: Optional[str] = None,
2676
2678
  checksum: Optional[str] = None,
2679
+ stack_checksum: Optional[str] = None,
2677
2680
  hydrate: bool = False,
2678
2681
  ) -> Page[PipelineBuildResponse]:
2679
2682
  """List all builds.
@@ -2688,13 +2691,17 @@ class Client(metaclass=ClientMetaClass):
2688
2691
  updated: Use the last updated date for filtering
2689
2692
  workspace_id: The id of the workspace to filter by.
2690
2693
  user_id: The id of the user to filter by.
2694
+ user: Filter by user name/ID.
2691
2695
  pipeline_id: The id of the pipeline to filter by.
2692
2696
  stack_id: The id of the stack to filter by.
2697
+ container_registry_id: The id of the container registry to
2698
+ filter by.
2693
2699
  is_local: Use to filter local builds.
2694
2700
  contains_code: Use to filter builds that contain code.
2695
2701
  zenml_version: The version of ZenML to filter by.
2696
2702
  python_version: The Python version to filter by.
2697
2703
  checksum: The build checksum to filter by.
2704
+ stack_checksum: The stack checksum to filter by.
2698
2705
  hydrate: Flag deciding whether to hydrate the output model(s)
2699
2706
  by including metadata fields in the response.
2700
2707
 
@@ -2711,13 +2718,16 @@ class Client(metaclass=ClientMetaClass):
2711
2718
  updated=updated,
2712
2719
  workspace_id=workspace_id,
2713
2720
  user_id=user_id,
2721
+ user=user,
2714
2722
  pipeline_id=pipeline_id,
2715
2723
  stack_id=stack_id,
2724
+ container_registry_id=container_registry_id,
2716
2725
  is_local=is_local,
2717
2726
  contains_code=contains_code,
2718
2727
  zenml_version=zenml_version,
2719
2728
  python_version=python_version,
2720
2729
  checksum=checksum,
2730
+ stack_checksum=stack_checksum,
2721
2731
  )
2722
2732
  build_filter_model.set_scope_workspace(self.active_workspace.id)
2723
2733
  return self.zen_store.list_builds(
@@ -2777,7 +2787,7 @@ class Client(metaclass=ClientMetaClass):
2777
2787
  allow_name_prefix_match: bool = True,
2778
2788
  hydrate: bool = True,
2779
2789
  ) -> EventSourceResponse:
2780
- """Get a event source by name, ID or prefix.
2790
+ """Get an event source by name, ID or prefix.
2781
2791
 
2782
2792
  Args:
2783
2793
  name_id_or_prefix: The name, ID or prefix of the stack.
@@ -2810,6 +2820,7 @@ class Client(metaclass=ClientMetaClass):
2810
2820
  event_source_type: Optional[str] = None,
2811
2821
  workspace_id: Optional[Union[str, UUID]] = None,
2812
2822
  user_id: Optional[Union[str, UUID]] = None,
2823
+ user: Optional[Union[UUID, str]] = None,
2813
2824
  hydrate: bool = False,
2814
2825
  ) -> Page[EventSourceResponse]:
2815
2826
  """Lists all event_sources.
@@ -2824,6 +2835,7 @@ class Client(metaclass=ClientMetaClass):
2824
2835
  updated: Use the last updated date for filtering
2825
2836
  workspace_id: The id of the workspace to filter by.
2826
2837
  user_id: The id of the user to filter by.
2838
+ user: Filter by user name/ID.
2827
2839
  name: The name of the event_source to filter by.
2828
2840
  flavor: The flavor of the event_source to filter by.
2829
2841
  event_source_type: The subtype of the event_source to filter by.
@@ -2840,6 +2852,7 @@ class Client(metaclass=ClientMetaClass):
2840
2852
  logical_operator=logical_operator,
2841
2853
  workspace_id=workspace_id,
2842
2854
  user_id=user_id,
2855
+ user=user,
2843
2856
  name=name,
2844
2857
  flavor=flavor,
2845
2858
  plugin_subtype=event_source_type,
@@ -3007,6 +3020,7 @@ class Client(metaclass=ClientMetaClass):
3007
3020
  action_type: Optional[str] = None,
3008
3021
  workspace_id: Optional[Union[str, UUID]] = None,
3009
3022
  user_id: Optional[Union[str, UUID]] = None,
3023
+ user: Optional[Union[UUID, str]] = None,
3010
3024
  hydrate: bool = False,
3011
3025
  ) -> Page[ActionResponse]:
3012
3026
  """List actions.
@@ -3021,6 +3035,7 @@ class Client(metaclass=ClientMetaClass):
3021
3035
  updated: Use the last updated date for filtering
3022
3036
  workspace_id: The id of the workspace to filter by.
3023
3037
  user_id: The id of the user to filter by.
3038
+ user: Filter by user name/ID.
3024
3039
  name: The name of the action to filter by.
3025
3040
  flavor: The flavor of the action to filter by.
3026
3041
  action_type: The type of the action to filter by.
@@ -3037,6 +3052,7 @@ class Client(metaclass=ClientMetaClass):
3037
3052
  logical_operator=logical_operator,
3038
3053
  workspace_id=workspace_id,
3039
3054
  user_id=user_id,
3055
+ user=user,
3040
3056
  name=name,
3041
3057
  id=id,
3042
3058
  flavor=flavor,
@@ -3185,6 +3201,7 @@ class Client(metaclass=ClientMetaClass):
3185
3201
  action_subtype: Optional[str] = None,
3186
3202
  workspace_id: Optional[Union[str, UUID]] = None,
3187
3203
  user_id: Optional[Union[str, UUID]] = None,
3204
+ user: Optional[Union[UUID, str]] = None,
3188
3205
  hydrate: bool = False,
3189
3206
  ) -> Page[TriggerResponse]:
3190
3207
  """Lists all triggers.
@@ -3199,6 +3216,7 @@ class Client(metaclass=ClientMetaClass):
3199
3216
  updated: Use the last updated date for filtering
3200
3217
  workspace_id: The id of the workspace to filter by.
3201
3218
  user_id: The id of the user to filter by.
3219
+ user: Filter by user name/ID.
3202
3220
  name: The name of the trigger to filter by.
3203
3221
  event_source_id: The event source associated with the trigger.
3204
3222
  action_id: The action associated with the trigger.
@@ -3221,6 +3239,7 @@ class Client(metaclass=ClientMetaClass):
3221
3239
  logical_operator=logical_operator,
3222
3240
  workspace_id=workspace_id,
3223
3241
  user_id=user_id,
3242
+ user=user,
3224
3243
  name=name,
3225
3244
  event_source_id=event_source_id,
3226
3245
  action_id=action_id,
@@ -3371,6 +3390,7 @@ class Client(metaclass=ClientMetaClass):
3371
3390
  updated: Optional[Union[datetime, str]] = None,
3372
3391
  workspace_id: Optional[Union[str, UUID]] = None,
3373
3392
  user_id: Optional[Union[str, UUID]] = None,
3393
+ user: Optional[Union[UUID, str]] = None,
3374
3394
  pipeline_id: Optional[Union[str, UUID]] = None,
3375
3395
  stack_id: Optional[Union[str, UUID]] = None,
3376
3396
  build_id: Optional[Union[str, UUID]] = None,
@@ -3389,6 +3409,7 @@ class Client(metaclass=ClientMetaClass):
3389
3409
  updated: Use the last updated date for filtering
3390
3410
  workspace_id: The id of the workspace to filter by.
3391
3411
  user_id: The id of the user to filter by.
3412
+ user: Filter by user name/ID.
3392
3413
  pipeline_id: The id of the pipeline to filter by.
3393
3414
  stack_id: The id of the stack to filter by.
3394
3415
  build_id: The id of the build to filter by.
@@ -3409,6 +3430,7 @@ class Client(metaclass=ClientMetaClass):
3409
3430
  updated=updated,
3410
3431
  workspace_id=workspace_id,
3411
3432
  user_id=user_id,
3433
+ user=user,
3412
3434
  pipeline_id=pipeline_id,
3413
3435
  stack_id=stack_id,
3414
3436
  build_id=build_id,
@@ -3494,6 +3516,7 @@ class Client(metaclass=ClientMetaClass):
3494
3516
  logical_operator: LogicalOperators = LogicalOperators.AND,
3495
3517
  created: Optional[Union[datetime, str]] = None,
3496
3518
  updated: Optional[Union[datetime, str]] = None,
3519
+ id: Optional[Union[UUID, str]] = None,
3497
3520
  name: Optional[str] = None,
3498
3521
  tag: Optional[str] = None,
3499
3522
  workspace_id: Optional[Union[str, UUID]] = None,
@@ -3516,6 +3539,7 @@ class Client(metaclass=ClientMetaClass):
3516
3539
  logical_operator: Which logical operator to use [and, or].
3517
3540
  created: Filter by the creation date.
3518
3541
  updated: Filter by the last updated date.
3542
+ id: Filter by run template ID.
3519
3543
  name: Filter by run template name.
3520
3544
  tag: Filter by run template tags.
3521
3545
  workspace_id: Filter by workspace ID.
@@ -3540,6 +3564,7 @@ class Client(metaclass=ClientMetaClass):
3540
3564
  logical_operator=logical_operator,
3541
3565
  created=created,
3542
3566
  updated=updated,
3567
+ id=id,
3543
3568
  name=name,
3544
3569
  tag=tag,
3545
3570
  workspace_id=workspace_id,
@@ -3656,6 +3681,7 @@ class Client(metaclass=ClientMetaClass):
3656
3681
  name: Optional[str] = None,
3657
3682
  workspace_id: Optional[Union[str, UUID]] = None,
3658
3683
  user_id: Optional[Union[str, UUID]] = None,
3684
+ user: Optional[Union[UUID, str]] = None,
3659
3685
  pipeline_id: Optional[Union[str, UUID]] = None,
3660
3686
  orchestrator_id: Optional[Union[str, UUID]] = None,
3661
3687
  active: Optional[Union[str, bool]] = None,
@@ -3680,6 +3706,7 @@ class Client(metaclass=ClientMetaClass):
3680
3706
  name: The name of the stack to filter by.
3681
3707
  workspace_id: The id of the workspace to filter by.
3682
3708
  user_id: The id of the user to filter by.
3709
+ user: Filter by user name/ID.
3683
3710
  pipeline_id: The id of the pipeline to filter by.
3684
3711
  orchestrator_id: The id of the orchestrator to filter by.
3685
3712
  active: Use to filter by active status.
@@ -3706,6 +3733,7 @@ class Client(metaclass=ClientMetaClass):
3706
3733
  name=name,
3707
3734
  workspace_id=workspace_id,
3708
3735
  user_id=user_id,
3736
+ user=user,
3709
3737
  pipeline_id=pipeline_id,
3710
3738
  orchestrator_id=orchestrator_id,
3711
3739
  active=active,
@@ -3946,6 +3974,7 @@ class Client(metaclass=ClientMetaClass):
3946
3974
  original_step_run_id: Optional[Union[str, UUID]] = None,
3947
3975
  workspace_id: Optional[Union[str, UUID]] = None,
3948
3976
  user_id: Optional[Union[str, UUID]] = None,
3977
+ user: Optional[Union[UUID, str]] = None,
3949
3978
  model_version_id: Optional[Union[str, UUID]] = None,
3950
3979
  model: Optional[Union[UUID, str]] = None,
3951
3980
  hydrate: bool = False,
@@ -3964,6 +3993,7 @@ class Client(metaclass=ClientMetaClass):
3964
3993
  end_time: Use to filter by the time when the step finished running
3965
3994
  workspace_id: The id of the workspace to filter by.
3966
3995
  user_id: The id of the user to filter by.
3996
+ user: Filter by user name/ID.
3967
3997
  pipeline_run_id: The id of the pipeline run to filter by.
3968
3998
  deployment_id: The id of the deployment to filter by.
3969
3999
  original_step_run_id: The id of the original step run to filter by.
@@ -3998,6 +4028,7 @@ class Client(metaclass=ClientMetaClass):
3998
4028
  name=name,
3999
4029
  workspace_id=workspace_id,
4000
4030
  user_id=user_id,
4031
+ user=user,
4001
4032
  model_version_id=model_version_id,
4002
4033
  model=model,
4003
4034
  )
@@ -4438,23 +4469,20 @@ class Client(metaclass=ClientMetaClass):
4438
4469
  def create_run_metadata(
4439
4470
  self,
4440
4471
  metadata: Dict[str, "MetadataType"],
4441
- resource_id: UUID,
4442
- resource_type: MetadataResourceTypes,
4472
+ resources: List[RunMetadataResource],
4443
4473
  stack_component_id: Optional[UUID] = None,
4474
+ publisher_step_id: Optional[UUID] = None,
4444
4475
  ) -> None:
4445
4476
  """Create run metadata.
4446
4477
 
4447
4478
  Args:
4448
4479
  metadata: The metadata to create as a dictionary of key-value pairs.
4449
- resource_id: The ID of the resource for which the
4450
- metadata was produced.
4451
- resource_type: The type of the resource for which the
4480
+ resources: The list of IDs and types of the resources for that the
4452
4481
  metadata was produced.
4453
4482
  stack_component_id: The ID of the stack component that produced
4454
4483
  the metadata.
4455
-
4456
- Returns:
4457
- None
4484
+ publisher_step_id: The ID of the step execution that publishes
4485
+ this metadata automatically.
4458
4486
  """
4459
4487
  from zenml.metadata.metadata_types import get_metadata_type
4460
4488
 
@@ -4483,14 +4511,13 @@ class Client(metaclass=ClientMetaClass):
4483
4511
  run_metadata = RunMetadataRequest(
4484
4512
  workspace=self.active_workspace.id,
4485
4513
  user=self.active_user.id,
4486
- resource_id=resource_id,
4487
- resource_type=resource_type,
4514
+ resources=resources,
4488
4515
  stack_component_id=stack_component_id,
4516
+ publisher_step_id=publisher_step_id,
4489
4517
  values=values,
4490
4518
  types=types,
4491
4519
  )
4492
4520
  self.zen_store.create_run_metadata(run_metadata)
4493
- return None
4494
4521
 
4495
4522
  # -------------------------------- Secrets ---------------------------------
4496
4523
 
@@ -4674,6 +4701,7 @@ class Client(metaclass=ClientMetaClass):
4674
4701
  scope: Optional[SecretScope] = None,
4675
4702
  workspace_id: Optional[Union[str, UUID]] = None,
4676
4703
  user_id: Optional[Union[str, UUID]] = None,
4704
+ user: Optional[Union[UUID, str]] = None,
4677
4705
  hydrate: bool = False,
4678
4706
  ) -> Page[SecretResponse]:
4679
4707
  """Fetches all the secret models.
@@ -4693,6 +4721,7 @@ class Client(metaclass=ClientMetaClass):
4693
4721
  scope: The scope of the secret to filter by.
4694
4722
  workspace_id: The id of the workspace to filter by.
4695
4723
  user_id: The id of the user to filter by.
4724
+ user: Filter by user name/ID.
4696
4725
  hydrate: Flag deciding whether to hydrate the output model(s)
4697
4726
  by including metadata fields in the response.
4698
4727
 
@@ -4709,6 +4738,7 @@ class Client(metaclass=ClientMetaClass):
4709
4738
  sort_by=sort_by,
4710
4739
  logical_operator=logical_operator,
4711
4740
  user_id=user_id,
4741
+ user=user,
4712
4742
  workspace_id=workspace_id,
4713
4743
  name=name,
4714
4744
  scope=scope,
@@ -5023,6 +5053,7 @@ class Client(metaclass=ClientMetaClass):
5023
5053
  name: Optional[str] = None,
5024
5054
  workspace_id: Optional[Union[str, UUID]] = None,
5025
5055
  user_id: Optional[Union[str, UUID]] = None,
5056
+ user: Optional[Union[UUID, str]] = None,
5026
5057
  hydrate: bool = False,
5027
5058
  ) -> Page[CodeRepositoryResponse]:
5028
5059
  """List all code repositories.
@@ -5038,6 +5069,7 @@ class Client(metaclass=ClientMetaClass):
5038
5069
  name: The name of the code repository to filter by.
5039
5070
  workspace_id: The id of the workspace to filter by.
5040
5071
  user_id: The id of the user to filter by.
5072
+ user: Filter by user name/ID.
5041
5073
  hydrate: Flag deciding whether to hydrate the output model(s)
5042
5074
  by including metadata fields in the response.
5043
5075
 
@@ -5055,6 +5087,7 @@ class Client(metaclass=ClientMetaClass):
5055
5087
  name=name,
5056
5088
  workspace_id=workspace_id,
5057
5089
  user_id=user_id,
5090
+ user=user,
5058
5091
  )
5059
5092
  filter_model.set_scope_workspace(self.active_workspace.id)
5060
5093
  return self.zen_store.list_code_repositories(
@@ -5415,6 +5448,7 @@ class Client(metaclass=ClientMetaClass):
5415
5448
  resource_id: Optional[str] = None,
5416
5449
  workspace_id: Optional[Union[str, UUID]] = None,
5417
5450
  user_id: Optional[Union[str, UUID]] = None,
5451
+ user: Optional[Union[UUID, str]] = None,
5418
5452
  labels: Optional[Dict[str, Optional[str]]] = None,
5419
5453
  secret_id: Optional[Union[str, UUID]] = None,
5420
5454
  hydrate: bool = False,
@@ -5437,6 +5471,7 @@ class Client(metaclass=ClientMetaClass):
5437
5471
  they can give access to.
5438
5472
  workspace_id: The id of the workspace to filter by.
5439
5473
  user_id: The id of the user to filter by.
5474
+ user: Filter by user name/ID.
5440
5475
  name: The name of the service connector to filter by.
5441
5476
  labels: The labels of the service connector to filter by.
5442
5477
  secret_id: Filter by the id of the secret that is referenced by the
@@ -5454,6 +5489,7 @@ class Client(metaclass=ClientMetaClass):
5454
5489
  logical_operator=logical_operator,
5455
5490
  workspace_id=workspace_id or self.active_workspace.id,
5456
5491
  user_id=user_id,
5492
+ user=user,
5457
5493
  name=name,
5458
5494
  connector_type=connector_type,
5459
5495
  auth_method=auth_method,
@@ -6606,6 +6642,7 @@ class Client(metaclass=ClientMetaClass):
6606
6642
  client_id: Union[UUID, str, None] = None,
6607
6643
  status: Union[OAuthDeviceStatus, str, None] = None,
6608
6644
  trusted_device: Union[bool, str, None] = None,
6645
+ user: Optional[Union[UUID, str]] = None,
6609
6646
  failed_auth_attempts: Union[int, str, None] = None,
6610
6647
  last_login: Optional[Union[datetime, str, None]] = None,
6611
6648
  hydrate: bool = False,
@@ -6623,6 +6660,7 @@ class Client(metaclass=ClientMetaClass):
6623
6660
  expires: Use the expiration date for filtering.
6624
6661
  client_id: Use the client id for filtering.
6625
6662
  status: Use the status for filtering.
6663
+ user: Filter by user name/ID.
6626
6664
  trusted_device: Use the trusted device flag for filtering.
6627
6665
  failed_auth_attempts: Use the failed auth attempts for filtering.
6628
6666
  last_login: Use the last login date for filtering.
@@ -6642,6 +6680,7 @@ class Client(metaclass=ClientMetaClass):
6642
6680
  updated=updated,
6643
6681
  expires=expires,
6644
6682
  client_id=client_id,
6683
+ user=user,
6645
6684
  status=status,
6646
6685
  trusted_device=trusted_device,
6647
6686
  failed_auth_attempts=failed_auth_attempts,
@@ -6740,7 +6779,7 @@ class Client(metaclass=ClientMetaClass):
6740
6779
  trigger_execution_id: UUID,
6741
6780
  hydrate: bool = True,
6742
6781
  ) -> TriggerExecutionResponse:
6743
- """Get an trigger execution by ID.
6782
+ """Get a trigger execution by ID.
6744
6783
 
6745
6784
  Args:
6746
6785
  trigger_execution_id: The ID of the trigger execution to get.
@@ -6761,6 +6800,7 @@ class Client(metaclass=ClientMetaClass):
6761
6800
  size: int = PAGE_SIZE_DEFAULT,
6762
6801
  logical_operator: LogicalOperators = LogicalOperators.AND,
6763
6802
  trigger_id: Optional[UUID] = None,
6803
+ user: Optional[Union[UUID, str]] = None,
6764
6804
  hydrate: bool = False,
6765
6805
  ) -> Page[TriggerExecutionResponse]:
6766
6806
  """List all trigger executions matching the given filter criteria.
@@ -6771,6 +6811,7 @@ class Client(metaclass=ClientMetaClass):
6771
6811
  size: The maximum size of all pages.
6772
6812
  logical_operator: Which logical operator to use [and, or].
6773
6813
  trigger_id: ID of the trigger to filter by.
6814
+ user: Filter by user name/ID.
6774
6815
  hydrate: Flag deciding whether to hydrate the output model(s)
6775
6816
  by including metadata fields in the response.
6776
6817
 
@@ -6782,6 +6823,7 @@ class Client(metaclass=ClientMetaClass):
6782
6823
  sort_by=sort_by,
6783
6824
  page=page,
6784
6825
  size=size,
6826
+ user=user,
6785
6827
  logical_operator=logical_operator,
6786
6828
  )
6787
6829
  filter_model.set_scope_workspace(self.active_workspace.id)
zenml/config/compiler.py CHANGED
@@ -99,7 +99,10 @@ class Compiler:
99
99
 
100
100
  self._apply_stack_default_settings(pipeline=pipeline, stack=stack)
101
101
  if run_configuration.run_name:
102
- self._verify_run_name(run_configuration.run_name)
102
+ self._verify_run_name(
103
+ run_configuration.run_name,
104
+ pipeline.configuration.substitutions,
105
+ )
103
106
 
104
107
  pipeline_settings = self._filter_and_validate_settings(
105
108
  settings=pipeline.configuration.settings,
@@ -305,16 +308,22 @@ class Compiler:
305
308
  return default_settings
306
309
 
307
310
  @staticmethod
308
- def _verify_run_name(run_name: str) -> None:
311
+ def _verify_run_name(
312
+ run_name: str,
313
+ substitutions: Dict[str, str],
314
+ ) -> None:
309
315
  """Verifies that the run name contains only valid placeholders.
310
316
 
311
317
  Args:
312
318
  run_name: The run name to verify.
319
+ substitutions: The substitutions to be used in the run name.
313
320
 
314
321
  Raises:
315
322
  ValueError: If the run name contains invalid placeholders.
316
323
  """
317
- valid_placeholder_names = {"date", "time"}
324
+ valid_placeholder_names = {"date", "time"}.union(
325
+ set(substitutions.keys())
326
+ )
318
327
  placeholders = {
319
328
  v[1] for v in string.Formatter().parse(run_name) if v[1]
320
329
  }
@@ -13,6 +13,7 @@
13
13
  # permissions and limitations under the License.
14
14
  """Pipeline configuration classes."""
15
15
 
16
+ from datetime import datetime
16
17
  from typing import TYPE_CHECKING, Any, Dict, List, Optional
17
18
 
18
19
  from pydantic import SerializeAsAny, field_validator
@@ -46,6 +47,25 @@ class PipelineConfigurationUpdate(StrictBaseModel):
46
47
  model: Optional[Model] = None
47
48
  parameters: Optional[Dict[str, Any]] = None
48
49
  retry: Optional[StepRetryConfig] = None
50
+ substitutions: Dict[str, str] = {}
51
+
52
+ def _get_full_substitutions(
53
+ self, start_time: Optional[datetime]
54
+ ) -> Dict[str, str]:
55
+ """Returns the full substitutions dict.
56
+
57
+ Args:
58
+ start_time: Start time of the pipeline run.
59
+
60
+ Returns:
61
+ The full substitutions dict including date and time.
62
+ """
63
+ if start_time is None:
64
+ start_time = datetime.utcnow()
65
+ ret = self.substitutions.copy()
66
+ ret.setdefault("date", start_time.strftime("%Y_%m_%d"))
67
+ ret.setdefault("time", start_time.strftime("%H_%M_%S_%f"))
68
+ return ret
49
69
 
50
70
 
51
71
  class PipelineConfiguration(PipelineConfigurationUpdate):
@@ -52,3 +52,4 @@ class PipelineRunConfiguration(
52
52
  retry: Optional[StepRetryConfig] = None
53
53
  failure_hook_source: Optional[SourceWithValidator] = None
54
54
  success_hook_source: Optional[SourceWithValidator] = None
55
+ substitutions: Dict[str, str] = {}
@@ -66,7 +66,7 @@ class SecretReferenceMixin(BaseModel):
66
66
  "but future versions of ZenML will require you to pass "
67
67
  "in sensitive information as secrets. Check out the "
68
68
  "documentation on how to configure values with secrets "
69
- "here: https://docs.zenml.io/getting-started/deploying-zenml/manage-the-deployed-services/secret-management"
69
+ "here: https://docs.zenml.io/getting-started/deploying-zenml/secret-management"
70
70
  )
71
71
  continue
72
72
 
@@ -27,6 +27,7 @@ from zenml.constants import (
27
27
  DEFAULT_ZENML_SERVER_DEVICE_AUTH_POLLING,
28
28
  DEFAULT_ZENML_SERVER_DEVICE_AUTH_TIMEOUT,
29
29
  DEFAULT_ZENML_SERVER_GENERIC_API_TOKEN_LIFETIME,
30
+ DEFAULT_ZENML_SERVER_GENERIC_API_TOKEN_MAX_LIFETIME,
30
31
  DEFAULT_ZENML_SERVER_LOGIN_RATE_LIMIT_DAY,
31
32
  DEFAULT_ZENML_SERVER_LOGIN_RATE_LIMIT_MINUTE,
32
33
  DEFAULT_ZENML_SERVER_MAX_DEVICE_AUTH_ATTEMPTS,
@@ -269,6 +270,9 @@ class ServerConfiguration(BaseModel):
269
270
  generic_api_token_lifetime: PositiveInt = (
270
271
  DEFAULT_ZENML_SERVER_GENERIC_API_TOKEN_LIFETIME
271
272
  )
273
+ generic_api_token_max_lifetime: PositiveInt = (
274
+ DEFAULT_ZENML_SERVER_GENERIC_API_TOKEN_MAX_LIFETIME
275
+ )
272
276
 
273
277
  external_login_url: Optional[str] = None
274
278
  external_user_info_url: Optional[str] = None
@@ -13,6 +13,7 @@
13
13
  # permissions and limitations under the License.
14
14
  """Pipeline configuration classes."""
15
15
 
16
+ from datetime import datetime
16
17
  from typing import (
17
18
  TYPE_CHECKING,
18
19
  Any,
@@ -49,6 +50,7 @@ from zenml.utils.pydantic_utils import before_validator_handler
49
50
 
50
51
  if TYPE_CHECKING:
51
52
  from zenml.config import DockerSettings, ResourceSettings
53
+ from zenml.config.pipeline_configurations import PipelineConfiguration
52
54
 
53
55
  logger = get_logger(__name__)
54
56
 
@@ -152,6 +154,7 @@ class StepConfigurationUpdate(StrictBaseModel):
152
154
  success_hook_source: Optional[SourceWithValidator] = None
153
155
  model: Optional[Model] = None
154
156
  retry: Optional[StepRetryConfig] = None
157
+ substitutions: Dict[str, str] = {}
155
158
 
156
159
  outputs: Mapping[str, PartialArtifactConfiguration] = {}
157
160
 
@@ -237,6 +240,24 @@ class StepConfiguration(PartialStepConfiguration):
237
240
  model_or_dict = model_or_dict.model_dump()
238
241
  return DockerSettings.model_validate(model_or_dict)
239
242
 
243
+ def _get_full_substitutions(
244
+ self,
245
+ pipeline_config: "PipelineConfiguration",
246
+ start_time: Optional[datetime],
247
+ ) -> Dict[str, str]:
248
+ """Get the full set of substitutions for this step configuration.
249
+
250
+ Args:
251
+ pipeline_config: The pipeline configuration.
252
+ start_time: The start time of the pipeline run.
253
+
254
+ Returns:
255
+ The full set of substitutions for this step configuration.
256
+ """
257
+ ret = pipeline_config._get_full_substitutions(start_time)
258
+ ret.update(self.substitutions)
259
+ return ret
260
+
240
261
 
241
262
  class InputSpec(StrictBaseModel):
242
263
  """Step input specification."""
zenml/constants.py CHANGED
@@ -170,6 +170,9 @@ ENV_ZENML_DISABLE_STEP_LOGS_STORAGE = "ZENML_DISABLE_STEP_LOGS_STORAGE"
170
170
  ENV_ZENML_IGNORE_FAILURE_HOOK = "ZENML_IGNORE_FAILURE_HOOK"
171
171
  ENV_ZENML_CUSTOM_SOURCE_ROOT = "ZENML_CUSTOM_SOURCE_ROOT"
172
172
  ENV_ZENML_WHEEL_PACKAGE_NAME = "ZENML_WHEEL_PACKAGE_NAME"
173
+ ENV_ZENML_PIPELINE_RUN_API_TOKEN_EXPIRATION = (
174
+ "ZENML_PIPELINE_API_TOKEN_EXPIRATION"
175
+ )
173
176
 
174
177
  # ZenML Server environment variables
175
178
  ENV_ZENML_SERVER_PREFIX = "ZENML_SERVER_"
@@ -268,6 +271,9 @@ DEFAULT_ZENML_SERVER_PIPELINE_RUN_AUTH_WINDOW = 60 * 48 # 48 hours
268
271
  DEFAULT_ZENML_SERVER_LOGIN_RATE_LIMIT_MINUTE = 5
269
272
  DEFAULT_ZENML_SERVER_LOGIN_RATE_LIMIT_DAY = 1000
270
273
  DEFAULT_ZENML_SERVER_GENERIC_API_TOKEN_LIFETIME = 60 * 60 # 1 hour
274
+ DEFAULT_ZENML_SERVER_GENERIC_API_TOKEN_MAX_LIFETIME = (
275
+ 60 * 60 * 24 * 7
276
+ ) # 7 days
271
277
 
272
278
  DEFAULT_ZENML_SERVER_SECURE_HEADERS_HSTS = (
273
279
  "max-age=63072000; includeSubdomains"
@@ -466,3 +472,7 @@ BANNED_NAME_CHARACTERS = "\t\n\r\v\f"
466
472
 
467
473
 
468
474
  STACK_DEPLOYMENT_API_TOKEN_EXPIRATION = 60 * 6 # 6 hours
475
+
476
+ ZENML_PIPELINE_RUN_API_TOKEN_EXPIRATION = handle_int_env_var(
477
+ ENV_ZENML_PIPELINE_RUN_API_TOKEN_EXPIRATION, default=0
478
+ )