zenml-nightly 0.82.1.dev20250527__py3-none-any.whl → 0.83.0.dev20250529__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/cli/base.py +6 -1
- zenml/cli/model.py +16 -36
- zenml/cli/server.py +8 -3
- zenml/client.py +20 -4
- zenml/client_lazy_loader.py +2 -0
- zenml/config/docker_settings.py +15 -2
- zenml/enums.py +3 -0
- zenml/event_hub/event_hub.py +1 -1
- zenml/integrations/bitbucket/plugins/event_sources/bitbucket_webhook_event_source.py +1 -1
- zenml/integrations/github/plugins/event_sources/github_webhook_event_source.py +1 -1
- zenml/integrations/kubernetes/flavors/kubernetes_orchestrator_flavor.py +3 -0
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator_entrypoint.py +37 -26
- zenml/integrations/skypilot/flavors/skypilot_orchestrator_base_vm_config.py +45 -4
- zenml/integrations/skypilot/orchestrators/skypilot_base_vm_orchestrator.py +92 -84
- zenml/integrations/skypilot/orchestrators/skypilot_orchestrator_entrypoint.py +207 -179
- zenml/integrations/skypilot/utils.py +273 -0
- zenml/integrations/skypilot_aws/__init__.py +1 -2
- zenml/integrations/skypilot_azure/__init__.py +1 -2
- zenml/integrations/skypilot_gcp/__init__.py +9 -1
- zenml/integrations/skypilot_kubernetes/__init__.py +2 -3
- zenml/integrations/skypilot_lambda/__init__.py +1 -2
- zenml/login/web_login.py +1 -1
- zenml/model/model.py +13 -23
- zenml/models/__init__.py +39 -2
- zenml/models/v2/base/scoped.py +34 -15
- zenml/models/v2/core/artifact.py +10 -9
- zenml/models/v2/core/artifact_version.py +16 -16
- zenml/models/v2/core/logs.py +8 -50
- zenml/models/v2/core/model.py +10 -10
- zenml/models/v2/core/model_version.py +155 -88
- zenml/models/v2/core/pipeline.py +10 -11
- zenml/models/v2/core/pipeline_deployment.py +1 -9
- zenml/models/v2/core/pipeline_run.py +10 -17
- zenml/models/v2/core/run_template.py +10 -10
- zenml/models/v2/core/step_run.py +100 -16
- zenml/models/v2/core/tag.py +5 -4
- zenml/models/v2/misc/pipeline_run_dag.py +46 -0
- zenml/orchestrators/base_orchestrator.py +8 -19
- zenml/orchestrators/cache_utils.py +48 -1
- zenml/orchestrators/input_utils.py +35 -39
- zenml/orchestrators/step_launcher.py +1 -1
- zenml/orchestrators/step_run_utils.py +26 -10
- zenml/pipelines/pipeline_definition.py +3 -3
- zenml/pipelines/run_utils.py +2 -3
- zenml/service_connectors/service_connector.py +5 -1
- zenml/stack/stack_component.py +1 -4
- zenml/steps/step_context.py +1 -1
- zenml/utils/dashboard_utils.py +3 -3
- zenml/zen_server/auth.py +6 -3
- zenml/zen_server/dashboard/assets/{404-_AtuLtaX.js → 404-DmJUgorp.js} +1 -1
- zenml/zen_server/dashboard/assets/{@radix-C7hRs6Kx.js → @radix-Cdvw4jJ8.js} +1 -1
- zenml/zen_server/dashboard/assets/{@react-router-CNP6g_RL.js → @react-router-DeDfXbUF.js} +5 -5
- zenml/zen_server/dashboard/assets/{@reactflow-CQi1Z1Wq.js → @reactflow-8OCk19Fi.js} +1 -1
- zenml/zen_server/dashboard/assets/{@tanstack-CSxjHCME.js → @tanstack-5gTMR7G2.js} +4 -4
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-CZW4QyWn.js +1 -0
- zenml/zen_server/dashboard/assets/ButtonGroup-DFWWFGUE.js +1 -0
- zenml/zen_server/dashboard/assets/{CodeSnippet-CvI6D0wx.js → CodeSnippet-D2HkkAGr.js} +1 -1
- zenml/zen_server/dashboard/assets/CollapsibleCard-CnS09ljw.js +1 -0
- zenml/zen_server/dashboard/assets/{ComponentBadge-DKw7Gndh.js → ComponentBadge-CDgdd0Ks.js} +1 -1
- zenml/zen_server/dashboard/assets/ComponentIcon-CbbOc7lb.js +1 -0
- zenml/zen_server/dashboard/assets/{DeleteAlertDialog-DVvXt-S6.js → DeleteAlertDialog-VIOMDLmx.js} +1 -1
- zenml/zen_server/dashboard/assets/DialogItem-ClFCqxEp.js +1 -0
- zenml/zen_server/dashboard/assets/{DisplayDate-CYVBBSgr.js → DisplayDate-8RESqe5H.js} +1 -1
- zenml/zen_server/dashboard/assets/{EmptyState-M1jafpg6.js → EmptyState-CjrgDtVk.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-BWaXP0VK.js → Error-CQzjbDcN.js} +1 -1
- zenml/zen_server/dashboard/assets/ExecutionStatus-CWreILP0.js +1 -0
- zenml/zen_server/dashboard/assets/{Helpbox-iE1xLmiZ.js → Helpbox-CiKxG5_X.js} +1 -1
- zenml/zen_server/dashboard/assets/Infobox-CGxFvqzi.js +1 -0
- zenml/zen_server/dashboard/assets/LeftSideMenu-DCsKdIjC.js +1 -0
- zenml/zen_server/dashboard/assets/{Lock-DW-0_M0o.js → Lock-CrIAdQo6.js} +1 -1
- zenml/zen_server/dashboard/assets/NestedCollapsible-3M4llYtH.js +1 -0
- zenml/zen_server/dashboard/assets/NumberBox-C0mQktmV.js +1 -0
- zenml/zen_server/dashboard/assets/Partials-DSjkttlz.js +1 -0
- zenml/zen_server/dashboard/assets/{PasswordChecker-lYTOtNom.js → PasswordChecker-B88WjuCe.js} +1 -1
- zenml/zen_server/dashboard/assets/ProCta-Dm5cWKpS.js +1 -0
- zenml/zen_server/dashboard/assets/{ProviderIcon-DLo7t1lo.js → ProviderIcon-DPwMR6nF.js} +1 -1
- zenml/zen_server/dashboard/assets/ProviderRadio-DEDNRgAb.js +1 -0
- zenml/zen_server/dashboard/assets/RunsBody-BRBn1e2O.js +1 -0
- zenml/zen_server/dashboard/assets/SearchField-DY6-UbRT.js +1 -0
- zenml/zen_server/dashboard/assets/SecretTooltip-CZTRnaCV.js +1 -0
- zenml/zen_server/dashboard/assets/{SetPassword-DR-EiLI5.js → SetPassword-BjNGDC5e.js} +1 -1
- zenml/zen_server/dashboard/assets/SheetHeader-CASpN2Lz.js +1 -0
- zenml/zen_server/dashboard/assets/StackComponentList-Be1pQt9m.js +1 -0
- zenml/zen_server/dashboard/assets/StackList-BdiR5DvR.js +1 -0
- zenml/zen_server/dashboard/assets/StackName-ojLC6xdl.js +1 -0
- zenml/zen_server/dashboard/assets/Tabs-DNSKblCM.js +1 -0
- zenml/zen_server/dashboard/assets/Tick-BPrWnNlN.js +1 -0
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-DbFEaezI.js → UpdatePasswordSchemas-CNfKDo2Q.js} +1 -1
- zenml/zen_server/dashboard/assets/UsageReason-Cb-mpV8M.js +1 -0
- zenml/zen_server/dashboard/assets/{Wizard-CMI6Ksgz.js → Wizard-Dg8Pmn5A.js} +1 -1
- zenml/zen_server/dashboard/assets/WizardFooter-BcNDIvlQ.js +1 -0
- zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-BGASHYtF.js → all-pipeline-runs-query-DCdax7I5.js} +1 -1
- zenml/zen_server/dashboard/assets/{arrow-left-CwgF2MEM.js → arrow-left-MRXv5pAH.js} +1 -1
- zenml/zen_server/dashboard/assets/bulk-delete-C_kpIB9A.js +3 -0
- zenml/zen_server/dashboard/assets/{check-DK77doTf.js → check-B9QMTa3f.js} +1 -1
- zenml/zen_server/dashboard/assets/{check-circle-mvyzYvIW.js → check-circle-C4tYvbtw.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-down-A-rmltmI.js → chevron-down-jbbQh82s.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-right-double-uNWbJT-C.js → chevron-right-double-Dgp_gEsp.js} +1 -1
- zenml/zen_server/dashboard/assets/{clock-CPA5cYxq.js → clock-B_mTG8PH.js} +1 -1
- zenml/zen_server/dashboard/assets/{code-browser-j2EpcxIA.js → code-browser-CiD8qkBx.js} +1 -1
- zenml/zen_server/dashboard/assets/configuration-form-B2hmKGnF.js +1 -0
- zenml/zen_server/dashboard/assets/connectivity-4UKGMYnr.webp +0 -0
- zenml/zen_server/dashboard/assets/constants-1EZZxtay.js +1 -0
- zenml/zen_server/dashboard/assets/create-stack-TKmMtrkQ.js +1 -0
- zenml/zen_server/dashboard/assets/dates-Buh6SMo7.js +1 -0
- zenml/zen_server/dashboard/assets/delete-run-CCR9md_s.js +1 -0
- zenml/zen_server/dashboard/assets/eye-CbVlAYty.js +1 -0
- zenml/zen_server/dashboard/assets/{file-text-BdxZdjP_.js → file-text-Cd8wVfq5.js} +1 -1
- zenml/zen_server/dashboard/assets/form-DFJkaFDX.js +1 -0
- zenml/zen_server/dashboard/assets/form-schemas-CrznJVzA.js +1 -0
- zenml/zen_server/dashboard/assets/{gcp-CHNvgEss.js → gcp-B1I3Qvcx.js} +1 -1
- zenml/zen_server/dashboard/assets/{help-DyMolRxD.js → help-Co6aedki.js} +1 -1
- zenml/zen_server/dashboard/assets/index-BFqbGSck.js +308 -0
- zenml/zen_server/dashboard/assets/{index-CrhdX_qG.js → index-BjUu1mP4.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-DR30v9MZ.js → index-DWpiv-Ft.js} +1 -1
- zenml/zen_server/dashboard/assets/index-DuhuqTCI.css +1 -0
- zenml/zen_server/dashboard/assets/index-U992soPJ.js +1 -0
- zenml/zen_server/dashboard/assets/index.es-C1gfATPn.js +14 -0
- zenml/zen_server/dashboard/assets/{index.esm-D7jFlf5N.js → index.esm-DhJo3mA6.js} +1 -1
- zenml/zen_server/dashboard/assets/info-QkbQz4QU.js +1 -0
- zenml/zen_server/dashboard/assets/{key-icon-DO4DPJHZ.js → key-icon-C07HKw8z.js} +1 -1
- zenml/zen_server/dashboard/assets/{layout-h3cbx8WZ.js → layout-DBbfEFBe.js} +1 -1
- zenml/zen_server/dashboard/assets/layout-Do9YI4QX.js +1 -0
- zenml/zen_server/dashboard/assets/login-mutation-D3tFP6Wm.js +1 -0
- zenml/zen_server/dashboard/assets/{logs-B5n0U7tB.js → logs-CQKlJjo0.js} +1 -1
- zenml/zen_server/dashboard/assets/{package-D1Mhqeh8.js → package-miExReQl.js} +1 -1
- zenml/zen_server/dashboard/assets/page-9RjCitFH.js +1 -0
- zenml/zen_server/dashboard/assets/page-B0PsXWiT.js +1 -0
- zenml/zen_server/dashboard/assets/page-BCrKmYIZ.js +1 -0
- zenml/zen_server/dashboard/assets/page-BcRI3-aR.js +29 -0
- zenml/zen_server/dashboard/assets/page-Be3R2uYn.js +1 -0
- zenml/zen_server/dashboard/assets/page-BgknnddT.js +1 -0
- zenml/zen_server/dashboard/assets/page-BrT0_zSJ.js +40 -0
- zenml/zen_server/dashboard/assets/page-Bs3W2FDi.js +1 -0
- zenml/zen_server/dashboard/assets/page-C210HcBA.js +1 -0
- zenml/zen_server/dashboard/assets/page-C6KaiZ_W.js +1 -0
- zenml/zen_server/dashboard/assets/page-CAJ8B0vb.js +1 -0
- zenml/zen_server/dashboard/assets/page-CAUYrfui.js +1 -0
- zenml/zen_server/dashboard/assets/page-CHxVhF3x.js +1 -0
- zenml/zen_server/dashboard/assets/{page-CSwZxZMQ.js → page-CN7lkvXr.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CUaMMoPG.js +1 -0
- zenml/zen_server/dashboard/assets/page-Cal6XQ4U.js +1 -0
- zenml/zen_server/dashboard/assets/page-CdZCmszX.js +1 -0
- zenml/zen_server/dashboard/assets/page-ChGcZI_6.js +1 -0
- zenml/zen_server/dashboard/assets/page-CktmtZ8Z.js +1 -0
- zenml/zen_server/dashboard/assets/page-ClvmVesa.js +1 -0
- zenml/zen_server/dashboard/assets/page-CnbIYE80.js +1 -0
- zenml/zen_server/dashboard/assets/page-CoXzjeEY.js +1 -0
- zenml/zen_server/dashboard/assets/page-CtiuMP_r.js +1 -0
- zenml/zen_server/dashboard/assets/page-D9Hfx6GV.js +1 -0
- zenml/zen_server/dashboard/assets/page-D9iuB88h.js +1 -0
- zenml/zen_server/dashboard/assets/page-DCcuPZ8P.js +1 -0
- zenml/zen_server/dashboard/assets/page-DEohTSz6.js +1 -0
- zenml/zen_server/dashboard/assets/page-DJIGaUQ9.js +1 -0
- zenml/zen_server/dashboard/assets/page-DKK6ulgy.js +1 -0
- zenml/zen_server/dashboard/assets/page-DNjKHjnH.js +1 -0
- zenml/zen_server/dashboard/assets/page-DUK0Nd_1.js +1 -0
- zenml/zen_server/dashboard/assets/page-DUKbOhaD.js +1 -0
- zenml/zen_server/dashboard/assets/page-DYOucPtA.js +1 -0
- zenml/zen_server/dashboard/assets/page-DpqRelAy.js +1 -0
- zenml/zen_server/dashboard/assets/{page-ZfTtFicG.js → page-DwVPpCFg.js} +2 -2
- zenml/zen_server/dashboard/assets/page-XURWnYZP.js +1 -0
- zenml/zen_server/dashboard/assets/page-abw-2oeW.js +1 -0
- zenml/zen_server/dashboard/assets/page-akLcPcKw.js +1 -0
- zenml/zen_server/dashboard/assets/page-n9ejQ2V3.js +2 -0
- zenml/zen_server/dashboard/assets/page-sJjNT9xA.js +6 -0
- zenml/zen_server/dashboard/assets/{persist-UUym702q.js → persist-DWMWVP-y.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-D87V82eO.js → persist-Dec_w7aB.js} +1 -1
- zenml/zen_server/dashboard/assets/pipeline-CSUlkd50.js +1 -0
- zenml/zen_server/dashboard/assets/{plus-COjQg3AG.js → plus-Cl0_rCVF.js} +1 -1
- zenml/zen_server/dashboard/assets/{react-error-boundary.esm-fyoUBS25.js → react-error-boundary.esm-7_MuhCay.js} +1 -1
- zenml/zen_server/dashboard/assets/{refresh-CM5T3QeU.js → refresh-BcTM09NW.js} +1 -1
- zenml/zen_server/dashboard/assets/resource-tyes-list-o2LXiMay.js +1 -0
- zenml/zen_server/dashboard/assets/resource-type-tooltip-DwHrJstL.js +1 -0
- zenml/zen_server/dashboard/assets/service-connectors-DSEMwJ5A.js +1 -0
- zenml/zen_server/dashboard/assets/{service-BQ9KIhls.js → service-jxtvgks0.js} +2 -2
- zenml/zen_server/dashboard/assets/sharedSchema-BXzg0EZz.js +1 -0
- zenml/zen_server/dashboard/assets/stack-detail-query-Cm0fsgo-.js +1 -0
- zenml/zen_server/dashboard/assets/{terminal-square-DMtel8mb.js → terminal-XFL_4QN-.js} +1 -1
- zenml/zen_server/dashboard/assets/terminal-square-XFL_4QN-.js +1 -0
- zenml/zen_server/dashboard/assets/transform-CeZdrxDZ.js +1 -0
- zenml/zen_server/dashboard/assets/{trash-BWSZ7NRK.js → trash-DP6Tpp_E.js} +1 -1
- zenml/zen_server/dashboard/assets/type-guards-CNgPYg8l.js +1 -0
- zenml/zen_server/dashboard/assets/update-current-user-mutation-D5MjcQ6F.js +1 -0
- zenml/zen_server/dashboard/assets/update-server-settings-mutation-CmnxdxiK.js +1 -0
- zenml/zen_server/dashboard/assets/{zod-C0xYeTvL.js → zod-XdS2h1ws.js} +1 -1
- zenml/zen_server/dashboard/index.html +7 -7
- zenml/zen_server/rbac/utils.py +2 -2
- zenml/zen_server/routers/auth_endpoints.py +2 -2
- zenml/zen_server/routers/devices_endpoints.py +8 -5
- zenml/zen_server/routers/pipeline_deployments_endpoints.py +1 -1
- zenml/zen_server/routers/pipelines_endpoints.py +1 -1
- zenml/zen_server/routers/run_templates_endpoints.py +3 -3
- zenml/zen_server/routers/runs_endpoints.py +35 -0
- zenml/zen_server/template_execution/utils.py +6 -6
- zenml/zen_stores/dag_generator.py +171 -0
- zenml/zen_stores/migrations/versions/0.83.0_release.py +23 -0
- zenml/zen_stores/rest_zen_store.py +17 -3
- zenml/zen_stores/schemas/action_schemas.py +40 -4
- zenml/zen_stores/schemas/api_key_schemas.py +29 -1
- zenml/zen_stores/schemas/artifact_schemas.py +168 -48
- zenml/zen_stores/schemas/base_schemas.py +26 -1
- zenml/zen_stores/schemas/code_repository_schemas.py +46 -5
- zenml/zen_stores/schemas/component_schemas.py +44 -3
- zenml/zen_stores/schemas/device_schemas.py +43 -2
- zenml/zen_stores/schemas/event_source_schemas.py +41 -5
- zenml/zen_stores/schemas/flavor_schemas.py +42 -2
- zenml/zen_stores/schemas/model_schemas.py +113 -77
- zenml/zen_stores/schemas/pipeline_build_schemas.py +53 -4
- zenml/zen_stores/schemas/pipeline_deployment_schemas.py +53 -4
- zenml/zen_stores/schemas/pipeline_run_schemas.py +111 -47
- zenml/zen_stores/schemas/pipeline_schemas.py +41 -9
- zenml/zen_stores/schemas/run_template_schemas.py +75 -11
- zenml/zen_stores/schemas/schedule_schema.py +50 -5
- zenml/zen_stores/schemas/secret_schemas.py +39 -2
- zenml/zen_stores/schemas/service_connector_schemas.py +39 -2
- zenml/zen_stores/schemas/service_schemas.py +39 -4
- zenml/zen_stores/schemas/stack_schemas.py +47 -2
- zenml/zen_stores/schemas/step_run_schemas.py +89 -26
- zenml/zen_stores/schemas/tag_schemas.py +69 -5
- zenml/zen_stores/schemas/trigger_schemas.py +44 -5
- zenml/zen_stores/schemas/utils.py +25 -4
- zenml/zen_stores/sql_zen_store.py +471 -28
- zenml/zen_stores/zen_store_interface.py +9 -1
- {zenml_nightly-0.82.1.dev20250527.dist-info → zenml_nightly-0.83.0.dev20250529.dist-info}/METADATA +2 -2
- {zenml_nightly-0.82.1.dev20250527.dist-info → zenml_nightly-0.83.0.dev20250529.dist-info}/RECORD +230 -222
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-BG7-Ki1L.js +0 -1
- zenml/zen_server/dashboard/assets/CollapsibleCard-D20FtrzC.js +0 -1
- zenml/zen_server/dashboard/assets/Commands-DGbAvMDk.js +0 -1
- zenml/zen_server/dashboard/assets/ComponentIcon-ils7uNAk.js +0 -1
- zenml/zen_server/dashboard/assets/CsvVizualization-DVN541XF.js +0 -15
- zenml/zen_server/dashboard/assets/DialogItem-BHWf3sIB.js +0 -1
- zenml/zen_server/dashboard/assets/ExecutionStatus-XrvT2r65.js +0 -1
- zenml/zen_server/dashboard/assets/Infobox-D9k5TFH4.js +0 -1
- zenml/zen_server/dashboard/assets/InlineAvatar-Cfz4WSLK.js +0 -1
- zenml/zen_server/dashboard/assets/MarkdownVisualization-URCyUPcZ.js +0 -14
- zenml/zen_server/dashboard/assets/NestedCollapsible-Dor-bi98.js +0 -1
- zenml/zen_server/dashboard/assets/NumberBox-D2A7ENHb.js +0 -1
- zenml/zen_server/dashboard/assets/Partials-DQJFw1yW.js +0 -1
- zenml/zen_server/dashboard/assets/ProBadge-Cp4hb1YT.js +0 -1
- zenml/zen_server/dashboard/assets/ProCta-EYoV9CvK.js +0 -1
- zenml/zen_server/dashboard/assets/ProviderRadio-BVDA-fAr.js +0 -1
- zenml/zen_server/dashboard/assets/RunSelector-BLuBYNJt.js +0 -1
- zenml/zen_server/dashboard/assets/RunsBody-W4WHf-sq.js +0 -1
- zenml/zen_server/dashboard/assets/SearchField-D-h6jXyg.js +0 -1
- zenml/zen_server/dashboard/assets/SecretTooltip-CePCL8kd.js +0 -1
- zenml/zen_server/dashboard/assets/StackList-CgmN5H-i.js +0 -1
- zenml/zen_server/dashboard/assets/Tabs-DxQ8PDOD.js +0 -1
- zenml/zen_server/dashboard/assets/Tick-CEsT3HPR.js +0 -1
- zenml/zen_server/dashboard/assets/UsageReason-DjI5qMje.js +0 -1
- zenml/zen_server/dashboard/assets/WizardFooter-CFBHFZas.js +0 -1
- zenml/zen_server/dashboard/assets/cloud-squares-DeRLMopf.svg +0 -43
- zenml/zen_server/dashboard/assets/configuration-form-BtI2Y4eX.js +0 -1
- zenml/zen_server/dashboard/assets/connectors-video-C9qY4syJ.svg +0 -21
- zenml/zen_server/dashboard/assets/constants-DP3ZEnXH.js +0 -1
- zenml/zen_server/dashboard/assets/create-stack-BJ6x5rzj.js +0 -1
- zenml/zen_server/dashboard/assets/dates-3pMLCNrD.js +0 -1
- zenml/zen_server/dashboard/assets/delete-run-DlSLEl5T.js +0 -1
- zenml/zen_server/dashboard/assets/docker-BuDBFEDL.js +0 -1
- zenml/zen_server/dashboard/assets/dots-horizontal-BGRJCPCs.js +0 -1
- zenml/zen_server/dashboard/assets/flavor-select-BnPxvQDN.js +0 -1
- zenml/zen_server/dashboard/assets/form-schemas-CbvoEUHr.js +0 -1
- zenml/zen_server/dashboard/assets/index-CFESYpe4.js +0 -1
- zenml/zen_server/dashboard/assets/index-CmLcvK2z.js +0 -1
- zenml/zen_server/dashboard/assets/index-CzX3ZYlI.css +0 -1
- zenml/zen_server/dashboard/assets/index-D2iSHVZq.js +0 -64
- zenml/zen_server/dashboard/assets/kubernetes-D6OUjwSK.js +0 -1
- zenml/zen_server/dashboard/assets/link-external-DUhCSKNm.js +0 -1
- zenml/zen_server/dashboard/assets/login-command-CkqxPtV3.js +0 -1
- zenml/zen_server/dashboard/assets/login-mutation-CXc-Klim.js +0 -1
- zenml/zen_server/dashboard/assets/not-found-olRU3fnu.js +0 -1
- zenml/zen_server/dashboard/assets/page-7keIM1V3.js +0 -1
- zenml/zen_server/dashboard/assets/page-B31neFwG.js +0 -1
- zenml/zen_server/dashboard/assets/page-B3zo4KYS.js +0 -1
- zenml/zen_server/dashboard/assets/page-BN3MHq1a.js +0 -1
- zenml/zen_server/dashboard/assets/page-BNgVExjN.js +0 -1
- zenml/zen_server/dashboard/assets/page-BPtvu74G.js +0 -1
- zenml/zen_server/dashboard/assets/page-BTIuG0ki.js +0 -2
- zenml/zen_server/dashboard/assets/page-BcQzleH6.js +0 -1
- zenml/zen_server/dashboard/assets/page-C05Jw4M2.js +0 -1
- zenml/zen_server/dashboard/assets/page-C28a7K8h.js +0 -1
- zenml/zen_server/dashboard/assets/page-C9WLk0X-.js +0 -1
- zenml/zen_server/dashboard/assets/page-CINMx64X.js +0 -1
- zenml/zen_server/dashboard/assets/page-CYrJbk7P.js +0 -1
- zenml/zen_server/dashboard/assets/page-Ce0cqLo3.js +0 -1
- zenml/zen_server/dashboard/assets/page-CgNsEkw-.js +0 -1
- zenml/zen_server/dashboard/assets/page-Ct2FUYuR.js +0 -1
- zenml/zen_server/dashboard/assets/page-D8G2B3Bu.js +0 -1
- zenml/zen_server/dashboard/assets/page-DL8a4_lg.js +0 -3
- zenml/zen_server/dashboard/assets/page-DMhYn1cF.js +0 -1
- zenml/zen_server/dashboard/assets/page-Dd_Yq-Uf.js +0 -6
- zenml/zen_server/dashboard/assets/page-DfSvqT8g.js +0 -1
- zenml/zen_server/dashboard/assets/page-Dt6ANUTx.js +0 -1
- zenml/zen_server/dashboard/assets/page-DtvTleaT.js +0 -1
- zenml/zen_server/dashboard/assets/page-DwfGTiVs.js +0 -1
- zenml/zen_server/dashboard/assets/page-JgomSTDc.js +0 -1
- zenml/zen_server/dashboard/assets/page-L84ig6HB.js +0 -1
- zenml/zen_server/dashboard/assets/page-Mabsn4QJ.js +0 -1
- zenml/zen_server/dashboard/assets/page-P04L5cm9.js +0 -1
- zenml/zen_server/dashboard/assets/page-PfhAnvq4.js +0 -1
- zenml/zen_server/dashboard/assets/page-WdRrlNt_.js +0 -1
- zenml/zen_server/dashboard/assets/page-cqJDDDeK.js +0 -1
- zenml/zen_server/dashboard/assets/page-k-Wxh9L_.js +0 -1
- zenml/zen_server/dashboard/assets/page-y-zV4n0c.js +0 -1
- zenml/zen_server/dashboard/assets/rocket-Cf-B-XOR.js +0 -1
- zenml/zen_server/dashboard/assets/settings_preview-0JLrRgHP.webp +0 -0
- zenml/zen_server/dashboard/assets/sharedSchema-Bse2agAf.js +0 -14
- zenml/zen_server/dashboard/assets/stack-detail-query-BAcZJrN3.js +0 -1
- zenml/zen_server/dashboard/assets/tick-circle-m94Aa6Zt.js +0 -1
- zenml/zen_server/dashboard/assets/tour-cover-BYfeen6M.webp +0 -0
- zenml/zen_server/dashboard/assets/type-guards-CaeD8wHO.js +0 -1
- zenml/zen_server/dashboard/assets/update-server-settings-mutation-DwMM1LJz.js +0 -1
- {zenml_nightly-0.82.1.dev20250527.dist-info → zenml_nightly-0.83.0.dev20250529.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.82.1.dev20250527.dist-info → zenml_nightly-0.83.0.dev20250529.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.82.1.dev20250527.dist-info → zenml_nightly-0.83.0.dev20250529.dist-info}/entry_points.txt +0 -0
@@ -66,7 +66,8 @@ from sqlalchemy.exc import (
|
|
66
66
|
ArgumentError,
|
67
67
|
IntegrityError,
|
68
68
|
)
|
69
|
-
from sqlalchemy.orm import Mapped, noload
|
69
|
+
from sqlalchemy.orm import Mapped, joinedload, noload
|
70
|
+
from sqlalchemy.sql.base import ExecutableOption
|
70
71
|
from sqlalchemy.util import immutabledict
|
71
72
|
from sqlmodel import Session as SqlModelSession
|
72
73
|
|
@@ -97,10 +98,12 @@ from zenml.analytics.utils import (
|
|
97
98
|
track_handler,
|
98
99
|
)
|
99
100
|
from zenml.config.global_config import GlobalConfiguration
|
101
|
+
from zenml.config.pipeline_configurations import PipelineConfiguration
|
100
102
|
from zenml.config.pipeline_run_configuration import PipelineRunConfiguration
|
101
103
|
from zenml.config.secrets_store_config import SecretsStoreConfiguration
|
102
104
|
from zenml.config.server_config import ServerConfiguration
|
103
|
-
from zenml.config.
|
105
|
+
from zenml.config.source import Source
|
106
|
+
from zenml.config.step_configurations import Step, StepConfiguration, StepSpec
|
104
107
|
from zenml.config.store_config import StoreConfiguration
|
105
108
|
from zenml.constants import (
|
106
109
|
DEFAULT_PASSWORD,
|
@@ -119,6 +122,7 @@ from zenml.constants import (
|
|
119
122
|
is_true_string_value,
|
120
123
|
)
|
121
124
|
from zenml.enums import (
|
125
|
+
ArtifactSaveType,
|
122
126
|
AuthScheme,
|
123
127
|
DatabaseBackupStrategy,
|
124
128
|
ExecutionStatus,
|
@@ -222,6 +226,7 @@ from zenml.models import (
|
|
222
226
|
PipelineFilter,
|
223
227
|
PipelineRequest,
|
224
228
|
PipelineResponse,
|
229
|
+
PipelineRunDAG,
|
225
230
|
PipelineRunFilter,
|
226
231
|
PipelineRunRequest,
|
227
232
|
PipelineRunResponse,
|
@@ -318,6 +323,7 @@ from zenml.zen_stores import template_utils
|
|
318
323
|
from zenml.zen_stores.base_zen_store import (
|
319
324
|
BaseZenStore,
|
320
325
|
)
|
326
|
+
from zenml.zen_stores.dag_generator import DAGGeneratorHelper
|
321
327
|
from zenml.zen_stores.migrations.alembic import (
|
322
328
|
Alembic,
|
323
329
|
)
|
@@ -367,7 +373,10 @@ from zenml.zen_stores.schemas.artifact_visualization_schemas import (
|
|
367
373
|
from zenml.zen_stores.schemas.logs_schemas import LogsSchema
|
368
374
|
from zenml.zen_stores.schemas.service_schemas import ServiceSchema
|
369
375
|
from zenml.zen_stores.schemas.trigger_schemas import TriggerSchema
|
370
|
-
from zenml.zen_stores.schemas.utils import
|
376
|
+
from zenml.zen_stores.schemas.utils import (
|
377
|
+
get_resource_type_name,
|
378
|
+
jl_arg,
|
379
|
+
)
|
371
380
|
from zenml.zen_stores.secrets_stores.base_secrets_store import BaseSecretsStore
|
372
381
|
from zenml.zen_stores.secrets_stores.sql_secrets_store import (
|
373
382
|
SqlSecretsStoreConfiguration,
|
@@ -1037,6 +1046,7 @@ class SqlZenStore(BaseZenStore):
|
|
1037
1046
|
]
|
1038
1047
|
] = None,
|
1039
1048
|
hydrate: bool = False,
|
1049
|
+
apply_query_options_from_schema: bool = False,
|
1040
1050
|
) -> Page[AnyResponse]:
|
1041
1051
|
"""Given a query, return a Page instance with a list of filtered Models.
|
1042
1052
|
|
@@ -1057,6 +1067,8 @@ class SqlZenStore(BaseZenStore):
|
|
1057
1067
|
arguments and return a `List` of items.
|
1058
1068
|
hydrate: Flag deciding whether to hydrate the output model(s)
|
1059
1069
|
by including metadata fields in the response.
|
1070
|
+
apply_query_options_from_schema: Flag deciding whether to apply
|
1071
|
+
query options defined on the schema.
|
1060
1072
|
|
1061
1073
|
Returns:
|
1062
1074
|
The Domain Model representation of the DB resource
|
@@ -1100,6 +1112,12 @@ class SqlZenStore(BaseZenStore):
|
|
1100
1112
|
f"{total_pages}."
|
1101
1113
|
)
|
1102
1114
|
|
1115
|
+
query_options = table.get_query_options(
|
1116
|
+
include_metadata=hydrate, include_resources=True
|
1117
|
+
)
|
1118
|
+
if apply_query_options_from_schema and query_options:
|
1119
|
+
query = query.options(*query_options)
|
1120
|
+
|
1103
1121
|
# Get a page of the actual data
|
1104
1122
|
item_schemas: Sequence[AnySchema]
|
1105
1123
|
if custom_fetch:
|
@@ -1110,9 +1128,10 @@ class SqlZenStore(BaseZenStore):
|
|
1110
1128
|
filter_model.offset : filter_model.offset + filter_model.size
|
1111
1129
|
]
|
1112
1130
|
else:
|
1113
|
-
|
1131
|
+
query_result = session.exec(
|
1114
1132
|
query.limit(filter_model.size).offset(filter_model.offset)
|
1115
|
-
)
|
1133
|
+
)
|
1134
|
+
item_schemas = query_result.all()
|
1116
1135
|
|
1117
1136
|
# Convert this page of items from schemas to models.
|
1118
1137
|
items: List[AnyResponse] = []
|
@@ -5054,6 +5073,330 @@ class SqlZenStore(BaseZenStore):
|
|
5054
5073
|
|
5055
5074
|
# ----------------------------- Pipeline runs -----------------------------
|
5056
5075
|
|
5076
|
+
def get_pipeline_run_dag(self, pipeline_run_id: UUID) -> PipelineRunDAG:
|
5077
|
+
"""Get the DAG of a pipeline run.
|
5078
|
+
|
5079
|
+
Args:
|
5080
|
+
pipeline_run_id: The ID of the pipeline run.
|
5081
|
+
|
5082
|
+
Returns:
|
5083
|
+
The DAG of the pipeline run.
|
5084
|
+
"""
|
5085
|
+
helper = DAGGeneratorHelper()
|
5086
|
+
with Session(self.engine) as session:
|
5087
|
+
run = self._get_schema_by_id(
|
5088
|
+
resource_id=pipeline_run_id,
|
5089
|
+
schema_class=PipelineRunSchema,
|
5090
|
+
session=session,
|
5091
|
+
query_options=[
|
5092
|
+
joinedload(jl_arg(PipelineRunSchema.deployment)),
|
5093
|
+
# joinedload(jl_arg(PipelineRunSchema.step_runs)).sele(
|
5094
|
+
# jl_arg(StepRunSchema.input_artifacts)
|
5095
|
+
# ),
|
5096
|
+
# joinedload(jl_arg(PipelineRunSchema.step_runs)).joinedload(
|
5097
|
+
# jl_arg(StepRunSchema.output_artifacts)
|
5098
|
+
# ),
|
5099
|
+
],
|
5100
|
+
)
|
5101
|
+
assert run.deployment is not None
|
5102
|
+
deployment = run.deployment
|
5103
|
+
step_runs = {step.name: step for step in run.step_runs}
|
5104
|
+
|
5105
|
+
pipeline_configuration = PipelineConfiguration.model_validate_json(
|
5106
|
+
deployment.pipeline_configuration
|
5107
|
+
)
|
5108
|
+
pipeline_configuration.finalize_substitutions(
|
5109
|
+
start_time=run.start_time, inplace=True
|
5110
|
+
)
|
5111
|
+
|
5112
|
+
steps = {
|
5113
|
+
step_name: Step.from_dict(
|
5114
|
+
config_dict, pipeline_configuration=pipeline_configuration
|
5115
|
+
)
|
5116
|
+
for step_name, config_dict in json.loads(
|
5117
|
+
deployment.step_configurations
|
5118
|
+
).items()
|
5119
|
+
}
|
5120
|
+
regular_output_artifact_nodes: Dict[
|
5121
|
+
str, Dict[str, PipelineRunDAG.Node]
|
5122
|
+
] = defaultdict(dict)
|
5123
|
+
|
5124
|
+
def _get_regular_output_artifact_node(
|
5125
|
+
step_name: str, output_name: str
|
5126
|
+
) -> PipelineRunDAG.Node:
|
5127
|
+
substituted_output_name = format_name_template(
|
5128
|
+
output_name,
|
5129
|
+
substitutions=steps[step_name].config.substitutions,
|
5130
|
+
)
|
5131
|
+
return regular_output_artifact_nodes[step_name][
|
5132
|
+
substituted_output_name
|
5133
|
+
]
|
5134
|
+
|
5135
|
+
for step_name, step in steps.items():
|
5136
|
+
upstream_steps = set(step.spec.upstream_steps)
|
5137
|
+
|
5138
|
+
step_id = None
|
5139
|
+
metadata: Dict[str, Any] = {}
|
5140
|
+
|
5141
|
+
step_run = step_runs.get(step_name)
|
5142
|
+
if step_run:
|
5143
|
+
step_id = step_run.id
|
5144
|
+
metadata["status"] = step_run.status
|
5145
|
+
|
5146
|
+
if step_run.end_time and step_run.start_time:
|
5147
|
+
metadata["duration"] = (
|
5148
|
+
step_run.end_time - step_run.start_time
|
5149
|
+
).total_seconds()
|
5150
|
+
|
5151
|
+
step_node = helper.add_step_node(
|
5152
|
+
node_id=helper.get_step_node_id(name=step_name),
|
5153
|
+
id=step_id,
|
5154
|
+
name=step_name,
|
5155
|
+
**metadata,
|
5156
|
+
)
|
5157
|
+
|
5158
|
+
if step_run:
|
5159
|
+
for input in step_run.input_artifacts:
|
5160
|
+
input_type = StepRunInputArtifactType(input.type)
|
5161
|
+
|
5162
|
+
if input_type == StepRunInputArtifactType.STEP_OUTPUT:
|
5163
|
+
# This is a regular input artifact, so it is
|
5164
|
+
# guaranteed that an upstream step already ran and
|
5165
|
+
# produced the artifact.
|
5166
|
+
input_config = step.spec.inputs[input.name]
|
5167
|
+
artifact_node = _get_regular_output_artifact_node(
|
5168
|
+
input_config.step_name,
|
5169
|
+
input_config.output_name,
|
5170
|
+
)
|
5171
|
+
|
5172
|
+
# If the upstream step and the current step are
|
5173
|
+
# already connected via a regular artifact, we
|
5174
|
+
# don't add a direct edge between the two.
|
5175
|
+
try:
|
5176
|
+
upstream_steps.remove(input_config.step_name)
|
5177
|
+
except KeyError:
|
5178
|
+
pass
|
5179
|
+
else:
|
5180
|
+
# This is not a regular input artifact, but a
|
5181
|
+
# dynamic (loaded inside the step), external or
|
5182
|
+
# lazy-loaded artifact. It might be that this was
|
5183
|
+
# produced by another step in this pipeline, but
|
5184
|
+
# we want to display them as separate nodes in the
|
5185
|
+
# DAG. We can therefore always create a new node
|
5186
|
+
# here.
|
5187
|
+
artifact_node = helper.add_artifact_node(
|
5188
|
+
node_id=helper.get_artifact_node_id(
|
5189
|
+
name=input.name,
|
5190
|
+
step_name=step_name,
|
5191
|
+
io_type=input.type,
|
5192
|
+
is_input=True,
|
5193
|
+
),
|
5194
|
+
id=input.artifact_id,
|
5195
|
+
name=input.name,
|
5196
|
+
type=input.artifact_version.type,
|
5197
|
+
data_type=Source.model_validate_json(
|
5198
|
+
input.artifact_version.data_type
|
5199
|
+
).import_path,
|
5200
|
+
save_type=input.artifact_version.save_type,
|
5201
|
+
)
|
5202
|
+
|
5203
|
+
helper.add_edge(
|
5204
|
+
source=artifact_node.node_id,
|
5205
|
+
target=step_node.node_id,
|
5206
|
+
input_name=input.name,
|
5207
|
+
type=input_type.value,
|
5208
|
+
)
|
5209
|
+
|
5210
|
+
for output in step_run.output_artifacts:
|
5211
|
+
# There is a very rare case where a node in the DAG
|
5212
|
+
# already exists for an output artifact. This can happen
|
5213
|
+
# when there are two steps that have no direct
|
5214
|
+
# dependency and can therefore run at the same time, and
|
5215
|
+
# one of them is producing an artifact that is then lazy
|
5216
|
+
# or dynamically loaded by the other step. We do not
|
5217
|
+
# want to merge these and instead display them
|
5218
|
+
# separately in the DAG, but if that should ever change
|
5219
|
+
# this would be the place to merge them.
|
5220
|
+
artifact_node = helper.add_artifact_node(
|
5221
|
+
node_id=helper.get_artifact_node_id(
|
5222
|
+
name=output.name,
|
5223
|
+
step_name=step_name,
|
5224
|
+
io_type=output.artifact_version.save_type,
|
5225
|
+
is_input=False,
|
5226
|
+
),
|
5227
|
+
id=output.artifact_id,
|
5228
|
+
name=output.name,
|
5229
|
+
type=output.artifact_version.type,
|
5230
|
+
data_type=Source.model_validate_json(
|
5231
|
+
output.artifact_version.data_type
|
5232
|
+
).import_path,
|
5233
|
+
save_type=output.artifact_version.save_type,
|
5234
|
+
)
|
5235
|
+
|
5236
|
+
helper.add_edge(
|
5237
|
+
source=step_node.node_id,
|
5238
|
+
target=artifact_node.node_id,
|
5239
|
+
output_name=output.name,
|
5240
|
+
type=output.artifact_version.save_type,
|
5241
|
+
)
|
5242
|
+
if (
|
5243
|
+
output.artifact_version.save_type
|
5244
|
+
== ArtifactSaveType.STEP_OUTPUT
|
5245
|
+
):
|
5246
|
+
regular_output_artifact_nodes[step_name][
|
5247
|
+
output.name
|
5248
|
+
] = artifact_node
|
5249
|
+
|
5250
|
+
for output_name in step.config.outputs.keys():
|
5251
|
+
# If the step failed or is still running, we do not have
|
5252
|
+
# its regular outputs. So we populate the DAG with the
|
5253
|
+
# outputs from the config instead.
|
5254
|
+
substituted_output_name = format_name_template(
|
5255
|
+
output_name,
|
5256
|
+
substitutions=step.config.substitutions,
|
5257
|
+
)
|
5258
|
+
if (
|
5259
|
+
substituted_output_name
|
5260
|
+
in regular_output_artifact_nodes[step_name]
|
5261
|
+
):
|
5262
|
+
# If the real output already exists we can skip
|
5263
|
+
# adding a new node for it.
|
5264
|
+
continue
|
5265
|
+
|
5266
|
+
artifact_node = helper.add_artifact_node(
|
5267
|
+
node_id=helper.get_artifact_node_id(
|
5268
|
+
name=substituted_output_name,
|
5269
|
+
step_name=step_name,
|
5270
|
+
io_type=ArtifactSaveType.STEP_OUTPUT.value,
|
5271
|
+
is_input=False,
|
5272
|
+
),
|
5273
|
+
name=substituted_output_name,
|
5274
|
+
)
|
5275
|
+
helper.add_edge(
|
5276
|
+
source=step_node.node_id,
|
5277
|
+
target=artifact_node.node_id,
|
5278
|
+
output_name=output_name,
|
5279
|
+
type=ArtifactSaveType.STEP_OUTPUT.value,
|
5280
|
+
)
|
5281
|
+
regular_output_artifact_nodes[step_name][
|
5282
|
+
substituted_output_name
|
5283
|
+
] = artifact_node
|
5284
|
+
else:
|
5285
|
+
for input_name, input_config in step.spec.inputs.items():
|
5286
|
+
# This node should always exist, as the step
|
5287
|
+
# configurations are sorted and therefore all
|
5288
|
+
# upstream steps should have been processed already.
|
5289
|
+
artifact_node = _get_regular_output_artifact_node(
|
5290
|
+
input_config.step_name,
|
5291
|
+
input_config.output_name,
|
5292
|
+
)
|
5293
|
+
|
5294
|
+
helper.add_edge(
|
5295
|
+
source=artifact_node.node_id,
|
5296
|
+
target=step_node.node_id,
|
5297
|
+
input_name=input_name,
|
5298
|
+
type=StepRunInputArtifactType.STEP_OUTPUT.value,
|
5299
|
+
)
|
5300
|
+
# If the upstream step and the current step are
|
5301
|
+
# already connected via a regular artifact, we
|
5302
|
+
# don't add a direct edge between the two.
|
5303
|
+
try:
|
5304
|
+
upstream_steps.remove(input_config.step_name)
|
5305
|
+
except KeyError:
|
5306
|
+
pass
|
5307
|
+
|
5308
|
+
for input_name in step.config.client_lazy_loaders.keys():
|
5309
|
+
artifact_node = helper.add_artifact_node(
|
5310
|
+
node_id=helper.get_artifact_node_id(
|
5311
|
+
name=input_name,
|
5312
|
+
step_name=step_name,
|
5313
|
+
io_type=StepRunInputArtifactType.LAZY_LOADED.value,
|
5314
|
+
is_input=True,
|
5315
|
+
),
|
5316
|
+
name=input_name,
|
5317
|
+
)
|
5318
|
+
helper.add_edge(
|
5319
|
+
source=artifact_node.node_id,
|
5320
|
+
target=step_node.node_id,
|
5321
|
+
input_name=input_name,
|
5322
|
+
type=StepRunInputArtifactType.LAZY_LOADED.value,
|
5323
|
+
)
|
5324
|
+
|
5325
|
+
for (
|
5326
|
+
input_name
|
5327
|
+
) in step.config.model_artifacts_or_metadata.keys():
|
5328
|
+
artifact_node = helper.add_artifact_node(
|
5329
|
+
node_id=helper.get_artifact_node_id(
|
5330
|
+
name=input_name,
|
5331
|
+
step_name=step_name,
|
5332
|
+
io_type=StepRunInputArtifactType.LAZY_LOADED.value,
|
5333
|
+
is_input=True,
|
5334
|
+
),
|
5335
|
+
name=input_name,
|
5336
|
+
)
|
5337
|
+
helper.add_edge(
|
5338
|
+
source=artifact_node.node_id,
|
5339
|
+
target=step_node.node_id,
|
5340
|
+
input_name=input_name,
|
5341
|
+
type=StepRunInputArtifactType.LAZY_LOADED.value,
|
5342
|
+
)
|
5343
|
+
|
5344
|
+
for (
|
5345
|
+
input_name
|
5346
|
+
) in step.config.external_input_artifacts.keys():
|
5347
|
+
artifact_node = helper.add_artifact_node(
|
5348
|
+
node_id=helper.get_artifact_node_id(
|
5349
|
+
name=input_name,
|
5350
|
+
step_name=step_name,
|
5351
|
+
io_type=StepRunInputArtifactType.EXTERNAL.value,
|
5352
|
+
is_input=True,
|
5353
|
+
),
|
5354
|
+
name=input_name,
|
5355
|
+
)
|
5356
|
+
helper.add_edge(
|
5357
|
+
source=artifact_node.node_id,
|
5358
|
+
target=step_node.node_id,
|
5359
|
+
input_name=input_name,
|
5360
|
+
type=StepRunInputArtifactType.EXTERNAL.value,
|
5361
|
+
)
|
5362
|
+
|
5363
|
+
for output_name in step.config.outputs.keys():
|
5364
|
+
substituted_output_name = format_name_template(
|
5365
|
+
output_name,
|
5366
|
+
substitutions=step.config.substitutions,
|
5367
|
+
)
|
5368
|
+
artifact_node = helper.add_artifact_node(
|
5369
|
+
node_id=helper.get_artifact_node_id(
|
5370
|
+
name=substituted_output_name,
|
5371
|
+
step_name=step_name,
|
5372
|
+
io_type=ArtifactSaveType.STEP_OUTPUT.value,
|
5373
|
+
is_input=False,
|
5374
|
+
),
|
5375
|
+
name=substituted_output_name,
|
5376
|
+
)
|
5377
|
+
helper.add_edge(
|
5378
|
+
source=step_node.node_id,
|
5379
|
+
target=artifact_node.node_id,
|
5380
|
+
output_name=output_name,
|
5381
|
+
type=ArtifactSaveType.STEP_OUTPUT.value,
|
5382
|
+
)
|
5383
|
+
regular_output_artifact_nodes[step_name][
|
5384
|
+
substituted_output_name
|
5385
|
+
] = artifact_node
|
5386
|
+
|
5387
|
+
for upstream_step_name in upstream_steps:
|
5388
|
+
upstream_node = helper.get_step_node_by_name(
|
5389
|
+
upstream_step_name
|
5390
|
+
)
|
5391
|
+
helper.add_edge(
|
5392
|
+
source=upstream_node.node_id,
|
5393
|
+
target=step_node.node_id,
|
5394
|
+
)
|
5395
|
+
|
5396
|
+
return helper.finalize_dag(
|
5397
|
+
pipeline_run_id=pipeline_run_id, status=ExecutionStatus(run.status)
|
5398
|
+
)
|
5399
|
+
|
5057
5400
|
def _create_run(
|
5058
5401
|
self, pipeline_run: PipelineRunRequest, session: Session
|
5059
5402
|
) -> PipelineRunResponse:
|
@@ -5154,6 +5497,7 @@ class SqlZenStore(BaseZenStore):
|
|
5154
5497
|
self,
|
5155
5498
|
run_id: UUID,
|
5156
5499
|
hydrate: bool = True,
|
5500
|
+
include_full_metadata: bool = False,
|
5157
5501
|
include_python_packages: bool = False,
|
5158
5502
|
) -> PipelineRunResponse:
|
5159
5503
|
"""Gets a pipeline run.
|
@@ -5162,6 +5506,8 @@ class SqlZenStore(BaseZenStore):
|
|
5162
5506
|
run_id: The ID of the pipeline run to get.
|
5163
5507
|
hydrate: Flag deciding whether to hydrate the output model(s)
|
5164
5508
|
by including metadata fields in the response.
|
5509
|
+
include_full_metadata: Flag deciding whether to include the
|
5510
|
+
full metadata in the response.
|
5165
5511
|
include_python_packages: Flag deciding whether to include the
|
5166
5512
|
python packages in the response.
|
5167
5513
|
|
@@ -5173,11 +5519,15 @@ class SqlZenStore(BaseZenStore):
|
|
5173
5519
|
resource_id=run_id,
|
5174
5520
|
schema_class=PipelineRunSchema,
|
5175
5521
|
session=session,
|
5522
|
+
query_options=PipelineRunSchema.get_query_options(
|
5523
|
+
include_metadata=hydrate, include_resources=True
|
5524
|
+
),
|
5176
5525
|
)
|
5177
5526
|
return run.to_model(
|
5178
5527
|
include_metadata=hydrate,
|
5179
5528
|
include_resources=True,
|
5180
5529
|
include_python_packages=include_python_packages,
|
5530
|
+
include_full_metadata=include_full_metadata,
|
5181
5531
|
)
|
5182
5532
|
|
5183
5533
|
def get_run_status(
|
@@ -5409,6 +5759,7 @@ class SqlZenStore(BaseZenStore):
|
|
5409
5759
|
self,
|
5410
5760
|
runs_filter_model: PipelineRunFilter,
|
5411
5761
|
hydrate: bool = False,
|
5762
|
+
include_full_metadata: bool = False,
|
5412
5763
|
) -> Page[PipelineRunResponse]:
|
5413
5764
|
"""List all pipeline runs matching the given filter criteria.
|
5414
5765
|
|
@@ -5417,6 +5768,8 @@ class SqlZenStore(BaseZenStore):
|
|
5417
5768
|
params.
|
5418
5769
|
hydrate: Flag deciding whether to hydrate the output model(s)
|
5419
5770
|
by including metadata fields in the response.
|
5771
|
+
include_full_metadata: If True, include metadata of all steps in
|
5772
|
+
the response.
|
5420
5773
|
|
5421
5774
|
Returns:
|
5422
5775
|
A list of all pipeline runs matching the filter criteria.
|
@@ -5427,12 +5780,19 @@ class SqlZenStore(BaseZenStore):
|
|
5427
5780
|
session=session,
|
5428
5781
|
)
|
5429
5782
|
query = select(PipelineRunSchema)
|
5783
|
+
|
5430
5784
|
return self.filter_and_paginate(
|
5431
5785
|
session=session,
|
5432
5786
|
query=query,
|
5433
5787
|
table=PipelineRunSchema,
|
5434
5788
|
filter_model=runs_filter_model,
|
5435
5789
|
hydrate=hydrate,
|
5790
|
+
custom_schema_to_model_conversion=lambda schema: schema.to_model(
|
5791
|
+
include_metadata=hydrate,
|
5792
|
+
include_resources=True,
|
5793
|
+
include_full_metadata=include_full_metadata,
|
5794
|
+
),
|
5795
|
+
apply_query_options_from_schema=True,
|
5436
5796
|
)
|
5437
5797
|
|
5438
5798
|
def update_run(
|
@@ -8170,19 +8530,36 @@ class SqlZenStore(BaseZenStore):
|
|
8170
8530
|
step_model = step_schema.to_model(include_metadata=True)
|
8171
8531
|
|
8172
8532
|
# Save input artifact IDs into the database.
|
8173
|
-
for input_name,
|
8174
|
-
|
8175
|
-
|
8176
|
-
|
8177
|
-
|
8178
|
-
|
8179
|
-
|
8180
|
-
|
8181
|
-
|
8182
|
-
|
8183
|
-
|
8184
|
-
|
8185
|
-
|
8533
|
+
for input_name, artifact_version_ids in step_run.inputs.items():
|
8534
|
+
for artifact_version_id in artifact_version_ids:
|
8535
|
+
if step_run.original_step_run_id:
|
8536
|
+
# This is a cached step run, for which the input
|
8537
|
+
# artifacts might include manually loaded artifacts
|
8538
|
+
# which can not be inferred from the step config. In
|
8539
|
+
# this case, we check the input type of the artifact
|
8540
|
+
# for the original step run.
|
8541
|
+
input_type = self._get_step_run_input_type_from_cached_step_run(
|
8542
|
+
input_name=input_name,
|
8543
|
+
artifact_version_id=artifact_version_id,
|
8544
|
+
cached_step_run_id=step_run.original_step_run_id,
|
8545
|
+
session=session,
|
8546
|
+
)
|
8547
|
+
else:
|
8548
|
+
# This is a non-cached step run, which means all input
|
8549
|
+
# artifacts we receive at creation time are inputs that
|
8550
|
+
# are defined in the step config.
|
8551
|
+
input_type = self._get_step_run_input_type_from_config(
|
8552
|
+
input_name=input_name,
|
8553
|
+
step_config=step_model.config,
|
8554
|
+
step_spec=step_model.spec,
|
8555
|
+
)
|
8556
|
+
self._set_run_step_input_artifact(
|
8557
|
+
step_run=step_schema,
|
8558
|
+
artifact_version_id=artifact_version_id,
|
8559
|
+
name=input_name,
|
8560
|
+
input_type=input_type,
|
8561
|
+
session=session,
|
8562
|
+
)
|
8186
8563
|
|
8187
8564
|
# Save output artifact IDs into the database.
|
8188
8565
|
for name, artifact_version_ids in step_run.outputs.items():
|
@@ -8239,6 +8616,9 @@ class SqlZenStore(BaseZenStore):
|
|
8239
8616
|
resource_id=step_run_id,
|
8240
8617
|
schema_class=StepRunSchema,
|
8241
8618
|
session=session,
|
8619
|
+
query_options=StepRunSchema.get_query_options(
|
8620
|
+
include_metadata=hydrate, include_resources=True
|
8621
|
+
),
|
8242
8622
|
)
|
8243
8623
|
return step_run.to_model(
|
8244
8624
|
include_metadata=hydrate, include_resources=True
|
@@ -8272,6 +8652,7 @@ class SqlZenStore(BaseZenStore):
|
|
8272
8652
|
table=StepRunSchema,
|
8273
8653
|
filter_model=step_run_filter_model,
|
8274
8654
|
hydrate=hydrate,
|
8655
|
+
apply_query_options_from_schema=True,
|
8275
8656
|
)
|
8276
8657
|
|
8277
8658
|
def update_run_step(
|
@@ -8335,7 +8716,46 @@ class SqlZenStore(BaseZenStore):
|
|
8335
8716
|
include_metadata=True, include_resources=True
|
8336
8717
|
)
|
8337
8718
|
|
8338
|
-
def
|
8719
|
+
def _get_step_run_input_type_from_cached_step_run(
|
8720
|
+
self,
|
8721
|
+
input_name: str,
|
8722
|
+
artifact_version_id: UUID,
|
8723
|
+
cached_step_run_id: UUID,
|
8724
|
+
session: Session,
|
8725
|
+
) -> StepRunInputArtifactType:
|
8726
|
+
"""Get the input type of an artifact from a cached step run.
|
8727
|
+
|
8728
|
+
Args:
|
8729
|
+
input_name: The name of the input artifact.
|
8730
|
+
artifact_version_id: The ID of the artifact version.
|
8731
|
+
cached_step_run_id: The ID of the cached step run.
|
8732
|
+
session: The database session to use.
|
8733
|
+
|
8734
|
+
Raises:
|
8735
|
+
RuntimeError: If no input artifact is found for the given input
|
8736
|
+
name and artifact version ID.
|
8737
|
+
|
8738
|
+
Returns:
|
8739
|
+
The input type of the artifact.
|
8740
|
+
"""
|
8741
|
+
query = (
|
8742
|
+
select(StepRunInputArtifactSchema.type)
|
8743
|
+
.where(StepRunInputArtifactSchema.name == input_name)
|
8744
|
+
.where(
|
8745
|
+
StepRunInputArtifactSchema.artifact_id == artifact_version_id
|
8746
|
+
)
|
8747
|
+
.where(StepRunInputArtifactSchema.step_id == cached_step_run_id)
|
8748
|
+
)
|
8749
|
+
result = session.exec(query).first()
|
8750
|
+
if result is None:
|
8751
|
+
raise RuntimeError(
|
8752
|
+
f"No input artifact found for input name `{input_name}`, "
|
8753
|
+
f"artifact version `{artifact_version_id}` and step run "
|
8754
|
+
f"`{cached_step_run_id}`."
|
8755
|
+
)
|
8756
|
+
return StepRunInputArtifactType(result)
|
8757
|
+
|
8758
|
+
def _get_step_run_input_type_from_config(
|
8339
8759
|
self,
|
8340
8760
|
input_name: str,
|
8341
8761
|
step_config: StepConfiguration,
|
@@ -8500,12 +8920,16 @@ class SqlZenStore(BaseZenStore):
|
|
8500
8920
|
from zenml.orchestrators.publish_utils import get_pipeline_run_status
|
8501
8921
|
|
8502
8922
|
pipeline_run = session.exec(
|
8503
|
-
select(PipelineRunSchema)
|
8504
|
-
|
8923
|
+
select(PipelineRunSchema)
|
8924
|
+
.options(
|
8925
|
+
joinedload(
|
8926
|
+
jl_arg(PipelineRunSchema.deployment), innerjoin=True
|
8927
|
+
)
|
8505
8928
|
)
|
8929
|
+
.where(PipelineRunSchema.id == pipeline_run_id)
|
8506
8930
|
).one()
|
8507
|
-
|
8508
|
-
select(StepRunSchema).where(
|
8931
|
+
step_run_statuses = session.exec(
|
8932
|
+
select(StepRunSchema.status).where(
|
8509
8933
|
StepRunSchema.pipeline_run_id == pipeline_run_id
|
8510
8934
|
)
|
8511
8935
|
).all()
|
@@ -8513,13 +8937,11 @@ class SqlZenStore(BaseZenStore):
|
|
8513
8937
|
# Deployment always exists for pipeline runs of newer versions
|
8514
8938
|
assert pipeline_run.deployment
|
8515
8939
|
num_steps = len(
|
8516
|
-
pipeline_run.deployment.
|
8517
|
-
include_metadata=True
|
8518
|
-
).step_configurations
|
8940
|
+
json.loads(pipeline_run.deployment.step_configurations)
|
8519
8941
|
)
|
8520
8942
|
new_status = get_pipeline_run_status(
|
8521
8943
|
step_statuses=[
|
8522
|
-
ExecutionStatus(
|
8944
|
+
ExecutionStatus(status) for status in step_run_statuses
|
8523
8945
|
],
|
8524
8946
|
num_steps=num_steps,
|
8525
8947
|
)
|
@@ -8596,6 +9018,18 @@ class SqlZenStore(BaseZenStore):
|
|
8596
9018
|
OnboardingStep.PRODUCTION_SETUP_COMPLETED,
|
8597
9019
|
}
|
8598
9020
|
)
|
9021
|
+
if OnboardingStep.THIRD_PIPELINE_RUN not in (
|
9022
|
+
self._cached_onboarding_state or {}
|
9023
|
+
):
|
9024
|
+
onboarding_state = self.get_onboarding_state()
|
9025
|
+
if OnboardingStep.PIPELINE_RUN in onboarding_state:
|
9026
|
+
completed_onboarding_steps.add(
|
9027
|
+
OnboardingStep.SECOND_PIPELINE_RUN
|
9028
|
+
)
|
9029
|
+
if OnboardingStep.SECOND_PIPELINE_RUN in onboarding_state:
|
9030
|
+
completed_onboarding_steps.add(
|
9031
|
+
OnboardingStep.THIRD_PIPELINE_RUN
|
9032
|
+
)
|
8599
9033
|
|
8600
9034
|
self._update_onboarding_state(
|
8601
9035
|
completed_steps=completed_onboarding_steps, session=session
|
@@ -9751,6 +10185,7 @@ class SqlZenStore(BaseZenStore):
|
|
9751
10185
|
session: Session,
|
9752
10186
|
resource_type: Optional[str] = None,
|
9753
10187
|
project_id: Optional[UUID] = None,
|
10188
|
+
query_options: Optional[Sequence[ExecutableOption]] = None,
|
9754
10189
|
) -> AnySchema:
|
9755
10190
|
"""Query a schema by its 'id' field.
|
9756
10191
|
|
@@ -9762,6 +10197,7 @@ class SqlZenStore(BaseZenStore):
|
|
9762
10197
|
messages. If not provided, the type name will be inferred
|
9763
10198
|
from the schema class.
|
9764
10199
|
project_id: Optional ID of a project to filter by.
|
10200
|
+
query_options: Optional list of query options to apply to the query.
|
9765
10201
|
|
9766
10202
|
Returns:
|
9767
10203
|
The schema object.
|
@@ -9786,6 +10222,9 @@ class SqlZenStore(BaseZenStore):
|
|
9786
10222
|
|
9787
10223
|
query = query.where(schema_class.project_id == project_id) # type: ignore[attr-defined]
|
9788
10224
|
|
10225
|
+
if query_options:
|
10226
|
+
query = query.options(*query_options)
|
10227
|
+
|
9789
10228
|
schema = session.exec(query).first()
|
9790
10229
|
|
9791
10230
|
if schema is None:
|
@@ -10605,7 +11044,7 @@ class SqlZenStore(BaseZenStore):
|
|
10605
11044
|
)
|
10606
11045
|
track(
|
10607
11046
|
event=AnalyticsEvent.CREATED_MODEL_VERSION,
|
10608
|
-
metadata={"project_id": model_version.
|
11047
|
+
metadata={"project_id": model_version.project_id},
|
10609
11048
|
)
|
10610
11049
|
return True, model_version
|
10611
11050
|
except EntityCreationError:
|
@@ -10871,6 +11310,9 @@ class SqlZenStore(BaseZenStore):
|
|
10871
11310
|
resource_id=model_version_id,
|
10872
11311
|
schema_class=ModelVersionSchema,
|
10873
11312
|
session=session,
|
11313
|
+
query_options=ModelVersionSchema.get_query_options(
|
11314
|
+
include_metadata=hydrate, include_resources=True
|
11315
|
+
),
|
10874
11316
|
)
|
10875
11317
|
|
10876
11318
|
return model_version.to_model(
|
@@ -10906,6 +11348,7 @@ class SqlZenStore(BaseZenStore):
|
|
10906
11348
|
table=ModelVersionSchema,
|
10907
11349
|
filter_model=model_version_filter_model,
|
10908
11350
|
hydrate=hydrate,
|
11351
|
+
apply_query_options_from_schema=True,
|
10909
11352
|
)
|
10910
11353
|
|
10911
11354
|
def delete_model_version(
|