Is it possible to nest flows?
# ask-metaflow
s
Is it possible to nest flows?
1
I want to train a model in a rolling setup (so re run the flow every quarter historically and stitch together the results). I’d like to do that from within another flow
Is that a thing?
c
A few ways to approach it.. • Somewhat of a workaround to your question would be one big flow, that does nested foreach steps to build each model in parallel. • The direct answer to the "flows within flows" question is not really at the moment, but there are plans for addressing this directly. I think timeline is on the order of months for that though, so probably won't unblock you now. Do you think you could do it all in one flow?
s
Yeah I can try that. It’ll run the steps in parallel, anyway, right?
Yeah I can do that
c
ya, assuming that step has a remote instance decorator like
@batch
or
@kubernetes
, otherwise parallelism is limited by resources on the workstation the metaflow run is launched from
s
Yeah. I think it might actually be easier to loop in bash and stitch the outputs together that way