metaflow icon indicating copy to clipboard operation
metaflow copied to clipboard

Run a flow from another python file

Open rvorias opened this issue 3 years ago • 1 comments

Hi,

I was wondering if it's possible to run a flow from anything other than a script: e.g.

from flow import ParameterFlow
ParameterFlow()

I'm currently getting the following error TypeError: object of type 'NoneType' has no len()

update: ok so the first stage is solved:

from flow import ParameterFlow
ParameterFlow(use_cli=False)

However, I normally give 2 parameters. Anyone know how to set them?

update 2: ok ok I can just set the attributes

But how do I actually RUN the flow? thx

rvorias avatar Nov 28 '21 20:11 rvorias

@rvorias We have plans to support programmatic execution of flows. Meanwhile, you can use the Python subprocess module to invoke the flow.

savingoyal avatar Jan 05 '22 17:01 savingoyal

@savingoyal May I ask is there another update on this topic please, it seems the doc link above long time not updated. Thank you!!

kathy-lee avatar Jul 30 '23 13:07 kathy-lee