question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dynamically adjusting priority via Futures

See original GitHub issue

Basically 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 Futures 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.

cc @mrocklin @p-himik

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
mrocklincommented, Jun 14, 2021

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.

0reactions
SultanOrazbayevcommented, Jun 14, 2021

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 in 2021.05.1 version.

This is my code:

from dask.distributed import Client
client = Client()

def sq(x):
    return x**2

futs = client.map(sq, range(3))

print(futs[0].priority)
# AttributeError: 'Future' object has no attribute 'priority'
Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic priorities, priority scheduling and priority inheritance
A new statement is proposed for setting priorities dynamically. ... pragmas, dynamic priorities are set using a new statement, and priorities are read...
Read more >
Flow block: Change routing priority / age - Amazon Connect
Description. Change a customer's position in the queue. · Supported channels. The following table lists how this block routes a contact who is...
Read more >
A Packet Scheduling Method Based on Dynamic Adjustment ...
For power communication service priority adjustment, the existing ... to support the future intelligent distribution and utilization of ...
Read more >
Time dependent decision-making; dynamic priorities in the ...
Because good decisions depend on the conditions of the future, ... We have two problems to solve when using dynamic judgments in the...
Read more >
Set the priority level of alerts created with integrations
If you select manual values, the alert created from that integration will always have that priority. If {{priority}} dynamic field is selected, then...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found