Get experiment name from within a Kubeflow pipeline run

1/18/2021

I just started working with Kubeflow and I ran into a problem. I need my pipeline to be able to automatically get the name of the experiment it belongs to. I tried to use the kfp package but it seems to me that there is no way to get the experiment name of the current run. Do you have any suggestions? Thank you very much!

-- user2846
kubeflow
kubeflow-pipelines
kubernetes

1 Answer

2/18/2021

A run is tied to a experiment, not the other way around. When you run a pipeline you specify the experiement name with kfp.Client.run_pipeline as argument. When you do not specify an experiment then it will automatically be tied to the default experiment on AI platforms.

So you won't need to get the experiment name since you specify the experiment when running a pipeline.

-- Franco
Source: StackOverflow