kuberneteskubeflowkubeflow-pipelines

How to get the id of the run from within a component?


I'm doing some experimentation with Kubeflow Pipelines and I'm interested in retrieving the run id to save along with some metadata about the pipeline execution. Is there any way I can do so from a component like a ContainerOp?


Solution

  • I tried to do this using the Python's DSL but seems that isn't possible right now.

    The only option that I found is to use the method that they used in this sample code. You basically declare a string containing {{workflow.uid}}. It will be replaced with the actual value during execution time.

    You can also do this in order to get the pod name, it would be {{pod.name}}.