Hello I have a question about branching with `for...
# ask-metaflow
m
Hello I have a question about branching with
foreach
and dynamic resource configurations for runs on Kubernetes. For example, it is quite a common use case for us to have a
foreach
branch for multiple model training steps for a different setting, e.g., training a different model for a range of different countries. Typically the resources required for these different models varies dramatically. As such, we would like to allocate different amounts of resource to each of the different steps coming out of the
foreach
branching. Is there some way to achieve this behaviour with Metaflow?
1
s
@mammoth-rainbow-82717 - one way would be to use
branches
to subset your countries into various categories by resource requirements and then run a foreach for each of those categories
m
I see. Thanks. As I understand it, it will lead to some duplication of code, but it does seem to be a workable solution for our use cases.
Out of interest, is there any plan to support this type of functionality in the future? Naively I'd expect it to add quite of complexity to Metaflow for arguable amount of value, so I'm guessing it is not a high priority for you. Is that a fair assumption?