This pipeline shows how to define loops and nested loops inside a loop. The nested loops feature demonstrates how Tekton can use the custom task feature to create multiple layers of sub-pipelines and loops on individual pipeline layers.
- Install KFP Tekton 0.9.0+
- Install the latest KFP SDK (0.9.0+)
-
Compile the flip-coin pipeline using the compiler inside the python code. The kfp-tekton SDK will produce a Tekton pipeline yaml definition in the same directory called
withitem_nested.py
.# Compile the python code python withitem_nested.py
-
Upload the
withitem_nested.yaml
file to the Kubeflow pipeline dashboard with Tekton Backend to run this pipeline. Since Tekton PipelineRun API not yet support custom task spec, we will have to inspect the individual loop layers withkubectl get pipelinerun -n kubeflow | grep my-pipeline