https://prefect.io logo
#prefect-community
Title
# prefect-community
n

Nicholas Thompson

06/27/2022, 10:38 PM
Hi all, I'm trying to map over a task in prefect 0.15.13, using a LocalDaskExecutor where
scheduler="processes"
. The input I'm passing to the mapped task is ordered, ideally so that tasks assigned to the first items in the list are run first, however this doesn't seem to be the case. With my machine that has six cores, on a given task run I can see that the mapped tasks with
map_index
values 0, 1, 3, 13, 14, and 15 are run first, but ideally I would want this first batch of tasks to have map index values of 0, 1, 2, 3, 4 and 5. tldr: is it possible to ensure that when mapping a task, the mapped tasks get run in the same order they appear as in the input array?
k

Kevin Kho

06/28/2022, 7:47 AM
You can’t enforce order with mapping. It’s either you use looping or mapping, but looping won’t be parallel
👍 1
n

Nicholas Thompson

06/28/2022, 11:12 PM
Sounds good, thanks for clarifying 👍
19 Views