Ryan Abernathey
12/29/2020, 4:57 PMJohn Grubb
12/29/2020, 4:59 PMJim Crist-Harif
12/29/2020, 5:00 PMJeremiah
Ryan Abernathey
12/29/2020, 6:01 PMRyan Abernathey
12/29/2020, 6:02 PMmap
over 100 objects, but I only want 10 of these tasks to be able to run concurrently...Jim Crist-Harif
12/29/2020, 6:15 PMSemaphore
(threading.Semaphore
if using the local executors, distributed.Semaphore
if using a DaskExecutor
).Jim Crist-Harif
12/29/2020, 6:15 PMJim Crist-Harif
12/29/2020, 6:16 PMJim Crist-Harif
12/29/2020, 6:18 PMRyan Abernathey
12/29/2020, 6:18 PMRyan Abernathey
12/29/2020, 6:19 PMRyan Abernathey
12/29/2020, 6:19 PMMarwan Sarieddine
12/29/2020, 6:20 PMJim Crist-Harif
12/29/2020, 6:20 PMRyan Abernathey
12/29/2020, 6:20 PMRyan Abernathey
12/29/2020, 6:22 PMRyan Abernathey
12/29/2020, 6:22 PMmap
operation with an optional concurrency parameter. The recipe writer will presumably know enough about the source to know whether concurrency limits are necessary.Ryan Abernathey
12/29/2020, 6:23 PMJim Crist-Harif
12/29/2020, 6:29 PMdistributed.Semaphore
within your tasks for now. Alternatively, you could make use of dask's worker resources. Tasks tagged with tags of the form dask-resource:KEY=N
will each take N
amount of KEY
resource. So you could limit active download tasks by creating a resource for downloading then tagging download tasks to mark that they require that resource.Jim Crist-Harif
12/29/2020, 6:30 PMSemaphore
would.