How can I know which runner that I'm using in TFX?

Hi, all.

I have a question about how can I know which runner I’m using in TFX?
For example, if I have to access a local disk, I want to handle it differently in LocalDagRunner and KubeFlowDagRunner. Which information do I have to check, or is there any helper function to access that info?

Thanks :slight_smile:

That’s a great question! Checking now.

1 Like

if this is to choose the right runner, it depends on the environment to run the pipeline, eg:
to run in local, you can use LocalDagRunner,
to run in Google Cloud, you can use KubeflowDagRunner, etc.

if it’s to check which runner you are using, you can check the code for pipeline setup:
eg. this is the place to set the runner: tfx/ at v1.6.0 · tensorflow/tfx · GitHub

1 Like

If you need to detect the runner in a custom component, one way is to pass in a custom parameter. For example, see how the synthesized_graph is handled in the Neural Structured Learning tutorial.

1 Like

Oh, I understood. Thank you! :+1:

It’s a little bit different from what I want to know, but thanks you also! :blush: