Use templates: Python SDK
Create and run a template using the ZenML Python SDK
This is a ZenML Pro-only feature. Please sign up here to get access.
Create a template
You can use the ZenML client to create a run template:
You need to select a pipeline run that was executed on a remote stack (i.e. at least a remote orchestrator, artifact store, and container registry)
You can also create a template directly from your pipeline definition by running the following code while having a remote stack active:
Run a template
You can use the ZenML client to run a template:
Once you trigger the template, a new run will be executed on the same stack as the original run was executed on.
Advanced Usage: Run a template from another pipeline
It is also possible to use the same logic to run a pipeline within another pipeline:
Read more about the PipelineRunConfiguration and trigger_pipeline
function object in the SDK Docs.
Read more about Unmaterialized Artifacts here.
![ZenML Scarf](https://docs.zenml.io/~gitbook/image?url=https%3A%2F%2Fstatic.scarf.sh%2Fa.png%3Fx-pxid%3Df0b4f458-0a54-4fcd-aa95-d5ee424815bc&width=768&dpr=4&quality=100&sign=bb7eab8&sv=2)
Last updated
Was this helpful?