MetaFlow允许您使用set the maximum number of concurrent tasks CLI标志(ref:https://docs.metaflow.org/metaflow/scaling#safeguard-flags)。不过,我不想每次都这样。
是否可以从--max-workers
定义中设置FlowSpec标志(不使用FlowSpec)?
发布于 2021-07-15 16:12:13
CLI标志设置METAFLOW_RUN_MAX_WORKERS
环境变量。在定义FlowSpec之前,您可以通过设置这个环境变量来在Python中设置这个环境变量:
# force MetaFlow to use only 1 concurrent task during a foreach fanout
os.environ.update({"METAFLOW_RUN_MAX_WORKERS": "1"})
来源:与@Savin聊天
https://stackoverflow.com/questions/68397295
复制相似问题