Hello! I’m running a flow using Argo Workflows and...
# ask-metaflow
e
Hello! I’m running a flow using Argo Workflows and using the
foreach
feature to have many workers execute a few steps in parallel. There is, however, one step that I do not want more than 2 nodes to process simultaneously. It sounds like that folks who use AWS can use the
@batch
decorator to limit parallelism on the step level; is there any recommended way to implement this limit on a step level for folks who are not on AWS?
1
v
hi Grace! You can use
--max-workers
to determine the maximum degree of parallelism at the flow level. It works on Step Functions and Argo Workflows equally. There isn't a direct way to limit parallelism at the step level (besides creating a desired number of static branches manually). However, on Argo you have an option to split the workflow into multiple parts, limit parallelism on each one of them separately, and use `@trigger_on_finish` to compose them back together.
e
interesting, thank you for your reply ville!