dask / dask/distributed

Scheduler-side task prioritization is partially untested

Open
#6,084 0 comments 0 reactions 0 assignees View on GitHub
tests
Dominant language
Python
Stars
1.7k
Forks
778
Avg merge
2h 50m
Merged PRs (30d)
3

Description

You can currently apply the following patch without causing any tests in ``test_priority.py`` to trip:
```patch
--- a/distributed/scheduler.py
+++ b/distributed/scheduler.py
@@ -4939,7 +4939,7 @@ class Scheduler(SchedulerState, ServerNode):
# Compute recommendations
recommendations: dict = {}

- for ts in sorted(runnables, key=operator.attrgetter("priority"), reverse=True):
+ for ts in runnables:
if ts._state == "released" and ts._run_spec:
recommendations[ts._key] = "waiting"

@@ -8256,8 +8256,6 @@ def _add_to_memory(
state.add_replica(ts, ws)

deps: list = list(ts._dependents)
- if len(deps) > 1:
- deps.sort(key=operator.attrgetter("priority"), reverse=True)

dts: TaskState
s: set
```

This is a follow-up from #6077
CC @fjetter

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.