Skip to content

Commit c1a908a

Browse files
schustmibcdurak
andauthored
Add helper method to quickly create run template from pipeline (#3155)
* Add helper method to quickly create run template from pipeline * Better type annotations * Docs * Update docs/book/how-to/pipeline-development/trigger-pipelines/use-templates-python.md Co-authored-by: Barış Can Durak <[email protected]> * Improve error messages --------- Co-authored-by: Barış Can Durak <[email protected]>
1 parent 824f99a commit c1a908a

File tree

5 files changed

+207
-161
lines changed

5 files changed

+207
-161
lines changed

docs/book/how-to/pipeline-development/trigger-pipelines/use-templates-python.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@ You need to select **a pipeline run that was executed on a remote stack**
2727
(i.e. at least a remote orchestrator, artifact store, and container registry)
2828
{% endhint %}
2929

30+
31+
You can also create a template directly from your pipeline definition by running the
32+
following code while having a **remote stack** active:
33+
```python
34+
from zenml import pipeline
35+
36+
@pipeline
37+
def my_pipeline():
38+
...
39+
40+
template = my_pipeline.create_run_template(name=<TEMPLATE_NAME>)
41+
```
42+
3043
## Run a template
3144

3245
You can use the ZenML client to run a template:

0 commit comments

Comments
 (0)