How to obtain the Kubeflow pipeline run name from within a component? How to obtain the Kubeflow pipeline run name from within a component? kubernetes kubernetes

How to obtain the Kubeflow pipeline run name from within a component?


You can use {{workflow.annotations.pipelines.kubeflow.org/run_name}} argo variable to get the run_name

For example,

@func_to_container_opdef dummy(run_id, run_name) -> str:    return run_id, run_name@dsl.pipeline(    name='test_pipeline',)def test_pipeline():  dummy('{{workflow.labels.pipeline/runid}}', '{{workflow.annotations.pipelines.kubeflow.org/run_name}}')

You will find that the placeholders will be replaced with the correct run_id and run_name.


Currently KFP does not support this kind of introspection.

Can you please describe a scenario where this is needed?