You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Launching tasks within tasks without using the distributed scheduler #3235
Is there any reason not to encourage using this pattern within core dask collections? I can think of some examples where this would be useful, e.g., for indexing dask arrays with dask arrays in #3210.
One issue would be oversubscription of hardware because of using too many threads. The distributed scheduler has cleverness that avoids this sort of thing.
Note that if you can install a modern version Tornado (which I understand is a big if in some places :) ) the dask.distributed scheduler is very lightweight when created with
If one doesn't start a Client instance, what happens to this example? Does it just block in the middle of the task? Is it able to start the next task? Other things to consider for this case?
Hrm, you probably could make this work with the modified ThreadPoolExecutor in dask.distributed rather than a vanilla ThreadPool. It has enough of the secede/rejoin logic to make this work.
I'm going to go ahead and close this. It doesn't look like anyone cares enough about this to do this work near-term. The distributed scheduler also offers this functionality.
Activity
mrocklin commentedon Mar 1, 2018
One issue would be oversubscription of hardware because of using too many threads. The distributed scheduler has cleverness that avoids this sort of thing.
Note that if you can install a modern version Tornado (which I understand is a big if in some places :) ) the dask.distributed scheduler is very lightweight when created with
jakirkham commentedon Mar 1, 2018
If one doesn't start a
Clientinstance, what happens to this example? Does it just block in the middle of the task? Is it able to start the next task? Other things to consider for this case?mrocklin commentedon Mar 1, 2018
My guess is that it would create a new
ThreadPooland run the sub-computation as a blocking computation within this task.shoyer commentedon Mar 1, 2018
Yeah, this is a non-starter. Now that I think about it, I recall running into these issues before.
It might be worth noting somewhere in that example why this isn't a good idea with non-distributed dask.
mrocklin commentedon Mar 1, 2018
Hrm, you probably could make this work with the modified
ThreadPoolExecutorin dask.distributed rather than a vanilla ThreadPool. It has enough of thesecede/rejoinlogic to make this work.This would take modest effort though.
mrocklin commentedon Oct 24, 2018
I'm going to go ahead and close this. It doesn't look like anyone cares enough about this to do this work near-term. The distributed scheduler also offers this functionality.
jakirkham commentedon Jun 24, 2019
In a Python 3.5+ code base, would this be more achievable using async?
mrocklin commentedon Jun 24, 2019
No. There's nothing we can do with async/await tahat we couldn't do with tornado.
Why do you ask @jakirkham . Is this blocking you somewhere?