zenml-nightly 0.58.0.dev20240529__py3-none-any.whl → 0.58.1.dev20240608__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.
- CONTRIBUTING.md +1 -1
- README.md +3 -3
- RELEASE_NOTES.md +37 -1
- zenml/VERSION +1 -1
- zenml/artifacts/utils.py +19 -3
- zenml/cli/__init__.py +28 -22
- zenml/cli/base.py +17 -6
- zenml/cli/pipeline.py +18 -3
- zenml/cli/server.py +1 -1
- zenml/cli/stack.py +1 -1
- zenml/client.py +24 -4
- zenml/config/docker_settings.py +3 -0
- zenml/config/global_config.py +1 -1
- zenml/config/secret_reference_mixin.py +1 -1
- zenml/environment.py +1 -1
- zenml/integrations/huggingface/materializers/huggingface_tokenizer_materializer.py +11 -12
- zenml/integrations/kaniko/flavors/kaniko_image_builder_flavor.py +2 -44
- zenml/integrations/kubernetes/flavors/kubernetes_orchestrator_flavor.py +4 -1
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator.py +4 -16
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator_entrypoint.py +2 -1
- zenml/integrations/kubernetes/orchestrators/manifest_utils.py +15 -15
- zenml/integrations/s3/flavors/s3_artifact_store_flavor.py +0 -38
- zenml/integrations/spark/flavors/spark_step_operator_flavor.py +1 -38
- zenml/materializers/base_materializer.py +3 -3
- zenml/materializers/cloudpickle_materializer.py +1 -1
- zenml/orchestrators/base_orchestrator.py +1 -1
- zenml/orchestrators/local_docker/local_docker_orchestrator.py +1 -37
- zenml/orchestrators/step_runner.py +2 -2
- zenml/stack/flavor.py +3 -1
- zenml/stack/stack.py +2 -2
- zenml/stack/stack_component.py +42 -2
- zenml/steps/base_step.py +1 -1
- zenml/steps/entrypoint_function_utils.py +2 -2
- zenml/steps/utils.py +1 -1
- zenml/utils/dashboard_utils.py +1 -1
- zenml/utils/pipeline_docker_image_builder.py +23 -3
- zenml/utils/source_utils.py +32 -7
- zenml/zen_server/auth.py +2 -2
- zenml/zen_server/dashboard/assets/{404-DIgYOHj5.js → 404-D5p6PIdn.js} +1 -1
- zenml/zen_server/dashboard/assets/{@radix-BrEjOMvl.js → @radix-C9DBgJhe.js} +9 -9
- zenml/zen_server/dashboard/assets/@react-router-DYovave8.js +29 -0
- zenml/zen_server/dashboard/assets/@reactflow-C26Olbza.css +1 -0
- zenml/zen_server/dashboard/assets/@reactflow-CegZ5GV3.js +17 -0
- zenml/zen_server/dashboard/assets/@tanstack-CEbkxrhX.js +30 -0
- zenml/zen_server/dashboard/assets/{AwarenessChannel-CqRB1HO9.js → AwarenessChannel-DDpU6zHx.js} +1 -1
- zenml/zen_server/dashboard/assets/{Cards-DuJ8uYGM.js → Cards-wfOUm_Ae.js} +1 -1
- zenml/zen_server/dashboard/assets/CodeSnippet-iinvcx17.js +9 -0
- zenml/zen_server/dashboard/assets/Commands-DGnWeAWF.js +1 -0
- zenml/zen_server/dashboard/assets/{CopyButton-BOFZCr5Z.js → CopyButton-eUfW9370.js} +2 -2
- zenml/zen_server/dashboard/assets/{CsvVizualization-D4QRvdDk.js → CsvVizualization-CoIkmrjr.js} +7 -7
- zenml/zen_server/dashboard/assets/{DisplayDate-BoCi3-Ng.js → DisplayDate-BdguISQF.js} +1 -1
- zenml/zen_server/dashboard/assets/{EmptyState-CPJglRv0.js → EmptyState-BkooiGtL.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-C9i5GdiH.js → Error-CDMUBgpN.js} +1 -1
- zenml/zen_server/dashboard/assets/{Helpbox-CnuWjxcc.js → Helpbox-BV73V0J6.js} +1 -1
- zenml/zen_server/dashboard/assets/Infobox-DG7zmtut.js +1 -0
- zenml/zen_server/dashboard/assets/{InlineAvatar-DE_1-SDN.js → InlineAvatar-BiKh3XC5.js} +1 -1
- zenml/zen_server/dashboard/assets/{MarkdownVisualization-CMOybYJS.js → MarkdownVisualization-DsB2QZiK.js} +1 -1
- zenml/zen_server/dashboard/assets/{PageHeader-D7r1Jb6H.js → PageHeader-D-u0obgg.js} +1 -1
- zenml/zen_server/dashboard/assets/{Pagination-0-Hv-4DJ.js → Pagination-ZYqHJ5gE.js} +1 -1
- zenml/zen_server/dashboard/assets/{PasswordChecker-C2ImqlTr.js → PasswordChecker-DSLBp7Vl.js} +1 -1
- zenml/zen_server/dashboard/assets/{SetPassword-074iDZCm.js → SetPassword-Dq6iUfpW.js} +1 -1
- zenml/zen_server/dashboard/assets/{SuccessStep-DEeKB0Wq.js → SuccessStep-BHhPYxz9.js} +1 -1
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-4be5el9x.js → UpdatePasswordSchemas-4FyPPBY9.js} +1 -1
- zenml/zen_server/dashboard/assets/{aws-BaCucHs5.js → aws-t0gKCj_R.js} +1 -1
- zenml/zen_server/dashboard/assets/{check-circle-GxOo3117.js → check-circle-BVvhm5dy.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-down-tsuIW52H.js → chevron-down-zcvCWmyP.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-right-double-Dfr12EKG.js → chevron-right-double-CJ50E9Gr.js} +1 -1
- zenml/zen_server/dashboard/assets/{cloud-only-lInATL8-.js → cloud-only-DsILLhXk.js} +1 -1
- zenml/zen_server/dashboard/assets/{copy-B8yRmO5i.js → copy-BRhQz3j-.js} +1 -1
- zenml/zen_server/dashboard/assets/{database-BiV4iNgr.js → database-CRRnyFWh.js} +1 -1
- zenml/zen_server/dashboard/assets/{docker-EYFTGVBw.js → docker-BAonhm6G.js} +1 -1
- zenml/zen_server/dashboard/assets/{file-text-Bp-4kjON.js → file-text-CbVERUON.js} +1 -1
- zenml/zen_server/dashboard/assets/{help-hEyYkC3q.js → help-B8rqCvqn.js} +1 -1
- zenml/zen_server/dashboard/assets/index-BhYPVFKa.js +55 -0
- zenml/zen_server/dashboard/assets/index-CRZ5qzG3.css +1 -0
- zenml/zen_server/dashboard/assets/index.esm-F7nqy9zY.js +1 -0
- zenml/zen_server/dashboard/assets/{login-mutation-BfEeVmSl.js → login-mutation-CDARn8rx.js} +1 -1
- zenml/zen_server/dashboard/assets/{not-found-an_3Z-Ep.js → not-found-D1_I0ubu.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-NlxFzoaz.js → page-7IP7WH5_.js} +1 -1
- zenml/zen_server/dashboard/assets/page-B5Y_HW80.js +1 -0
- zenml/zen_server/dashboard/assets/{page-Ba5l9-eg.js → page-BQT1Zxsp.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BR7WTzLa.js +1 -0
- zenml/zen_server/dashboard/assets/page-BmuIfr11.js +1 -0
- zenml/zen_server/dashboard/assets/{page-C6Xn5o3F.js → page-Bwrw_wb_.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-GXA0bsIT.js → page-ByiUk9rA.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-68OLHx44.js → page-C9lMl0g8.js} +2 -2
- zenml/zen_server/dashboard/assets/{page-NTQrxRsu.js → page-CK0iF8U_.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Cea5XeRB.js → page-CQTaUp7q.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-ZJ5Cy_-x.js → page-Ca8Zw2SO.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-B90yVxNb.js → page-CaDkuI7b.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-C1Jl09zF.js → page-DB_mi8or.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DDY5j-6S.js +1 -0
- zenml/zen_server/dashboard/assets/page-DIz9_5Du.js +2 -0
- zenml/zen_server/dashboard/assets/page-DPrgvGj6.js +9 -0
- zenml/zen_server/dashboard/assets/{page-C0opS_t4.js → page-D_Vj_UH1.js} +1 -1
- zenml/zen_server/dashboard/assets/page-QPP3iIQH.js +1 -0
- zenml/zen_server/dashboard/assets/{page-Bjj9GHVF.js → page-bpP11sGS.js} +1 -1
- zenml/zen_server/dashboard/assets/page-xA0WcjLa.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DVAcOIuw.js → page-zYQJvPVh.js} +1 -1
- zenml/zen_server/dashboard/assets/{play-circle-DsngbHkK.js → play-circle-DK5QMJyp.js} +1 -1
- zenml/zen_server/dashboard/assets/{terminal-Cb3ce-nr.js → terminal-B2ovgWuz.js} +1 -1
- zenml/zen_server/dashboard/assets/{update-server-settings-mutation-CdcOI8-c.js → update-server-settings-mutation-SaWcyAnk.js} +1 -1
- zenml/zen_server/dashboard/assets/{url-DLJUVIKc.js → url-ZKNs861m.js} +1 -1
- zenml/zen_server/dashboard/assets/zod-DrZvVLjd.js +1 -0
- zenml/zen_server/dashboard/index.html +8 -8
- 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.05e51e85bd64770b2708d408a88d7028.js → precache-manifest.8e59f98d08e9c4c7cb3ef9f0bab7093f.js} +4 -4
- zenml/zen_server/dashboard_legacy/service-worker.js +1 -1
- zenml/zen_server/dashboard_legacy/static/js/main.a238a4d2.chunk.js +2 -0
- zenml/zen_server/dashboard_legacy/static/js/main.a238a4d2.chunk.js.map +1 -0
- zenml/zen_server/deploy/helm/Chart.yaml +1 -1
- zenml/zen_server/deploy/helm/README.md +3 -3
- zenml/zen_server/deploy/helm/values.yaml +7 -7
- zenml/zen_server/jwt.py +11 -11
- zenml/zen_server/routers/auth_endpoints.py +17 -0
- zenml/zen_server/routers/steps_endpoints.py +11 -3
- zenml/zen_stores/migrations/versions/0.58.1_release.py +23 -0
- zenml/zen_stores/rest_zen_store.py +17 -1
- {zenml_nightly-0.58.0.dev20240529.dist-info → zenml_nightly-0.58.1.dev20240608.dist-info}/METADATA +4 -3
- {zenml_nightly-0.58.0.dev20240529.dist-info → zenml_nightly-0.58.1.dev20240608.dist-info}/RECORD +124 -123
- zenml/zen_server/dashboard/assets/@react-router-CCpyfPW-.js +0 -29
- zenml/zen_server/dashboard/assets/@reactflow-CF_wPv-n.js +0 -17
- zenml/zen_server/dashboard/assets/@reactflow-lOPj8ZwY.css +0 -1
- zenml/zen_server/dashboard/assets/@tanstack-GFKzItNf.js +0 -30
- zenml/zen_server/dashboard/assets/CodeSnippet-CBFcxTGW.js +0 -9
- zenml/zen_server/dashboard/assets/Commands-BQb0_PAa.js +0 -1
- zenml/zen_server/dashboard/assets/Infobox-DV6YqO5N.js +0 -1
- zenml/zen_server/dashboard/assets/index-D4zsM9tz.css +0 -1
- zenml/zen_server/dashboard/assets/index-DKgtNG83.js +0 -56
- zenml/zen_server/dashboard/assets/index.esm-DNxbrOmx.js +0 -1
- zenml/zen_server/dashboard/assets/page-0AGNIDYi.js +0 -1
- zenml/zen_server/dashboard/assets/page-6Gp_NCQL.js +0 -14
- zenml/zen_server/dashboard/assets/page-BiyORkbM.js +0 -1
- zenml/zen_server/dashboard/assets/page-BnrWbXYJ.js +0 -2
- zenml/zen_server/dashboard/assets/page-CUqLUGbU.js +0 -1
- zenml/zen_server/dashboard/assets/page-CWpGAjSi.js +0 -1
- zenml/zen_server/dashboard/assets/page-DFQa6C6e.js +0 -1
- zenml/zen_server/dashboard/assets/page-Dn87PjPv.js +0 -1
- zenml/zen_server/dashboard/assets/zod-DueGCdzx.js +0 -1
- zenml/zen_server/dashboard_legacy/static/js/main.41d438ec.chunk.js +0 -2
- zenml/zen_server/dashboard_legacy/static/js/main.41d438ec.chunk.js.map +0 -1
- {zenml_nightly-0.58.0.dev20240529.dist-info → zenml_nightly-0.58.1.dev20240608.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.58.0.dev20240529.dist-info → zenml_nightly-0.58.1.dev20240608.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.58.0.dev20240529.dist-info → zenml_nightly-0.58.1.dev20240608.dist-info}/entry_points.txt +0 -0
CONTRIBUTING.md
CHANGED
@@ -250,7 +250,7 @@ for detailed step-by-step instructions.
|
|
250
250
|
[Examples README](examples/README.md)
|
251
251
|
to find out what to do.
|
252
252
|
3. All integrations deserve to be documented. Make sure to pay a visit to the
|
253
|
-
[Component Guide](https://docs.zenml.io/
|
253
|
+
[Component Guide](https://docs.zenml.io/stack-components/component-guide)
|
254
254
|
in the docs and add your implementations.
|
255
255
|
|
256
256
|
## 🆘 Getting Help
|
README.md
CHANGED
@@ -211,7 +211,7 @@ you can make use of a control plane to create ZenML servers, also known as tenan
|
|
211
211
|
These tenants are managed and maintained by ZenML’s dedicated team, alleviating
|
212
212
|
the burden of server management from your end.
|
213
213
|
- **Self-hosted deployment**: Alternatively, you have the flexibility to [deploy
|
214
|
-
ZenML on your own self-hosted environment](https://docs.zenml.io/deploying-zenml
|
214
|
+
ZenML on your own self-hosted environment](https://docs.zenml.io/getting-started/deploying-zenml#deploying-a-zenml-server).
|
215
215
|
This can be achieved through various methods, including using our CLI, Docker,
|
216
216
|
Helm, or HuggingFace Spaces.
|
217
217
|
|
@@ -289,10 +289,10 @@ the Apache License Version 2.0.
|
|
289
289
|
<a href="https://github.com/zenml-io/zenml-projects">Projects Showcase</a>
|
290
290
|
<br />
|
291
291
|
<br />
|
292
|
-
🎉 Version 0.58.
|
292
|
+
🎉 Version 0.58.1 is out. Check out the release notes
|
293
293
|
<a href="https://github.com/zenml-io/zenml/releases">here</a>.
|
294
294
|
<br />
|
295
295
|
🖥️ Download our VS Code Extension <a href="https://marketplace.visualstudio.com/items?itemName=ZenML.zenml-vscode">here</a>.
|
296
296
|
<br />
|
297
297
|
</p>
|
298
|
-
</div>
|
298
|
+
</div>
|
RELEASE_NOTES.md
CHANGED
@@ -1,5 +1,41 @@
|
|
1
1
|
<!-- markdown-link-check-disable -->
|
2
2
|
|
3
|
+
# 0.58.1
|
4
|
+
|
5
|
+
The 0.58.1 release brings a set of minor enhancement and bugfix to the ZenML framework, such as the ability to delete all versions of a pipeline using the Client/CLI, providing greater flexibility and control over pipeline management. Users can now specify Python package installer arguments. Furthermore, a fix has been implemented for the Sentencepiece tokenizer materializer.
|
6
|
+
|
7
|
+
We are also excited to announce the introduction of breadcrumbs to our dashboard to improve your navigation experience. This new feature allows you to easily visualize the path of your Pipelines, Models, and Artifacts, providing clear orientation, quick return to any section with a single click, and effortless navigation.
|
8
|
+
|
9
|
+
We’d like to give a special thanks to @eltociear for their first contribution.
|
10
|
+
|
11
|
+
## Docs re-work
|
12
|
+
|
13
|
+
We reworked the structure of our documentation pages to make it easier to find answers to your practical questions. Please do let us know if you have any feedback on the structure or the new style of the 'How To' section!
|
14
|
+
|
15
|
+
## What's Changed
|
16
|
+
* Add 0.58.0 to migration testing by @avishniakov in https://github.com/zenml-io/zenml/pull/2730
|
17
|
+
* Print step names in color, again by @avishniakov in https://github.com/zenml-io/zenml/pull/2728
|
18
|
+
* Workflow to create JIRA tickets when Github Issues are created by @strickvl in https://github.com/zenml-io/zenml/pull/2724
|
19
|
+
* Allow specifying python package installer args by @schustmi in https://github.com/zenml-io/zenml/pull/2727
|
20
|
+
* Send workflow dispatch event to Cloud Plugins repo on release by @wjayesh in https://github.com/zenml-io/zenml/pull/2633
|
21
|
+
* Fix Nightly Release by @safoinme in https://github.com/zenml-io/zenml/pull/2711
|
22
|
+
* Fix `zenml go` images visibility in notebook by @strickvl in https://github.com/zenml-io/zenml/pull/2742
|
23
|
+
* Handle error when using `zenml info` with missing dependencies by @strickvl in https://github.com/zenml-io/zenml/pull/2725
|
24
|
+
* Add Discord Alerter into TOC by @strickvl in https://github.com/zenml-io/zenml/pull/2735
|
25
|
+
* Allow deleting all versions of a pipeline using the Client/CLI by @schustmi in https://github.com/zenml-io/zenml/pull/2745
|
26
|
+
* Misc fixes by @schustmi in https://github.com/zenml-io/zenml/pull/2732
|
27
|
+
* Move full SQLite DB migration test to slow CI by @strickvl in https://github.com/zenml-io/zenml/pull/2743
|
28
|
+
* Add system flag as default for uv by @schustmi in https://github.com/zenml-io/zenml/pull/2748
|
29
|
+
* Add how-to section & restructure/update documentation by @AlexejPenner in https://github.com/zenml-io/zenml/pull/2705
|
30
|
+
* Fix typo in help text by @eltociear in https://github.com/zenml-io/zenml/pull/2750
|
31
|
+
* Add support for function types in source utils by @schustmi in https://github.com/zenml-io/zenml/pull/2738
|
32
|
+
* Fix Sentencepiece tokenizer materializer by @safoinme in https://github.com/zenml-io/zenml/pull/2751
|
33
|
+
|
34
|
+
## New Contributors
|
35
|
+
* @eltociear made their first contribution in https://github.com/zenml-io/zenml/pull/2750
|
36
|
+
|
37
|
+
**Full Changelog**: https://github.com/zenml-io/zenml/compare/0.58.0...0.58.1
|
38
|
+
|
3
39
|
# 0.58.0
|
4
40
|
|
5
41
|
## New Annotators
|
@@ -1820,7 +1856,7 @@ This is a minor ZenML release that introduces a couple of new features:
|
|
1820
1856
|
|
1821
1857
|
In addition to that, this release also contains a couple of bug fixes and improvements, including:
|
1822
1858
|
|
1823
|
-
* better documentation and fixes for the ZenML [Vertex AI Orchestrator](https://docs.zenml.io/
|
1859
|
+
* better documentation and fixes for the ZenML [Vertex AI Orchestrator](https://docs.zenml.io/stack-components/orchestrators/vertex) and [Vertex AI Step Operator](https://docs.zenml.io/stack-components/step-operators/vertex)
|
1824
1860
|
* adjust Seldon and BentoML Steps and Examples to new pipeline interface
|
1825
1861
|
|
1826
1862
|
## What's Changed
|
zenml/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.58.
|
1
|
+
0.58.1.dev20240608
|
zenml/artifacts/utils.py
CHANGED
@@ -684,7 +684,7 @@ def _load_artifact_store(
|
|
684
684
|
StackComponent.from_model(artifact_store_model),
|
685
685
|
)
|
686
686
|
except ImportError:
|
687
|
-
link = "https://docs.zenml.io/
|
687
|
+
link = "https://docs.zenml.io/stack-components/artifact-stores/custom#enabling-artifact-visualizations-with-custom-artifact-stores"
|
688
688
|
raise NotImplementedError(
|
689
689
|
f"Artifact store '{artifact_store_model.name}' could not be "
|
690
690
|
f"instantiated. This is likely because the artifact store's "
|
@@ -745,6 +745,8 @@ def _load_file_from_artifact_store(
|
|
745
745
|
uri: str,
|
746
746
|
artifact_store: "BaseArtifactStore",
|
747
747
|
mode: str = "rb",
|
748
|
+
offset: int = 0,
|
749
|
+
length: Optional[int] = None,
|
748
750
|
) -> Any:
|
749
751
|
"""Load the given uri from the given artifact store.
|
750
752
|
|
@@ -752,6 +754,8 @@ def _load_file_from_artifact_store(
|
|
752
754
|
uri: The uri of the file to load.
|
753
755
|
artifact_store: The artifact store from which to load the file.
|
754
756
|
mode: The mode in which to open the file.
|
757
|
+
offset: The offset from which to start reading.
|
758
|
+
length: The amount of bytes that should be read.
|
755
759
|
|
756
760
|
Returns:
|
757
761
|
The loaded file.
|
@@ -763,7 +767,19 @@ def _load_file_from_artifact_store(
|
|
763
767
|
"""
|
764
768
|
try:
|
765
769
|
with artifact_store.open(uri, mode) as text_file:
|
766
|
-
|
770
|
+
if offset < 0:
|
771
|
+
# If the offset is negative, we seek backwards from the end of
|
772
|
+
# the file
|
773
|
+
try:
|
774
|
+
text_file.seek(offset, os.SEEK_END)
|
775
|
+
except OSError:
|
776
|
+
# The negative offset was too large for the file, we seek
|
777
|
+
# to the start of the file
|
778
|
+
text_file.seek(0, os.SEEK_SET)
|
779
|
+
elif offset > 0:
|
780
|
+
text_file.seek(offset, os.SEEK_SET)
|
781
|
+
|
782
|
+
return text_file.read(length)
|
767
783
|
except FileNotFoundError:
|
768
784
|
raise DoesNotExistException(
|
769
785
|
f"File '{uri}' does not exist in artifact store "
|
@@ -773,7 +789,7 @@ def _load_file_from_artifact_store(
|
|
773
789
|
raise e
|
774
790
|
except Exception as e:
|
775
791
|
logger.exception(e)
|
776
|
-
link = "https://docs.zenml.io/
|
792
|
+
link = "https://docs.zenml.io/stack-components/artifact-stores/custom#enabling-artifact-visualizations-with-custom-artifact-stores"
|
777
793
|
raise NotImplementedError(
|
778
794
|
f"File '{uri}' could not be loaded because the underlying artifact "
|
779
795
|
f"store '{artifact_store.name}' could not open the file. This is "
|
zenml/cli/__init__.py
CHANGED
@@ -80,7 +80,7 @@ You can also pass in a directory path manually using the
|
|
80
80
|
zenml init --path /path/to/dir
|
81
81
|
```
|
82
82
|
|
83
|
-
If you wish to use one of [the available ZenML project templates](https://docs.zenml.io/
|
83
|
+
If you wish to use one of [the available ZenML project templates](https://docs.zenml.io/how-to/setting-up-a-project-repository/using-project-templates#list-of-zenml-project-templates)
|
84
84
|
to generate a ready-to-use project scaffold in your repository, you can do so by
|
85
85
|
passing the ``--template`` option:
|
86
86
|
|
@@ -232,7 +232,7 @@ and `and` keywords.
|
|
232
232
|
Artifact Stores
|
233
233
|
---------------
|
234
234
|
|
235
|
-
In ZenML, [the artifact store](https://docs.zenml.io/
|
235
|
+
In ZenML, [the artifact store](https://docs.zenml.io/stack-components/artifact-stores)
|
236
236
|
is where all the inputs and outputs of your pipeline steps are stored. By
|
237
237
|
default, ZenML initializes your repository with an artifact store with
|
238
238
|
everything kept on your local machine. You can get a better understanding
|
@@ -327,7 +327,7 @@ zenml artifact-store --help
|
|
327
327
|
Orchestrators
|
328
328
|
-------------
|
329
329
|
|
330
|
-
An [orchestrator](https://docs.zenml.io/
|
330
|
+
An [orchestrator](https://docs.zenml.io/stack-components/orchestrators)
|
331
331
|
is a special kind of backend that manages the running of each step of the
|
332
332
|
pipeline. Orchestrators administer the actual pipeline runs. By default,
|
333
333
|
ZenML initializes your repository with an orchestrator that runs everything
|
@@ -423,7 +423,7 @@ zenml orchestrators --help
|
|
423
423
|
Container Registries
|
424
424
|
--------------------
|
425
425
|
|
426
|
-
[The container registry](https://docs.zenml.io/
|
426
|
+
[The container registry](https://docs.zenml.io/stack-components/container-registries)
|
427
427
|
is where all the images that are used by a container-based orchestrator are
|
428
428
|
stored. To get a better understanding regarding container registries, use
|
429
429
|
the command:
|
@@ -518,7 +518,7 @@ zenml container-registry --help
|
|
518
518
|
Data Validators
|
519
519
|
---------------
|
520
520
|
|
521
|
-
In ZenML, [data validators](https://docs.zenml.io/
|
521
|
+
In ZenML, [data validators](https://docs.zenml.io/stack-components/data-validators)
|
522
522
|
help you profile and validate your data.
|
523
523
|
|
524
524
|
By default, a default ZenML local stack will not register a data validator. If
|
@@ -605,7 +605,7 @@ zenml data-validator --help
|
|
605
605
|
Experiment Trackers
|
606
606
|
-------------------
|
607
607
|
|
608
|
-
[Experiment trackers](https://docs.zenml.io/
|
608
|
+
[Experiment trackers](https://docs.zenml.io/stack-components/experiment-trackers)
|
609
609
|
let you track your ML experiments by logging the parameters
|
610
610
|
and allow you to compare between different runs. To get a better
|
611
611
|
understanding regarding experiment trackers, use the command:
|
@@ -701,7 +701,7 @@ zenml experiment-tracker --help
|
|
701
701
|
Model Deployers
|
702
702
|
---------------
|
703
703
|
|
704
|
-
[Model deployers](https://docs.zenml.io/
|
704
|
+
[Model deployers](https://docs.zenml.io/stack-components/model-deployers)
|
705
705
|
are stack components responsible for online model serving. They are responsible
|
706
706
|
for deploying models to a remote server. Model deployers also act as a registry
|
707
707
|
for models that are served with ZenML. To get a better understanding regarding
|
@@ -838,7 +838,7 @@ zenml model-deployer --help
|
|
838
838
|
Step Operators
|
839
839
|
--------------
|
840
840
|
|
841
|
-
[Step operators](https://docs.zenml.io/
|
841
|
+
[Step operators](https://docs.zenml.io/stack-components/step-operators)
|
842
842
|
allow you to run individual steps in a custom environment different from the
|
843
843
|
default one used by your active orchestrator. One example use-case is to run a
|
844
844
|
training step of your pipeline in an environment with GPUs available. To get
|
@@ -933,7 +933,7 @@ zenml step-operator --help
|
|
933
933
|
Alerters
|
934
934
|
--------
|
935
935
|
|
936
|
-
In ZenML, [alerters](https://docs.zenml.io/
|
936
|
+
In ZenML, [alerters](https://docs.zenml.io/stack-components/alerters)
|
937
937
|
allow you to send alerts from within your pipeline.
|
938
938
|
|
939
939
|
By default, a default ZenML local stack will not register an alerter. If
|
@@ -1018,7 +1018,7 @@ zenml alerter --help
|
|
1018
1018
|
Feature Stores
|
1019
1019
|
--------------
|
1020
1020
|
|
1021
|
-
[Feature stores](https://docs.zenml.io/
|
1021
|
+
[Feature stores](https://docs.zenml.io/stack-components/feature-stores)
|
1022
1022
|
allow data teams to serve data via an offline store and an online low-latency
|
1023
1023
|
store where data is kept in sync between the two. To get a better understanding
|
1024
1024
|
regarding feature stores, use the command:
|
@@ -1115,7 +1115,7 @@ zenml feature-store --help
|
|
1115
1115
|
Annotators
|
1116
1116
|
----------
|
1117
1117
|
|
1118
|
-
[Annotators](https://docs.zenml.io/
|
1118
|
+
[Annotators](https://docs.zenml.io/stack-components/annotators)
|
1119
1119
|
enable the use of data annotation as part of your ZenML stack and pipelines.
|
1120
1120
|
|
1121
1121
|
By default, a default ZenML local stack will not register an annotator. If
|
@@ -1207,7 +1207,7 @@ zenml annotator --help
|
|
1207
1207
|
Image Builders
|
1208
1208
|
--------------
|
1209
1209
|
|
1210
|
-
In ZenML, [image builders](https://docs.zenml.io/
|
1210
|
+
In ZenML, [image builders](https://docs.zenml.io/stack-components/image-builders)
|
1211
1211
|
allow you to build container images such
|
1212
1212
|
that your machine-learning pipelines and steps can be executed in remote
|
1213
1213
|
environments.
|
@@ -1296,7 +1296,7 @@ zenml image-builder --help
|
|
1296
1296
|
Model Registries
|
1297
1297
|
----------------
|
1298
1298
|
|
1299
|
-
[Model registries](https://docs.zenml.io/
|
1299
|
+
[Model registries](https://docs.zenml.io/stack-components/model-registries)
|
1300
1300
|
are centralized repositories that facilitate the collaboration and management
|
1301
1301
|
of machine learning models. To get a better understanding regarding model
|
1302
1302
|
registries as a concept, use the command:
|
@@ -1672,8 +1672,14 @@ occasionally want to delete a pipeline, which you can do via:
|
|
1672
1672
|
zenml pipeline delete <PIPELINE_NAME>
|
1673
1673
|
```
|
1674
1674
|
|
1675
|
-
This will delete the pipeline and change all corresponding
|
1676
|
-
become unlisted (not linked to any pipeline).
|
1675
|
+
This will delete the latest pipeline version and change all corresponding
|
1676
|
+
pipeline runs to become unlisted (not linked to any pipeline).
|
1677
|
+
|
1678
|
+
If you want to delete all versions of a pipeline, you can do so as follows:
|
1679
|
+
|
1680
|
+
```bash
|
1681
|
+
zenml pipeline delete <PIPELINE_NAME> --all-versions
|
1682
|
+
```
|
1677
1683
|
|
1678
1684
|
To list all pipeline runs that you have executed, use:
|
1679
1685
|
|
@@ -1828,7 +1834,7 @@ Connecting to a ZenML Server
|
|
1828
1834
|
----------------------------
|
1829
1835
|
|
1830
1836
|
The ZenML client can be [configured to connect to a remote database or ZenML
|
1831
|
-
server](https://docs.zenml.io/
|
1837
|
+
server](https://docs.zenml.io/how-to/connecting-to-zenml)
|
1832
1838
|
with the `zenml connect` command. If no arguments are supplied, ZenML
|
1833
1839
|
will attempt to connect to the last ZenML server deployed from the local host
|
1834
1840
|
using the 'zenml deploy' command:
|
@@ -1980,7 +1986,7 @@ Secrets management
|
|
1980
1986
|
------------------
|
1981
1987
|
|
1982
1988
|
ZenML offers a way to [securely store secrets associated with your other
|
1983
|
-
stack components and infrastructure](https://docs.zenml.io/
|
1989
|
+
stack components and infrastructure](https://docs.zenml.io/getting-started/deploying-zenml/manage-the-deployed-services/secret-management).
|
1984
1990
|
A ZenML Secret is a collection or grouping of key-value pairs stored by the
|
1985
1991
|
ZenML secrets store. ZenML Secrets are identified by a unique name which
|
1986
1992
|
allows you to fetch or reference them in your pipelines and stacks.
|
@@ -2076,7 +2082,7 @@ challenge in configuring uninterrupted, secure access to infrastructure
|
|
2076
2082
|
resources. In ZenML, Service Connectors streamline this process by abstracting
|
2077
2083
|
away the complexity of authentication and help you connect your stack to your
|
2078
2084
|
resources. You can find the full docs on the ZenML service connectors
|
2079
|
-
[here](https://docs.zenml.io/
|
2085
|
+
[here](https://docs.zenml.io/how-to/auth-management).
|
2080
2086
|
|
2081
2087
|
The ZenML CLI features a variety of commands to help you manage your service
|
2082
2088
|
connectors. First of all, to explore all the types of service connectors
|
@@ -2106,7 +2112,7 @@ zenml service-connector register SERVICE_CONNECTOR_NAME \
|
|
2106
2112
|
```
|
2107
2113
|
|
2108
2114
|
For more details on how to create a service connector, please refer to our
|
2109
|
-
[docs](https://docs.zenml.io/
|
2115
|
+
[docs](https://docs.zenml.io/how-to/auth-management).
|
2110
2116
|
|
2111
2117
|
To check if your service connector is registered properly, you can `verify` it.
|
2112
2118
|
By doing this, you can both check if it is configured correctly and also, you
|
@@ -2338,7 +2344,7 @@ zenml code-repository delete <REPOSITORY_NAME_OR_ID>
|
|
2338
2344
|
Building an image without Runs
|
2339
2345
|
------------------------------
|
2340
2346
|
|
2341
|
-
To [build Docker images for your pipeline](https://docs.zenml.io/
|
2347
|
+
To [build Docker images for your pipeline](https://docs.zenml.io/how-to/customize-docker-builds)
|
2342
2348
|
without actually running the pipeline, use:
|
2343
2349
|
|
2344
2350
|
```bash
|
@@ -2385,7 +2391,7 @@ Tagging your resources with ZenML
|
|
2385
2391
|
---------------------------------
|
2386
2392
|
|
2387
2393
|
When you are using ZenML, you can [use tags to organize and categorize your
|
2388
|
-
assets](https://docs.zenml.io/
|
2394
|
+
assets](https://docs.zenml.io/how-to/handle-data-artifacts/tagging).
|
2389
2395
|
This way, you can streamline your workflows and enhance the discoverability of
|
2390
2396
|
your resources more easily.
|
2391
2397
|
|
@@ -2487,7 +2493,7 @@ zenml artifact-store deploy -f gcp -p gcp -r us-east1 -x project_id=zenml-core b
|
|
2487
2493
|
```
|
2488
2494
|
|
2489
2495
|
For full documentation on this functionality, please refer to [the dedicated
|
2490
|
-
documentation on stack component deploy](https://docs.zenml.io/
|
2496
|
+
documentation on stack component deploy](https://docs.zenml.io/how-to/stack-deployment/deploy-a-stack-component).
|
2491
2497
|
|
2492
2498
|
Interacting with the ZenML Hub
|
2493
2499
|
------------------------------
|
zenml/cli/base.py
CHANGED
@@ -79,19 +79,19 @@ class ZenMLProjectTemplateLocation(BaseModel):
|
|
79
79
|
ZENML_PROJECT_TEMPLATES = dict(
|
80
80
|
e2e_batch=ZenMLProjectTemplateLocation(
|
81
81
|
github_url="zenml-io/template-e2e-batch",
|
82
|
-
github_tag="2024.
|
82
|
+
github_tag="2024.06.06", # Make sure it is aligned with .github/workflows/update-templates-to-examples.yml
|
83
83
|
),
|
84
84
|
starter=ZenMLProjectTemplateLocation(
|
85
85
|
github_url="zenml-io/template-starter",
|
86
|
-
github_tag="2024.
|
86
|
+
github_tag="2024.06.06", # Make sure it is aligned with .github/workflows/update-templates-to-examples.yml
|
87
87
|
),
|
88
88
|
nlp=ZenMLProjectTemplateLocation(
|
89
89
|
github_url="zenml-io/template-nlp",
|
90
|
-
github_tag="2024.
|
90
|
+
github_tag="2024.06.06", # Make sure it is aligned with .github/workflows/update-templates-to-examples.yml
|
91
91
|
),
|
92
92
|
llm_finetuning=ZenMLProjectTemplateLocation(
|
93
93
|
github_url="zenml-io/template-llm-finetuning",
|
94
|
-
github_tag="2024.
|
94
|
+
github_tag="2024.06.06", # Make sure it is aligned with .github/workflows/update-templates-to-examples.yml
|
95
95
|
),
|
96
96
|
)
|
97
97
|
|
@@ -492,7 +492,10 @@ def go() -> None:
|
|
492
492
|
input("Press ENTER to continue...")
|
493
493
|
|
494
494
|
try:
|
495
|
-
subprocess.check_call(
|
495
|
+
subprocess.check_call(
|
496
|
+
["jupyter", "notebook", "--ContentsManager.allow_hidden=True"],
|
497
|
+
cwd=zenml_tutorial_path,
|
498
|
+
)
|
496
499
|
except subprocess.CalledProcessError as e:
|
497
500
|
cli_utils.error(
|
498
501
|
"An error occurred while launching Jupyter Notebook. "
|
@@ -653,7 +656,15 @@ def info(
|
|
653
656
|
cli_utils.print_user_info(user_info)
|
654
657
|
|
655
658
|
if stack:
|
656
|
-
|
659
|
+
try:
|
660
|
+
cli_utils.print_debug_stack()
|
661
|
+
except ModuleNotFoundError as e:
|
662
|
+
cli_utils.warning(
|
663
|
+
"Could not print debug stack information. Please make sure "
|
664
|
+
"you have the necessary dependencies and integrations "
|
665
|
+
"installed for all your stack components."
|
666
|
+
)
|
667
|
+
cli_utils.warning(f"The missing package is: '{e.name}'")
|
657
668
|
|
658
669
|
|
659
670
|
@cli.command(
|
zenml/cli/pipeline.py
CHANGED
@@ -327,6 +327,11 @@ def list_pipelines(**kwargs: Any) -> None:
|
|
327
327
|
type=str,
|
328
328
|
required=False,
|
329
329
|
)
|
330
|
+
@click.option(
|
331
|
+
"--all-versions",
|
332
|
+
help="Delete all versions of the pipeline..",
|
333
|
+
is_flag=True,
|
334
|
+
)
|
330
335
|
@click.option(
|
331
336
|
"--yes",
|
332
337
|
"-y",
|
@@ -334,16 +339,24 @@ def list_pipelines(**kwargs: Any) -> None:
|
|
334
339
|
help="Don't ask for confirmation.",
|
335
340
|
)
|
336
341
|
def delete_pipeline(
|
337
|
-
pipeline_name_or_id: str,
|
342
|
+
pipeline_name_or_id: str,
|
343
|
+
version: Optional[str] = None,
|
344
|
+
all_versions: bool = False,
|
345
|
+
yes: bool = False,
|
338
346
|
) -> None:
|
339
347
|
"""Delete a pipeline.
|
340
348
|
|
341
349
|
Args:
|
342
350
|
pipeline_name_or_id: The name or ID of the pipeline to delete.
|
343
351
|
version: The version of the pipeline to delete.
|
352
|
+
all_versions: If set, delete all versions of the pipeline.
|
344
353
|
yes: If set, don't ask for confirmation.
|
345
354
|
"""
|
346
|
-
version_suffix =
|
355
|
+
version_suffix = ""
|
356
|
+
if all_versions:
|
357
|
+
version_suffix = " (all versions)"
|
358
|
+
elif version:
|
359
|
+
version_suffix = f" (version {version})"
|
347
360
|
|
348
361
|
if not yes:
|
349
362
|
confirmation = cli_utils.confirmation(
|
@@ -357,7 +370,9 @@ def delete_pipeline(
|
|
357
370
|
|
358
371
|
try:
|
359
372
|
Client().delete_pipeline(
|
360
|
-
name_id_or_prefix=pipeline_name_or_id,
|
373
|
+
name_id_or_prefix=pipeline_name_or_id,
|
374
|
+
version=version,
|
375
|
+
all_versions=all_versions,
|
361
376
|
)
|
362
377
|
except KeyError as e:
|
363
378
|
cli_utils.error(str(e))
|
zenml/cli/server.py
CHANGED
@@ -737,7 +737,7 @@ def connect(
|
|
737
737
|
"filesystem. You should consider using the web login workflow by "
|
738
738
|
"omitting the `--username` and `--password` flags. An alternative "
|
739
739
|
"for non-interactive environments is to create and use a service "
|
740
|
-
"account API key (see https://docs.zenml.io/
|
740
|
+
"account API key (see https://docs.zenml.io/how-to/connecting-to-zenml/connect-with-a-service-account "
|
741
741
|
"for more information)."
|
742
742
|
)
|
743
743
|
|
zenml/cli/stack.py
CHANGED
@@ -489,7 +489,7 @@ def update_stack(
|
|
489
489
|
"-r",
|
490
490
|
"--model_registry",
|
491
491
|
"model_registry_flag",
|
492
|
-
help="Include this to remove the
|
492
|
+
help="Include this to remove the model registry from this stack.",
|
493
493
|
is_flag=True,
|
494
494
|
required=False,
|
495
495
|
)
|
zenml/client.py
CHANGED
@@ -2415,6 +2415,7 @@ class Client(metaclass=ClientMetaClass):
|
|
2415
2415
|
self,
|
2416
2416
|
name_id_or_prefix: Union[str, UUID],
|
2417
2417
|
version: Optional[str] = None,
|
2418
|
+
all_versions: bool = False,
|
2418
2419
|
) -> None:
|
2419
2420
|
"""Delete a pipeline.
|
2420
2421
|
|
@@ -2422,11 +2423,30 @@ class Client(metaclass=ClientMetaClass):
|
|
2422
2423
|
name_id_or_prefix: The name, ID or ID prefix of the pipeline.
|
2423
2424
|
version: The pipeline version. If left empty, will delete
|
2424
2425
|
the latest version.
|
2426
|
+
all_versions: If `True`, delete all versions of the pipeline.
|
2427
|
+
|
2428
|
+
Raises:
|
2429
|
+
ValueError: If an ID is supplied when trying to delete all versions
|
2430
|
+
of a pipeline.
|
2425
2431
|
"""
|
2426
|
-
|
2427
|
-
name_id_or_prefix
|
2428
|
-
|
2429
|
-
|
2432
|
+
if all_versions:
|
2433
|
+
if is_valid_uuid(name_id_or_prefix):
|
2434
|
+
raise ValueError(
|
2435
|
+
"You need to supply a name (not an ID) when trying to "
|
2436
|
+
"delete all versions of a pipeline."
|
2437
|
+
)
|
2438
|
+
|
2439
|
+
for pipeline in depaginate(
|
2440
|
+
functools.partial(
|
2441
|
+
Client().list_pipelines, name=name_id_or_prefix
|
2442
|
+
)
|
2443
|
+
):
|
2444
|
+
Client().delete_pipeline(pipeline.id)
|
2445
|
+
else:
|
2446
|
+
pipeline = self.get_pipeline(
|
2447
|
+
name_id_or_prefix=name_id_or_prefix, version=version
|
2448
|
+
)
|
2449
|
+
self.zen_store.delete_pipeline(pipeline_id=pipeline.id)
|
2430
2450
|
|
2431
2451
|
# -------------------------------- Builds ----------------------------------
|
2432
2452
|
|
zenml/config/docker_settings.py
CHANGED
@@ -128,6 +128,8 @@ class DockerSettings(BaseSettings):
|
|
128
128
|
therefore **not** include any registry.
|
129
129
|
python_package_installer: The package installer to use for python
|
130
130
|
packages.
|
131
|
+
python_package_installer_args: Arguments to pass to the python package
|
132
|
+
installer.
|
131
133
|
replicate_local_python_environment: If not `None`, ZenML will use the
|
132
134
|
specified method to generate a requirements file that replicates
|
133
135
|
the packages installed in the currently running python environment.
|
@@ -185,6 +187,7 @@ class DockerSettings(BaseSettings):
|
|
185
187
|
python_package_installer: PythonPackageInstaller = (
|
186
188
|
PythonPackageInstaller.PIP
|
187
189
|
)
|
190
|
+
python_package_installer_args: Dict[str, Any] = {}
|
188
191
|
replicate_local_python_environment: Optional[
|
189
192
|
Union[List[str], PythonEnvironmentExportMethod]
|
190
193
|
] = None
|
zenml/config/global_config.py
CHANGED
@@ -260,7 +260,7 @@ class GlobalConfiguration(BaseModel, metaclass=GlobalConfigMetaClass):
|
|
260
260
|
"The ZenML global configuration version (%s) is higher "
|
261
261
|
"than the version of ZenML currently being used (%s). "
|
262
262
|
"Read more about this issue and how to solve it here: "
|
263
|
-
"`https://docs.zenml.io/
|
263
|
+
"`https://docs.zenml.io/reference/global-settings#version-mismatch-downgrading`",
|
264
264
|
config_version,
|
265
265
|
curr_version,
|
266
266
|
)
|
@@ -65,7 +65,7 @@ class SecretReferenceMixin(BaseModel):
|
|
65
65
|
"but future versions of ZenML will require you to pass "
|
66
66
|
"in sensitive information as secrets. Check out the "
|
67
67
|
"documentation on how to configure values with secrets "
|
68
|
-
"here: https://docs.zenml.io/
|
68
|
+
"here: https://docs.zenml.io/getting-started/deploying-zenml/manage-the-deployed-services/secret-management"
|
69
69
|
)
|
70
70
|
continue
|
71
71
|
|
zenml/environment.py
CHANGED
@@ -439,7 +439,7 @@ class Environment(metaclass=SingletonMetaClass):
|
|
439
439
|
"will be removed in a future release. Please use the "
|
440
440
|
" `StepContext` to access information about the current run "
|
441
441
|
"instead, as shown here: "
|
442
|
-
"https://docs.zenml.io/
|
442
|
+
"https://docs.zenml.io/how-to/track-metrics-metadata/fetch-metadata-within-steps"
|
443
443
|
)
|
444
444
|
if name in self._components:
|
445
445
|
return self._components[name]
|
@@ -46,12 +46,11 @@ class HFTokenizerMaterializer(BaseMaterializer):
|
|
46
46
|
Returns:
|
47
47
|
The tokenizer read from the specified dir.
|
48
48
|
"""
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
return AutoTokenizer.from_pretrained(temp_dir.name)
|
49
|
+
with TemporaryDirectory() as temp_dir:
|
50
|
+
io_utils.copy_dir(
|
51
|
+
os.path.join(self.uri, DEFAULT_TOKENIZER_DIR), temp_dir
|
52
|
+
)
|
53
|
+
return AutoTokenizer.from_pretrained(temp_dir)
|
55
54
|
|
56
55
|
def save(self, tokenizer: Type[Any]) -> None:
|
57
56
|
"""Writes a Tokenizer to the specified dir.
|
@@ -59,9 +58,9 @@ class HFTokenizerMaterializer(BaseMaterializer):
|
|
59
58
|
Args:
|
60
59
|
tokenizer: The HFTokenizer to write.
|
61
60
|
"""
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
61
|
+
with TemporaryDirectory() as temp_dir:
|
62
|
+
tokenizer.save_pretrained(temp_dir)
|
63
|
+
io_utils.copy_dir(
|
64
|
+
temp_dir,
|
65
|
+
os.path.join(self.uri, DEFAULT_TOKENIZER_DIR),
|
66
|
+
)
|
@@ -13,10 +13,9 @@
|
|
13
13
|
# permissions and limitations under the License.
|
14
14
|
"""Kaniko image builder flavor."""
|
15
15
|
|
16
|
-
import
|
17
|
-
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Type, Union
|
16
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Type
|
18
17
|
|
19
|
-
from pydantic import PositiveInt
|
18
|
+
from pydantic import PositiveInt
|
20
19
|
|
21
20
|
from zenml.image_builders import BaseImageBuilderConfig, BaseImageBuilderFlavor
|
22
21
|
from zenml.integrations.kaniko import KANIKO_IMAGE_BUILDER_FLAVOR
|
@@ -82,47 +81,6 @@ class KanikoImageBuilderConfig(BaseImageBuilderConfig):
|
|
82
81
|
|
83
82
|
executor_args: List[str] = []
|
84
83
|
|
85
|
-
@validator(
|
86
|
-
"env",
|
87
|
-
"env_from",
|
88
|
-
"volume_mounts",
|
89
|
-
"volumes",
|
90
|
-
"executor_args",
|
91
|
-
pre=True,
|
92
|
-
)
|
93
|
-
def _convert_json_string(
|
94
|
-
cls, value: Union[None, str, List[Any]]
|
95
|
-
) -> Optional[List[Any]]:
|
96
|
-
"""Converts potential JSON strings passed via the CLI to lists.
|
97
|
-
|
98
|
-
Args:
|
99
|
-
value: The value to convert.
|
100
|
-
|
101
|
-
Returns:
|
102
|
-
The converted value.
|
103
|
-
|
104
|
-
Raises:
|
105
|
-
TypeError: If the value is not a `str`, `List` or `None`.
|
106
|
-
ValueError: If the value is an invalid json string or a json string
|
107
|
-
that does not decode into a list.
|
108
|
-
"""
|
109
|
-
if isinstance(value, str):
|
110
|
-
try:
|
111
|
-
list_ = json.loads(value)
|
112
|
-
except json.JSONDecodeError as e:
|
113
|
-
raise ValueError(f"Invalid json string '{value}'") from e
|
114
|
-
|
115
|
-
if not isinstance(list_, List):
|
116
|
-
raise ValueError(
|
117
|
-
f"Json string '{value}' did not decode into a list."
|
118
|
-
)
|
119
|
-
|
120
|
-
return list_
|
121
|
-
elif isinstance(value, List) or value is None:
|
122
|
-
return value
|
123
|
-
else:
|
124
|
-
raise TypeError(f"{value} is not a json string or a list.")
|
125
|
-
|
126
84
|
|
127
85
|
class KanikoImageBuilderFlavor(BaseImageBuilderFlavor):
|
128
86
|
"""Kaniko image builder flavor."""
|