zenml-nightly 0.64.0.dev20240809__py3-none-any.whl → 0.65.0.dev20240906__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.
- README.md +1 -1
- RELEASE_NOTES.md +68 -4
- zenml/VERSION +1 -1
- zenml/artifacts/utils.py +13 -6
- zenml/cli/__init__.py +1 -1
- zenml/cli/base.py +4 -4
- zenml/cli/integration.py +48 -9
- zenml/cli/pipeline.py +9 -2
- zenml/cli/stack.py +39 -27
- zenml/cli/utils.py +13 -0
- zenml/client.py +15 -17
- zenml/config/server_config.py +30 -0
- zenml/config/source.py +3 -7
- zenml/constants.py +5 -3
- zenml/entrypoints/base_entrypoint_configuration.py +41 -27
- zenml/entrypoints/step_entrypoint_configuration.py +5 -2
- zenml/enums.py +2 -0
- zenml/environment.py +31 -0
- zenml/feature_stores/base_feature_store.py +4 -6
- zenml/integrations/__init__.py +3 -0
- zenml/integrations/airflow/flavors/airflow_orchestrator_flavor.py +9 -0
- zenml/integrations/aws/__init__.py +2 -2
- zenml/integrations/azure/__init__.py +2 -2
- zenml/integrations/azure/azureml_utils.py +201 -0
- zenml/integrations/azure/flavors/azureml.py +139 -0
- zenml/integrations/azure/flavors/azureml_orchestrator_flavor.py +20 -118
- zenml/integrations/azure/flavors/azureml_step_operator_flavor.py +67 -14
- zenml/integrations/azure/orchestrators/azureml_orchestrator.py +58 -172
- zenml/integrations/azure/orchestrators/azureml_orchestrator_entrypoint_config.py +1 -0
- zenml/integrations/azure/service_connectors/azure_service_connector.py +4 -0
- zenml/integrations/azure/step_operators/azureml_step_operator.py +78 -177
- zenml/integrations/constants.py +3 -0
- zenml/integrations/databricks/__init__.py +22 -4
- zenml/integrations/databricks/flavors/databricks_orchestrator_flavor.py +9 -0
- zenml/integrations/deepchecks/__init__.py +29 -11
- zenml/integrations/deepchecks/materializers/deepchecks_dataset_materializer.py +3 -1
- zenml/integrations/deepchecks/validation_checks.py +0 -30
- zenml/integrations/evidently/__init__.py +17 -2
- zenml/integrations/facets/__init__.py +21 -5
- zenml/integrations/feast/__init__.py +18 -5
- zenml/integrations/gcp/__init__.py +2 -2
- zenml/integrations/gcp/flavors/vertex_orchestrator_flavor.py +9 -0
- zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +10 -1
- zenml/integrations/great_expectations/__init__.py +21 -7
- zenml/integrations/huggingface/__init__.py +39 -15
- zenml/integrations/huggingface/materializers/__init__.py +3 -0
- zenml/integrations/huggingface/materializers/huggingface_datasets_materializer.py +3 -1
- zenml/integrations/huggingface/materializers/huggingface_pt_model_materializer.py +1 -1
- zenml/integrations/huggingface/materializers/huggingface_t5_materializer.py +107 -0
- zenml/integrations/huggingface/materializers/huggingface_tf_model_materializer.py +1 -1
- zenml/integrations/huggingface/materializers/huggingface_tokenizer_materializer.py +2 -2
- zenml/integrations/huggingface/steps/accelerate_runner.py +108 -85
- zenml/integrations/hyperai/flavors/hyperai_orchestrator_flavor.py +9 -0
- zenml/integrations/kubeflow/flavors/kubeflow_orchestrator_flavor.py +9 -0
- zenml/integrations/kubeflow/orchestrators/kubeflow_orchestrator.py +10 -1
- zenml/integrations/kubernetes/flavors/kubernetes_orchestrator_flavor.py +9 -0
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator.py +10 -1
- zenml/integrations/lightning/__init__.py +48 -0
- zenml/integrations/lightning/flavors/__init__.py +23 -0
- zenml/integrations/lightning/flavors/lightning_orchestrator_flavor.py +148 -0
- zenml/integrations/lightning/orchestrators/__init__.py +23 -0
- zenml/integrations/lightning/orchestrators/lightning_orchestrator.py +596 -0
- zenml/integrations/lightning/orchestrators/lightning_orchestrator_entrypoint.py +307 -0
- zenml/integrations/lightning/orchestrators/lightning_orchestrator_entrypoint_configuration.py +77 -0
- zenml/integrations/lightning/orchestrators/utils.py +67 -0
- zenml/integrations/mlflow/__init__.py +43 -5
- zenml/integrations/mlflow/services/mlflow_deployment.py +26 -0
- zenml/integrations/numpy/__init__.py +32 -0
- zenml/integrations/numpy/materializers/__init__.py +18 -0
- zenml/integrations/numpy/materializers/numpy_materializer.py +246 -0
- zenml/integrations/pandas/__init__.py +32 -0
- zenml/integrations/pandas/materializers/__init__.py +18 -0
- zenml/integrations/pandas/materializers/pandas_materializer.py +192 -0
- zenml/integrations/prodigy/annotators/prodigy_annotator.py +1 -1
- zenml/integrations/seldon/__init__.py +18 -3
- zenml/integrations/sklearn/__init__.py +1 -1
- zenml/integrations/skypilot_azure/__init__.py +1 -1
- zenml/integrations/tensorboard/__init__.py +1 -1
- zenml/integrations/tensorflow/__init__.py +2 -2
- zenml/integrations/wandb/experiment_trackers/wandb_experiment_tracker.py +1 -1
- zenml/integrations/whylogs/__init__.py +18 -2
- zenml/logging/step_logging.py +9 -2
- zenml/materializers/__init__.py +0 -4
- zenml/materializers/base_materializer.py +4 -0
- zenml/materializers/numpy_materializer.py +23 -234
- zenml/materializers/pandas_materializer.py +22 -179
- zenml/model/model.py +91 -2
- zenml/model/utils.py +5 -5
- zenml/models/__init__.py +16 -3
- zenml/models/v2/core/model_version.py +1 -1
- zenml/models/v2/core/pipeline_run.py +31 -1
- zenml/models/v2/core/stack.py +51 -20
- zenml/models/v2/core/step_run.py +28 -0
- zenml/models/v2/misc/info_models.py +78 -0
- zenml/new/pipelines/pipeline.py +65 -25
- zenml/new/pipelines/run_utils.py +57 -136
- zenml/new/steps/step_context.py +17 -6
- zenml/orchestrators/base_orchestrator.py +9 -0
- zenml/orchestrators/step_launcher.py +37 -14
- zenml/orchestrators/step_runner.py +14 -13
- zenml/orchestrators/utils.py +107 -7
- zenml/service_connectors/service_connector_utils.py +2 -2
- zenml/stack/utils.py +11 -2
- zenml/stack_deployments/azure_stack_deployment.py +2 -1
- zenml/steps/base_step.py +62 -25
- zenml/steps/utils.py +115 -3
- zenml/utils/cloud_utils.py +8 -8
- zenml/utils/code_utils.py +130 -32
- zenml/utils/function_utils.py +7 -7
- zenml/utils/notebook_utils.py +14 -0
- zenml/utils/pipeline_docker_image_builder.py +1 -11
- zenml/utils/pydantic_utils.py +3 -3
- zenml/utils/secret_utils.py +2 -2
- zenml/utils/source_utils.py +67 -21
- zenml/utils/string_utils.py +29 -0
- zenml/zen_server/dashboard/assets/{404-CRAA_Lew.js → 404-nKxQ4QDX.js} +1 -1
- zenml/zen_server/dashboard/assets/{@radix-BXWm7HOa.js → @radix-DnFH_oo1.js} +1 -1
- zenml/zen_server/dashboard/assets/{@react-router-l3lMcXA2.js → @react-router-APVeuk-U.js} +1 -1
- zenml/zen_server/dashboard/assets/{@reactflow-CeVxyqYT.js → @reactflow-IuMOnBUC.js} +2 -2
- zenml/zen_server/dashboard/assets/{@tanstack-FmcYZMuX.js → @tanstack-QbMbTrh5.js} +1 -1
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-CO2rOw5M.js +1 -0
- zenml/zen_server/dashboard/assets/{CodeSnippet-D0VLxT2A.js → CodeSnippet-i_WEOWw9.js} +1 -1
- zenml/zen_server/dashboard/assets/{CollapsibleCard-BaUPiVg0.js → CollapsibleCard-C9BzoY6q.js} +1 -1
- zenml/zen_server/dashboard/assets/Commands-m9HMl-eh.js +1 -0
- zenml/zen_server/dashboard/assets/{CopyButton-Dbo52T1K.js → CopyButton-BAYaQlWF.js} +1 -1
- zenml/zen_server/dashboard/assets/{CsvVizualization-D3kAypDj.js → CsvVizualization-Bbzv7VEL.js} +5 -5
- zenml/zen_server/dashboard/assets/{edit-C0MVvPD2.js → DialogItem-B576Svvy.js} +1 -1
- zenml/zen_server/dashboard/assets/{DisplayDate-DizbSeT-.js → DisplayDate-DkCy54Bp.js} +1 -1
- zenml/zen_server/dashboard/assets/EditSecretDialog-CmY9fiM0.js +1 -0
- zenml/zen_server/dashboard/assets/{EmptyState-BHblM39I.js → EmptyState-Cs3DEmso.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-C6LeJSER.js → Error-QMgFNDTs.js} +1 -1
- zenml/zen_server/dashboard/assets/{ExecutionStatus-jH4OrWBq.js → ExecutionStatus-BSQgMpzk.js} +1 -1
- zenml/zen_server/dashboard/assets/{Helpbox-aAB2XP-z.js → Helpbox-C96LeSX9.js} +1 -1
- zenml/zen_server/dashboard/assets/{Infobox-BQ0aty32.js → Infobox-BB7dfbrO.js} +1 -1
- zenml/zen_server/dashboard/assets/{InlineAvatar-DpTLgM3Q.js → InlineAvatar-C2ZECnGP.js} +1 -1
- zenml/zen_server/dashboard/assets/{Lock-CNyJvf2r.js → Lock-CmIn0szs.js} +1 -1
- zenml/zen_server/dashboard/assets/{MarkdownVisualization-Bajxn0HY.js → MarkdownVisualization-DS05sfBm.js} +1 -1
- zenml/zen_server/dashboard/assets/{NumberBox-BmKE0qnO.js → NumberBox-CrN0_kqI.js} +1 -1
- zenml/zen_server/dashboard/assets/Partials-RDhJ8Ci7.js +1 -0
- zenml/zen_server/dashboard/assets/{PasswordChecker-yGGoJSB-.js → PasswordChecker-DE71J_3F.js} +1 -1
- zenml/zen_server/dashboard/assets/ProviderIcon-wA4qBOv1.js +1 -0
- zenml/zen_server/dashboard/assets/ProviderRadio-DkPE6alG.js +1 -0
- zenml/zen_server/dashboard/assets/SearchField-BPNazO4G.js +1 -0
- zenml/zen_server/dashboard/assets/SetPassword-kA6Bi_Kp.js +1 -0
- zenml/zen_server/dashboard/assets/{Tick-uxv80Q6a.js → Tick-DEACFydX.js} +1 -1
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-oN4G3sKz.js → UpdatePasswordSchemas-BKyR7Eqi.js} +1 -1
- zenml/zen_server/dashboard/assets/UsageReason-DbgUeRkI.js +1 -0
- zenml/zen_server/dashboard/assets/WizardFooter-sUnbJ70r.js +1 -0
- zenml/zen_server/dashboard/assets/{check-circle-1_I207rW.js → check-circle-DOoS4yhF.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-down-BpaF8JqM.js → chevron-down-Cwb-W_B_.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-right-double-Dk8e2L99.js → chevron-right-double-c9H46Kl8.js} +1 -1
- zenml/zen_server/dashboard/assets/{cloud-only-BkUuI0lZ.js → cloud-only-DrdxC8NV.js} +1 -1
- zenml/zen_server/dashboard/assets/code-browser-BJYErIjr.js +1 -0
- zenml/zen_server/dashboard/assets/{copy-f3XGPPxt.js → copy-CaGlDsUy.js} +1 -1
- zenml/zen_server/dashboard/assets/create-stack-u6VyIXZP.js +1 -0
- zenml/zen_server/dashboard/assets/{docker-8uj__HHK.js → docker-BFAFXr2_.js} +1 -1
- zenml/zen_server/dashboard/assets/{dots-horizontal-sKQlWEni.js → dots-horizontal-C6K59vUm.js} +1 -1
- zenml/zen_server/dashboard/assets/flyte-Cj-xy_8I.svg +10 -0
- zenml/zen_server/dashboard/assets/form-schemas-DD4OppNK.js +1 -0
- zenml/zen_server/dashboard/assets/gcp-Dj6ntk0L.js +1 -0
- zenml/zen_server/dashboard/assets/{help-FuHlZwn0.js → help-CwN931fX.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-Bd1xgUQG.js → index-5GJ5ysEZ.js} +1 -1
- zenml/zen_server/dashboard/assets/index-CnqMjIZT.js +1 -0
- zenml/zen_server/dashboard/assets/index-CsIuf3i6.css +1 -0
- zenml/zen_server/dashboard/assets/index-Davdjm1d.js +55 -0
- zenml/zen_server/dashboard/assets/{index.esm-DT4uyn2i.js → index.esm-BE1uqCX5.js} +1 -1
- zenml/zen_server/dashboard/assets/kubernetes-BjbR6D-1.js +1 -0
- zenml/zen_server/dashboard/assets/{layout-D6oiSbfd.js → layout-Dru15_XR.js} +1 -1
- zenml/zen_server/dashboard/assets/{login-mutation-13A_JSVA.js → login-mutation-TIWnZoJ7.js} +1 -1
- zenml/zen_server/dashboard/assets/{logs-CgeE2vZP.js → logs-GiDJXbLS.js} +1 -1
- zenml/zen_server/dashboard/assets/metaflow-weOkWNyT.svg +10 -0
- zenml/zen_server/dashboard/assets/{not-found-B0Mmb90p.js → not-found-C_bW_Kkr.js} +1 -1
- zenml/zen_server/dashboard/assets/{package-DdkziX79.js → package-DYKZ5jKW.js} +1 -1
- zenml/zen_server/dashboard/assets/page-0eecLRNs.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DugsjcQ_.js → page-BN7n3Dsp.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-OFKSPyN7.js → page-BPFkP_IB.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BSkbj719.js +1 -0
- zenml/zen_server/dashboard/assets/{page-YiF_fNbe.js → page-Bg5X2mLz.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DSTQnBk-.js → page-BhqIV8mu.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BxPQz4Q8.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DLpOnf7u.js → page-CDG9uQT9.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CCY6yfmu.js → page-CUOBhxxU.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CrjI9mjm.js +1 -0
- zenml/zen_server/dashboard/assets/page-D4J2Oy-I.js +1 -0
- zenml/zen_server/dashboard/assets/{page-TXe1Eo3Z.js → page-D5I0-LSs.js} +1 -1
- zenml/zen_server/dashboard/assets/page-D7bwpJvV.js +1 -0
- zenml/zen_server/dashboard/assets/page-DCnizFO_.js +9 -0
- zenml/zen_server/dashboard/assets/page-DQBv3t8t.js +1 -0
- zenml/zen_server/dashboard/assets/page-DYNlbmas.js +1 -0
- zenml/zen_server/dashboard/assets/{page-Cgn-6v2Y.js → page-DsKroTLH.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DsQOL6ZL.js +1 -0
- zenml/zen_server/dashboard/assets/{page-BGwA9B1M.js → page-Dvr6lpJm.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-hQaiQXfg.js → page-Dy0EbJQD.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DyM2M_wT.js +1 -0
- zenml/zen_server/dashboard/assets/page-HXZtxyWq.js +1 -0
- zenml/zen_server/dashboard/assets/page-OmVfClGH.js +2 -0
- zenml/zen_server/dashboard/assets/{page-RnG-qhv9.js → page-XReFLy-1.js} +1 -1
- zenml/zen_server/dashboard/assets/page-t1VWIy6W.js +1 -0
- zenml/zen_server/dashboard/assets/{page-BkjAUyTA.js → page-wPiJkPp6.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CxQmQqDw.js → page-wQ8_y5mW.js} +1 -1
- zenml/zen_server/dashboard/assets/persist-CnMMI8ls.js +1 -0
- zenml/zen_server/dashboard/assets/{persist-3-5nOJ6m.js → persist-g4uRK-v-.js} +1 -1
- zenml/zen_server/dashboard/assets/{plus-FB9-lEq_.js → plus-Bc8eLSDM.js} +1 -1
- zenml/zen_server/dashboard/assets/{refresh-COb6KYDi.js → refresh-CtPKdk2G.js} +1 -1
- zenml/zen_server/dashboard/assets/rocket-SESCGQXm.js +1 -0
- zenml/zen_server/dashboard/assets/sharedSchema-Dbpe2oAO.js +14 -0
- zenml/zen_server/dashboard/assets/stack-detail-query-fuuoot1D.js +1 -0
- zenml/zen_server/dashboard/assets/{terminal-grtjrIEJ.js → terminal-DRIPb4oF.js} +1 -1
- zenml/zen_server/dashboard/assets/{trash-Cd5CSFqA.js → trash-DUWZWzse.js} +1 -1
- zenml/zen_server/dashboard/assets/{update-server-settings-mutation-B8GB_ubU.js → update-server-settings-mutation-YhoZKgC9.js} +1 -1
- zenml/zen_server/dashboard/assets/{url-hcMJkz8p.js → url-DNHuFfYx.js} +1 -1
- zenml/zen_server/dashboard/assets/{zod-CnykDKJj.js → zod-uFd1wBcd.js} +1 -1
- zenml/zen_server/dashboard/index.html +7 -7
- zenml/zen_server/dashboard_legacy/asset-manifest.json +4 -4
- zenml/zen_server/dashboard_legacy/index.html +1 -1
- zenml/zen_server/dashboard_legacy/{precache-manifest.9c473c96a43298343a7ce1256183123b.js → precache-manifest.123c8e8fafecee40f30294ab26484cf1.js} +4 -4
- zenml/zen_server/dashboard_legacy/service-worker.js +1 -1
- zenml/zen_server/dashboard_legacy/static/js/{main.463c90b9.chunk.js → main.a98a73cf.chunk.js} +2 -2
- zenml/zen_server/dashboard_legacy/static/js/{main.463c90b9.chunk.js.map → main.a98a73cf.chunk.js.map} +1 -1
- zenml/zen_server/deploy/helm/Chart.yaml +1 -1
- zenml/zen_server/deploy/helm/README.md +2 -2
- zenml/zen_server/routers/service_connectors_endpoints.py +2 -4
- zenml/zen_server/routers/workspaces_endpoints.py +20 -66
- zenml/zen_server/secure_headers.py +120 -0
- zenml/zen_server/template_execution/runner_entrypoint_configuration.py +0 -2
- zenml/zen_server/template_execution/utils.py +1 -0
- zenml/zen_server/utils.py +0 -100
- zenml/zen_server/zen_server_api.py +4 -2
- zenml/zen_stores/migrations/versions/0.65.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/bf2120261b5a_add_configured_model_version_id.py +74 -0
- zenml/zen_stores/rest_zen_store.py +4 -21
- zenml/zen_stores/schemas/constants.py +16 -0
- zenml/zen_stores/schemas/model_schemas.py +9 -3
- zenml/zen_stores/schemas/pipeline_run_schemas.py +22 -8
- zenml/zen_stores/schemas/step_run_schemas.py +23 -12
- zenml/zen_stores/sql_zen_store.py +312 -300
- zenml/zen_stores/zen_store_interface.py +0 -16
- {zenml_nightly-0.64.0.dev20240809.dist-info → zenml_nightly-0.65.0.dev20240906.dist-info}/METADATA +9 -11
- {zenml_nightly-0.64.0.dev20240809.dist-info → zenml_nightly-0.65.0.dev20240906.dist-info}/RECORD +242 -214
- zenml/models/v2/misc/full_stack.py +0 -129
- zenml/new/pipelines/model_utils.py +0 -72
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-ErO9aOgK.js +0 -1
- zenml/zen_server/dashboard/assets/AwarenessChannel-CLXo5rKM.js +0 -1
- zenml/zen_server/dashboard/assets/Commands-JrcZK-3j.js +0 -1
- zenml/zen_server/dashboard/assets/EditSecretDialog-Bd7mFLS4.js +0 -1
- zenml/zen_server/dashboard/assets/ProviderRadio-BBqkIuTd.js +0 -1
- zenml/zen_server/dashboard/assets/RadioItem-xLhXoiFV.js +0 -1
- zenml/zen_server/dashboard/assets/SearchField-C9R0mdaX.js +0 -1
- zenml/zen_server/dashboard/assets/SetPassword-52sNxNiO.js +0 -1
- zenml/zen_server/dashboard/assets/SuccessStep-DlkItqYG.js +0 -1
- zenml/zen_server/dashboard/assets/aws-0_3UsPif.js +0 -1
- zenml/zen_server/dashboard/assets/database-cXYNX9tt.js +0 -1
- zenml/zen_server/dashboard/assets/file-text-B9JibxTs.js +0 -1
- zenml/zen_server/dashboard/assets/index-DaGknux4.css +0 -1
- zenml/zen_server/dashboard/assets/index-DhIZtpxB.js +0 -55
- zenml/zen_server/dashboard/assets/page-7-v2OBm-.js +0 -1
- zenml/zen_server/dashboard/assets/page-B3ozwdD1.js +0 -1
- zenml/zen_server/dashboard/assets/page-BnacgBiy.js +0 -1
- zenml/zen_server/dashboard/assets/page-BxF_KMQ3.js +0 -2
- zenml/zen_server/dashboard/assets/page-C4POHC0K.js +0 -1
- zenml/zen_server/dashboard/assets/page-C9kudd44.js +0 -9
- zenml/zen_server/dashboard/assets/page-CA1j3GpJ.js +0 -1
- zenml/zen_server/dashboard/assets/page-CgTe7Bme.js +0 -1
- zenml/zen_server/dashboard/assets/page-D2Goey3H.js +0 -1
- zenml/zen_server/dashboard/assets/page-DTysUGOy.js +0 -1
- zenml/zen_server/dashboard/assets/page-D_EXUFJb.js +0 -1
- zenml/zen_server/dashboard/assets/page-Db15QzsM.js +0 -1
- zenml/zen_server/dashboard/assets/page-T2BtjwPl.js +0 -1
- zenml/zen_server/dashboard/assets/play-circle-XSkLR12B.js +0 -1
- zenml/zen_server/dashboard/assets/sharedSchema-BoYx_B_L.js +0 -14
- zenml/zen_server/dashboard/assets/stack-detail-query-B-US_-wa.js +0 -1
- {zenml_nightly-0.64.0.dev20240809.dist-info → zenml_nightly-0.65.0.dev20240906.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.64.0.dev20240809.dist-info → zenml_nightly-0.65.0.dev20240906.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.64.0.dev20240809.dist-info → zenml_nightly-0.65.0.dev20240906.dist-info}/entry_points.txt +0 -0
@@ -17,9 +17,8 @@ The Feast integration offers a way to connect to a Feast Feature Store. ZenML
|
|
17
17
|
implements a dedicated stack component that you can access as part of your ZenML
|
18
18
|
steps in the usual ways.
|
19
19
|
"""
|
20
|
-
from typing import List, Type
|
20
|
+
from typing import List, Type, Optional
|
21
21
|
|
22
|
-
from zenml.enums import StackComponentType
|
23
22
|
from zenml.integrations.constants import FEAST
|
24
23
|
from zenml.integrations.integration import Integration
|
25
24
|
from zenml.stack import Flavor
|
@@ -31,10 +30,9 @@ class FeastIntegration(Integration):
|
|
31
30
|
"""Definition of Feast integration for ZenML."""
|
32
31
|
|
33
32
|
NAME = FEAST
|
34
|
-
# click is added to keep the feast click version
|
35
|
-
# in sync with ZenML's click
|
33
|
+
# click is added to keep the feast click version in sync with ZenML's click
|
36
34
|
REQUIREMENTS = ["feast<=0.37.1", "click>=8.0.1,<8.1.4"]
|
37
|
-
REQUIREMENTS_IGNORED_ON_UNINSTALL = ["click"]
|
35
|
+
REQUIREMENTS_IGNORED_ON_UNINSTALL = ["click", "pandas"]
|
38
36
|
|
39
37
|
@classmethod
|
40
38
|
def flavors(cls) -> List[Type[Flavor]]:
|
@@ -47,5 +45,20 @@ class FeastIntegration(Integration):
|
|
47
45
|
|
48
46
|
return [FeastFeatureStoreFlavor]
|
49
47
|
|
48
|
+
@classmethod
|
49
|
+
def get_requirements(cls, target_os: Optional[str] = None) -> List[str]:
|
50
|
+
"""Method to get the requirements for the integration.
|
51
|
+
|
52
|
+
Args:
|
53
|
+
target_os: The target operating system to get the requirements for.
|
54
|
+
|
55
|
+
Returns:
|
56
|
+
A list of requirements.
|
57
|
+
"""
|
58
|
+
from zenml.integrations.pandas import PandasIntegration
|
59
|
+
|
60
|
+
return cls.REQUIREMENTS + \
|
61
|
+
PandasIntegration.get_requirements(target_os=target_os)
|
62
|
+
|
50
63
|
|
51
64
|
FeastIntegration.check_installation()
|
@@ -55,8 +55,8 @@ class GcpIntegration(Integration):
|
|
55
55
|
]
|
56
56
|
REQUIREMENTS_IGNORED_ON_UNINSTALL = ["kubernetes","kfp"]
|
57
57
|
|
58
|
-
@
|
59
|
-
def activate() -> None:
|
58
|
+
@classmethod
|
59
|
+
def activate(cls) -> None:
|
60
60
|
"""Activate the GCP integration."""
|
61
61
|
from zenml.integrations.gcp import service_connectors # noqa
|
62
62
|
|
@@ -162,6 +162,15 @@ class VertexOrchestratorConfig(
|
|
162
162
|
"""
|
163
163
|
return self.synchronous
|
164
164
|
|
165
|
+
@property
|
166
|
+
def is_schedulable(self) -> bool:
|
167
|
+
"""Whether the orchestrator is schedulable or not.
|
168
|
+
|
169
|
+
Returns:
|
170
|
+
Whether the orchestrator is schedulable or not.
|
171
|
+
"""
|
172
|
+
return True
|
173
|
+
|
165
174
|
|
166
175
|
class VertexOrchestratorFlavor(BaseOrchestratorFlavor):
|
167
176
|
"""Vertex Orchestrator flavor."""
|
@@ -32,7 +32,16 @@
|
|
32
32
|
import os
|
33
33
|
import re
|
34
34
|
import types
|
35
|
-
from typing import
|
35
|
+
from typing import (
|
36
|
+
TYPE_CHECKING,
|
37
|
+
Any,
|
38
|
+
Dict,
|
39
|
+
List,
|
40
|
+
Optional,
|
41
|
+
Tuple,
|
42
|
+
Type,
|
43
|
+
cast,
|
44
|
+
)
|
36
45
|
from uuid import UUID
|
37
46
|
|
38
47
|
from google.api_core import exceptions as google_exceptions
|
@@ -17,9 +17,8 @@ The Great Expectations integration enables you to use Great Expectations as a
|
|
17
17
|
way of profiling and validating your data.
|
18
18
|
"""
|
19
19
|
|
20
|
-
from typing import List, Type
|
20
|
+
from typing import List, Type, Optional
|
21
21
|
|
22
|
-
from zenml.enums import StackComponentType
|
23
22
|
from zenml.integrations.constants import GREAT_EXPECTATIONS
|
24
23
|
from zenml.integrations.integration import Integration
|
25
24
|
from zenml.stack import Flavor
|
@@ -31,12 +30,12 @@ class GreatExpectationsIntegration(Integration):
|
|
31
30
|
"""Definition of Great Expectations integration for ZenML."""
|
32
31
|
|
33
32
|
NAME = GREAT_EXPECTATIONS
|
34
|
-
REQUIREMENTS = [
|
35
|
-
"great-expectations>=0.17.15,<1.0",
|
36
|
-
]
|
33
|
+
REQUIREMENTS = ["great-expectations>=0.17.15,<1.0"]
|
37
34
|
|
38
|
-
|
39
|
-
|
35
|
+
REQUIREMENTS_IGNORED_ON_UNINSTALL = ["pandas"]
|
36
|
+
|
37
|
+
@classmethod
|
38
|
+
def activate(cls) -> None:
|
40
39
|
"""Activate the Great Expectations integration."""
|
41
40
|
from zenml.integrations.great_expectations import materializers # noqa
|
42
41
|
|
@@ -53,5 +52,20 @@ class GreatExpectationsIntegration(Integration):
|
|
53
52
|
|
54
53
|
return [GreatExpectationsDataValidatorFlavor]
|
55
54
|
|
55
|
+
@classmethod
|
56
|
+
def get_requirements(cls, target_os: Optional[str] = None) -> List[str]:
|
57
|
+
"""Method to get the requirements for the integration.
|
58
|
+
|
59
|
+
Args:
|
60
|
+
target_os: The target operating system to get the requirements for.
|
61
|
+
|
62
|
+
Returns:
|
63
|
+
A list of requirements.
|
64
|
+
"""
|
65
|
+
from zenml.integrations.pandas import PandasIntegration
|
66
|
+
|
67
|
+
return cls.REQUIREMENTS + \
|
68
|
+
PandasIntegration.get_requirements(target_os=target_os)
|
69
|
+
|
56
70
|
|
57
71
|
GreatExpectationsIntegration.check_installation()
|
@@ -12,7 +12,8 @@
|
|
12
12
|
# or implied. See the License for the specific language governing
|
13
13
|
# permissions and limitations under the License.
|
14
14
|
"""Initialization of the Huggingface integration."""
|
15
|
-
|
15
|
+
import sys
|
16
|
+
from typing import List, Type, Optional
|
16
17
|
|
17
18
|
from zenml.integrations.constants import HUGGINGFACE
|
18
19
|
from zenml.integrations.integration import Integration
|
@@ -26,20 +27,8 @@ class HuggingfaceIntegration(Integration):
|
|
26
27
|
"""Definition of Huggingface integration for ZenML."""
|
27
28
|
|
28
29
|
NAME = HUGGINGFACE
|
29
|
-
|
30
|
-
|
31
|
-
"datasets",
|
32
|
-
"huggingface_hub>0.19.0",
|
33
|
-
"accelerate",
|
34
|
-
"bitsandbytes>=0.41.3",
|
35
|
-
"peft",
|
36
|
-
# temporary fix for CI issue similar to:
|
37
|
-
# - https://github.com/huggingface/datasets/issues/6737
|
38
|
-
# - https://github.com/huggingface/datasets/issues/6697
|
39
|
-
# TODO try relaxing it back going forward
|
40
|
-
"fsspec<=2023.12.0",
|
41
|
-
]
|
42
|
-
REQUIREMENTS_IGNORED_ON_UNINSTALL = ["fsspec"]
|
30
|
+
|
31
|
+
REQUIREMENTS_IGNORED_ON_UNINSTALL = ["fsspec", "pandas"]
|
43
32
|
|
44
33
|
@classmethod
|
45
34
|
def activate(cls) -> None:
|
@@ -47,6 +36,41 @@ class HuggingfaceIntegration(Integration):
|
|
47
36
|
from zenml.integrations.huggingface import materializers # noqa
|
48
37
|
from zenml.integrations.huggingface import services
|
49
38
|
|
39
|
+
@classmethod
|
40
|
+
def get_requirements(cls, target_os: Optional[str] = None) -> List[str]:
|
41
|
+
"""Defines platform specific requirements for the integration.
|
42
|
+
|
43
|
+
Args:
|
44
|
+
target_os: The target operating system.
|
45
|
+
|
46
|
+
Returns:
|
47
|
+
A list of requirements.
|
48
|
+
"""
|
49
|
+
requirements = [
|
50
|
+
"datasets",
|
51
|
+
"huggingface_hub>0.19.0",
|
52
|
+
"accelerate",
|
53
|
+
"bitsandbytes>=0.41.3",
|
54
|
+
"peft",
|
55
|
+
# temporary fix for CI issue similar to:
|
56
|
+
# - https://github.com/huggingface/datasets/issues/6737
|
57
|
+
# - https://github.com/huggingface/datasets/issues/6697
|
58
|
+
# TODO try relaxing it back going forward
|
59
|
+
"fsspec<=2023.12.0",
|
60
|
+
]
|
61
|
+
|
62
|
+
# In python 3.8 higher transformers version lead to other packages breaking
|
63
|
+
if sys.version_info.minor > 8:
|
64
|
+
requirements += ["transformers"]
|
65
|
+
else:
|
66
|
+
requirements += ["transformers<=4.31"]
|
67
|
+
|
68
|
+
# Add the pandas integration requirements
|
69
|
+
from zenml.integrations.pandas import PandasIntegration
|
70
|
+
|
71
|
+
return requirements + \
|
72
|
+
PandasIntegration.get_requirements(target_os=target_os)
|
73
|
+
|
50
74
|
@classmethod
|
51
75
|
def flavors(cls) -> List[Type[Flavor]]:
|
52
76
|
"""Declare the stack component flavors for the Huggingface integration.
|
@@ -25,3 +25,6 @@ from zenml.integrations.huggingface.materializers.huggingface_tf_model_materiali
|
|
25
25
|
from zenml.integrations.huggingface.materializers.huggingface_tokenizer_materializer import (
|
26
26
|
HFTokenizerMaterializer,
|
27
27
|
)
|
28
|
+
from zenml.integrations.huggingface.materializers.huggingface_t5_materializer import (
|
29
|
+
HFT5Materializer,
|
30
|
+
)
|
@@ -31,9 +31,11 @@ from datasets import Dataset, load_from_disk
|
|
31
31
|
from datasets.dataset_dict import DatasetDict
|
32
32
|
|
33
33
|
from zenml.enums import ArtifactType, VisualizationType
|
34
|
+
from zenml.integrations.pandas.materializers.pandas_materializer import (
|
35
|
+
PandasMaterializer,
|
36
|
+
)
|
34
37
|
from zenml.io import fileio
|
35
38
|
from zenml.materializers.base_materializer import BaseMaterializer
|
36
|
-
from zenml.materializers.pandas_materializer import PandasMaterializer
|
37
39
|
from zenml.utils import io_utils
|
38
40
|
|
39
41
|
if TYPE_CHECKING:
|
@@ -0,0 +1,107 @@
|
|
1
|
+
# Copyright (c) ZenML GmbH 2024. All Rights Reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at:
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
12
|
+
# or implied. See the License for the specific language governing
|
13
|
+
# permissions and limitations under the License.
|
14
|
+
"""Implementation of the Huggingface t5 materializer."""
|
15
|
+
|
16
|
+
import os
|
17
|
+
import tempfile
|
18
|
+
from typing import Any, ClassVar, Type, Union
|
19
|
+
|
20
|
+
from transformers import (
|
21
|
+
T5ForConditionalGeneration,
|
22
|
+
T5Tokenizer,
|
23
|
+
T5TokenizerFast,
|
24
|
+
)
|
25
|
+
|
26
|
+
from zenml.io import fileio
|
27
|
+
from zenml.materializers.base_materializer import BaseMaterializer
|
28
|
+
|
29
|
+
|
30
|
+
class HFT5Materializer(BaseMaterializer):
|
31
|
+
"""Base class for huggingface t5 models."""
|
32
|
+
|
33
|
+
SKIP_REGISTRATION: ClassVar[bool] = False
|
34
|
+
ASSOCIATED_TYPES = (
|
35
|
+
T5ForConditionalGeneration,
|
36
|
+
T5Tokenizer,
|
37
|
+
T5TokenizerFast,
|
38
|
+
)
|
39
|
+
|
40
|
+
def load(
|
41
|
+
self, data_type: Type[Any]
|
42
|
+
) -> Union[T5ForConditionalGeneration, T5Tokenizer, T5TokenizerFast]:
|
43
|
+
"""Reads a T5ForConditionalGeneration model or T5Tokenizer from a serialized zip file.
|
44
|
+
|
45
|
+
Args:
|
46
|
+
data_type: A T5ForConditionalGeneration or T5Tokenizer type.
|
47
|
+
|
48
|
+
Returns:
|
49
|
+
A T5ForConditionalGeneration or T5Tokenizer object.
|
50
|
+
|
51
|
+
Raises:
|
52
|
+
ValueError: Unsupported data type used
|
53
|
+
"""
|
54
|
+
filepath = self.uri
|
55
|
+
|
56
|
+
with tempfile.TemporaryDirectory(prefix="zenml-temp-") as temp_dir:
|
57
|
+
# Copy files from artifact store to temporary directory
|
58
|
+
for file in fileio.listdir(filepath):
|
59
|
+
src = os.path.join(filepath, file)
|
60
|
+
dst = os.path.join(temp_dir, file)
|
61
|
+
if fileio.isdir(src):
|
62
|
+
fileio.makedirs(dst)
|
63
|
+
for subfile in fileio.listdir(src):
|
64
|
+
subsrc = os.path.join(src, subfile)
|
65
|
+
subdst = os.path.join(dst, subfile)
|
66
|
+
fileio.copy(subsrc, subdst)
|
67
|
+
else:
|
68
|
+
fileio.copy(src, dst)
|
69
|
+
|
70
|
+
# Load the model or tokenizer from the temporary directory
|
71
|
+
if data_type in [
|
72
|
+
T5ForConditionalGeneration,
|
73
|
+
T5Tokenizer,
|
74
|
+
T5TokenizerFast,
|
75
|
+
]:
|
76
|
+
return data_type.from_pretrained(temp_dir)
|
77
|
+
else:
|
78
|
+
raise ValueError(f"Unsupported data type: {data_type}")
|
79
|
+
|
80
|
+
def save(
|
81
|
+
self,
|
82
|
+
obj: Union[T5ForConditionalGeneration, T5Tokenizer, T5TokenizerFast],
|
83
|
+
) -> None:
|
84
|
+
"""Creates a serialization for a T5ForConditionalGeneration model or T5Tokenizer.
|
85
|
+
|
86
|
+
Args:
|
87
|
+
obj: A T5ForConditionalGeneration model or T5Tokenizer.
|
88
|
+
"""
|
89
|
+
# Create a temporary directory
|
90
|
+
with tempfile.TemporaryDirectory(prefix="zenml-temp-") as temp_dir:
|
91
|
+
# Save the model or tokenizer
|
92
|
+
obj.save_pretrained(temp_dir)
|
93
|
+
|
94
|
+
# Copy the directory to the artifact store
|
95
|
+
filepath = self.uri
|
96
|
+
fileio.makedirs(filepath)
|
97
|
+
for file in os.listdir(temp_dir):
|
98
|
+
src = os.path.join(temp_dir, file)
|
99
|
+
dst = os.path.join(filepath, file)
|
100
|
+
if os.path.isdir(src):
|
101
|
+
fileio.makedirs(dst)
|
102
|
+
for subfile in os.listdir(src):
|
103
|
+
subsrc = os.path.join(src, subfile)
|
104
|
+
subdst = os.path.join(dst, subfile)
|
105
|
+
fileio.copy(subsrc, subdst)
|
106
|
+
else:
|
107
|
+
fileio.copy(src, dst)
|
@@ -17,8 +17,8 @@ import os
|
|
17
17
|
from tempfile import TemporaryDirectory
|
18
18
|
from typing import Any, ClassVar, Tuple, Type
|
19
19
|
|
20
|
-
from transformers import AutoTokenizer
|
21
|
-
from transformers.tokenization_utils_base import (
|
20
|
+
from transformers import AutoTokenizer
|
21
|
+
from transformers.tokenization_utils_base import (
|
22
22
|
PreTrainedTokenizerBase,
|
23
23
|
)
|
24
24
|
|
@@ -17,14 +17,15 @@
|
|
17
17
|
"""Step function to run any ZenML step using Accelerate."""
|
18
18
|
|
19
19
|
import functools
|
20
|
-
from typing import Any, Callable, Optional, TypeVar, cast
|
20
|
+
from typing import Any, Callable, Dict, Optional, TypeVar, Union, cast
|
21
21
|
|
22
22
|
import cloudpickle as pickle
|
23
|
-
from accelerate.commands.launch import (
|
23
|
+
from accelerate.commands.launch import (
|
24
24
|
launch_command,
|
25
25
|
launch_command_parser,
|
26
26
|
)
|
27
27
|
|
28
|
+
from zenml import get_pipeline_context
|
28
29
|
from zenml.logger import get_logger
|
29
30
|
from zenml.steps import BaseStep
|
30
31
|
from zenml.utils.function_utils import _cli_arg_name, create_cli_wrapped_script
|
@@ -34,10 +35,9 @@ F = TypeVar("F", bound=Callable[..., Any])
|
|
34
35
|
|
35
36
|
|
36
37
|
def run_with_accelerate(
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
) -> BaseStep:
|
38
|
+
step_function_top_level: Optional[BaseStep] = None,
|
39
|
+
**accelerate_launch_kwargs: Any,
|
40
|
+
) -> Union[Callable[[BaseStep], BaseStep], BaseStep]:
|
41
41
|
"""Run a function with accelerate.
|
42
42
|
|
43
43
|
Accelerate package: https://huggingface.co/docs/accelerate/en/index
|
@@ -45,6 +45,8 @@ def run_with_accelerate(
|
|
45
45
|
```python
|
46
46
|
from zenml import step, pipeline
|
47
47
|
from zenml.integrations.hugginface.steps import run_with_accelerate
|
48
|
+
|
49
|
+
@run_with_accelerate(num_processes=4, multi_gpu=True)
|
48
50
|
@step
|
49
51
|
def training_step(some_param: int, ...):
|
50
52
|
# your training code is below
|
@@ -52,92 +54,113 @@ def run_with_accelerate(
|
|
52
54
|
|
53
55
|
@pipeline
|
54
56
|
def training_pipeline(some_param: int, ...):
|
55
|
-
|
57
|
+
training_step(some_param, ...)
|
56
58
|
```
|
57
59
|
|
58
60
|
Args:
|
59
|
-
|
60
|
-
|
61
|
-
|
61
|
+
step_function_top_level: The step function to run with accelerate [optional].
|
62
|
+
Used in functional calls like `run_with_accelerate(some_func,foo=bar)()`.
|
63
|
+
accelerate_launch_kwargs: A dictionary of arguments to pass along to the
|
64
|
+
`accelerate launch` command, including hardware selection, resource
|
65
|
+
allocation, and training paradigm options. Visit
|
66
|
+
https://huggingface.co/docs/accelerate/en/package_reference/cli#accelerate-launch
|
67
|
+
for more details.
|
62
68
|
|
63
69
|
Returns:
|
64
70
|
The accelerate-enabled version of the step.
|
65
71
|
"""
|
66
72
|
|
67
|
-
def _decorator(
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
import torch
|
77
|
-
|
78
|
-
logger.info("Starting accelerate job...")
|
79
|
-
|
80
|
-
device_count = torch.cuda.device_count()
|
81
|
-
if num_processes is None:
|
82
|
-
_num_processes = device_count
|
83
|
-
else:
|
84
|
-
if num_processes > device_count:
|
85
|
-
logger.warning(
|
86
|
-
f"Number of processes ({num_processes}) is greater than "
|
87
|
-
f"the number of available GPUs ({device_count}). Using all GPUs."
|
88
|
-
)
|
89
|
-
_num_processes = device_count
|
90
|
-
else:
|
91
|
-
_num_processes = num_processes
|
92
|
-
else:
|
93
|
-
_num_processes = num_processes or 1
|
94
|
-
|
95
|
-
with create_cli_wrapped_script(
|
96
|
-
entrypoint, flavour="accelerate"
|
97
|
-
) as (
|
98
|
-
script_path,
|
99
|
-
output_path,
|
100
|
-
):
|
101
|
-
commands = ["--num_processes", str(_num_processes)]
|
102
|
-
if use_cpu:
|
103
|
-
commands += [
|
104
|
-
"--cpu",
|
105
|
-
"--num_cpu_threads_per_process",
|
106
|
-
"10",
|
107
|
-
]
|
108
|
-
commands.append(str(script_path.absolute()))
|
109
|
-
for k, v in kwargs.items():
|
110
|
-
k = _cli_arg_name(k)
|
111
|
-
if isinstance(v, bool):
|
112
|
-
if v:
|
113
|
-
commands.append(f"--{k}")
|
114
|
-
elif type(v) in (list, tuple, set):
|
115
|
-
for each in v:
|
116
|
-
commands += [f"--{k}", f"{each}"]
|
117
|
-
else:
|
118
|
-
commands += [f"--{k}", f"{v}"]
|
119
|
-
|
120
|
-
logger.debug(commands)
|
121
|
-
|
122
|
-
parser = launch_command_parser()
|
123
|
-
args = parser.parse_args(commands)
|
124
|
-
try:
|
125
|
-
launch_command(args)
|
126
|
-
except Exception as e:
|
127
|
-
logger.error(
|
128
|
-
"Accelerate training job failed... See error message for details."
|
73
|
+
def _decorator(step_function: BaseStep) -> BaseStep:
|
74
|
+
def _wrapper(
|
75
|
+
entrypoint: F, accelerate_launch_kwargs: Dict[str, Any]
|
76
|
+
) -> F:
|
77
|
+
@functools.wraps(entrypoint)
|
78
|
+
def inner(*args: Any, **kwargs: Any) -> Any:
|
79
|
+
if args:
|
80
|
+
raise ValueError(
|
81
|
+
"Accelerated steps do not support positional arguments."
|
129
82
|
)
|
130
|
-
raise RuntimeError(
|
131
|
-
"Accelerate training job failed."
|
132
|
-
) from e
|
133
|
-
else:
|
134
|
-
logger.info(
|
135
|
-
"Accelerate training job finished successfully."
|
136
|
-
)
|
137
|
-
return pickle.load(open(output_path, "rb"))
|
138
|
-
|
139
|
-
return cast(F, inner)
|
140
|
-
|
141
|
-
setattr(step_function, "entrypoint", _decorator(step_function.entrypoint))
|
142
83
|
|
143
|
-
|
84
|
+
with create_cli_wrapped_script(
|
85
|
+
entrypoint, flavor="accelerate"
|
86
|
+
) as (
|
87
|
+
script_path,
|
88
|
+
output_path,
|
89
|
+
):
|
90
|
+
commands = [str(script_path.absolute())]
|
91
|
+
for k, v in kwargs.items():
|
92
|
+
k = _cli_arg_name(k)
|
93
|
+
if isinstance(v, bool):
|
94
|
+
if v:
|
95
|
+
commands.append(f"--{k}")
|
96
|
+
elif type(v) in (list, tuple, set):
|
97
|
+
for each in v:
|
98
|
+
commands += [f"--{k}", f"{each}"]
|
99
|
+
else:
|
100
|
+
commands += [f"--{k}", f"{v}"]
|
101
|
+
logger.debug(commands)
|
102
|
+
|
103
|
+
parser = launch_command_parser()
|
104
|
+
args = parser.parse_args(commands)
|
105
|
+
for k, v in accelerate_launch_kwargs.items():
|
106
|
+
if k in args:
|
107
|
+
setattr(args, k, v)
|
108
|
+
else:
|
109
|
+
logger.warning(
|
110
|
+
f"You passed in `{k}` as an `accelerate launch` argument, but it was not accepted. "
|
111
|
+
"Please check https://huggingface.co/docs/accelerate/en/package_reference/cli#accelerate-launch "
|
112
|
+
"to find out more about supported arguments and retry."
|
113
|
+
)
|
114
|
+
try:
|
115
|
+
launch_command(args)
|
116
|
+
except Exception as e:
|
117
|
+
logger.error(
|
118
|
+
"Accelerate training job failed... See error message for details."
|
119
|
+
)
|
120
|
+
raise RuntimeError(
|
121
|
+
"Accelerate training job failed."
|
122
|
+
) from e
|
123
|
+
else:
|
124
|
+
logger.info(
|
125
|
+
"Accelerate training job finished successfully."
|
126
|
+
)
|
127
|
+
return pickle.load(open(output_path, "rb"))
|
128
|
+
|
129
|
+
return cast(F, inner)
|
130
|
+
|
131
|
+
try:
|
132
|
+
get_pipeline_context()
|
133
|
+
except RuntimeError:
|
134
|
+
pass
|
135
|
+
else:
|
136
|
+
raise RuntimeError(
|
137
|
+
f"`{run_with_accelerate.__name__}` decorator cannot be used "
|
138
|
+
"in a functional way with steps, please apply decoration "
|
139
|
+
"directly to a step instead. This behavior will be also "
|
140
|
+
"allowed in future, but now it faces technical limitations.\n"
|
141
|
+
"Example (allowed):\n"
|
142
|
+
f"@{run_with_accelerate.__name__}(...)\n"
|
143
|
+
f"def {step_function.name}(...):\n"
|
144
|
+
" ...\n"
|
145
|
+
"Example (not allowed):\n"
|
146
|
+
"def my_pipeline(...):\n"
|
147
|
+
f" run_with_accelerate({step_function.name},...)(...)\n"
|
148
|
+
)
|
149
|
+
|
150
|
+
setattr(
|
151
|
+
step_function, "unwrapped_entrypoint", step_function.entrypoint
|
152
|
+
)
|
153
|
+
setattr(
|
154
|
+
step_function,
|
155
|
+
"entrypoint",
|
156
|
+
_wrapper(
|
157
|
+
step_function.entrypoint,
|
158
|
+
accelerate_launch_kwargs=accelerate_launch_kwargs,
|
159
|
+
),
|
160
|
+
)
|
161
|
+
|
162
|
+
return step_function
|
163
|
+
|
164
|
+
if step_function_top_level:
|
165
|
+
return _decorator(step_function_top_level)
|
166
|
+
return _decorator
|
@@ -81,6 +81,15 @@ class HyperAIOrchestratorConfig(
|
|
81
81
|
"""
|
82
82
|
return True
|
83
83
|
|
84
|
+
@property
|
85
|
+
def is_schedulable(self) -> bool:
|
86
|
+
"""Whether the orchestrator is schedulable or not.
|
87
|
+
|
88
|
+
Returns:
|
89
|
+
Whether the orchestrator is schedulable or not.
|
90
|
+
"""
|
91
|
+
return True
|
92
|
+
|
84
93
|
|
85
94
|
class HyperAIOrchestratorFlavor(BaseOrchestratorFlavor):
|
86
95
|
"""Flavor for the HyperAI orchestrator."""
|
@@ -213,6 +213,15 @@ class KubeflowOrchestratorConfig(
|
|
213
213
|
"""
|
214
214
|
return self.synchronous
|
215
215
|
|
216
|
+
@property
|
217
|
+
def is_schedulable(self) -> bool:
|
218
|
+
"""Whether the orchestrator is schedulable or not.
|
219
|
+
|
220
|
+
Returns:
|
221
|
+
Whether the orchestrator is schedulable or not.
|
222
|
+
"""
|
223
|
+
return True
|
224
|
+
|
216
225
|
|
217
226
|
class KubeflowOrchestratorFlavor(BaseOrchestratorFlavor):
|
218
227
|
"""Kubeflow orchestrator flavor."""
|
@@ -32,7 +32,16 @@
|
|
32
32
|
|
33
33
|
import os
|
34
34
|
import types
|
35
|
-
from typing import
|
35
|
+
from typing import (
|
36
|
+
TYPE_CHECKING,
|
37
|
+
Any,
|
38
|
+
Dict,
|
39
|
+
List,
|
40
|
+
Optional,
|
41
|
+
Tuple,
|
42
|
+
Type,
|
43
|
+
cast,
|
44
|
+
)
|
36
45
|
from uuid import UUID
|
37
46
|
|
38
47
|
import kfp
|
@@ -125,6 +125,15 @@ class KubernetesOrchestratorConfig(
|
|
125
125
|
"""
|
126
126
|
return self.synchronous
|
127
127
|
|
128
|
+
@property
|
129
|
+
def is_schedulable(self) -> bool:
|
130
|
+
"""Whether the orchestrator is schedulable or not.
|
131
|
+
|
132
|
+
Returns:
|
133
|
+
Whether the orchestrator is schedulable or not.
|
134
|
+
"""
|
135
|
+
return True
|
136
|
+
|
128
137
|
|
129
138
|
class KubernetesOrchestratorFlavor(BaseOrchestratorFlavor):
|
130
139
|
"""Kubernetes orchestrator flavor."""
|