Dynamically adjusting priority via Futures
See original GitHub issueBasically copied from this comment in PR ( https://github.com/dask/distributed/pull/1651 ). Also related to issue ( https://github.com/dask/dask/issues/2860 ).
One thing that would be nice is to be able to propagate priority changes from Future
s themselves. Namely if one tries to call result
, it would be good to bump the priority. Maybe this could be configurable if not generally desirable.
To provide an example use case, imagine one has a Dask object (Array, Dataframe, etc.) and has called persist
on the object. Then one wants to inspect a small piece of it while the computation proceeds. So they select out that piece and call compute
. It would be good if this already was interpreted as the user wanting this piece of the result sooner than the rest. That way the user can play with this piece as the rest of the computation completes. If needed, this process can be repeated with other pieces.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
Those are TaskState objects and are internal to the scheduler. There is no mechanism today to adjust priorities dynamically. This is what this issue is proposing.
I’m trying to manually adjust the priorities for futures (e.g. for tree reduction I want to assign higher priority to tasks that are closer to the final node), but I don’t know how to find out the priority of a given future. From the snippet above it looks like it was possible to get
priority
as a property of future, but it doesn’t work in2021.05.1
version.This is my code: