Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smarter stealing with dependencies #7024

Merged
merged 30 commits into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
9ec764b
Initial test for smarter stealing with dependencies
hendrikmakait Sep 8, 2022
ce1df7a
Parametrized test
hendrikmakait Sep 8, 2022
a6cc928
Add tests and make parts parametrizable
hendrikmakait Sep 9, 2022
bb9fdfa
Add more tests [WIP]
hendrikmakait Sep 9, 2022
f4374ea
Fix test
hendrikmakait Sep 9, 2022
0074060
additional tests
hendrikmakait Sep 9, 2022
bbfa401
Naming/docstring
hendrikmakait Sep 9, 2022
09a6ff8
Cleanup
hendrikmakait Sep 9, 2022
d383ea7
Fix fixture
hendrikmakait Sep 12, 2022
98ac895
Make _get_thief smarter
hendrikmakait Sep 12, 2022
450690d
Fix rebase issues
hendrikmakait Sep 15, 2022
1f52338
Review comment
hendrikmakait Sep 15, 2022
4d1cd0c
Adjust expected test results
hendrikmakait Sep 15, 2022
34ac7c2
Remove baseline tests
hendrikmakait Sep 15, 2022
b6171b2
Permutations (WIP)
hendrikmakait Sep 15, 2022
5597c6e
Permutations
hendrikmakait Sep 15, 2022
946fdb9
Reorder
hendrikmakait Sep 15, 2022
708b142
Remove comment
hendrikmakait Sep 15, 2022
f8a27ce
Improve test
hendrikmakait Sep 16, 2022
eacbbae
Remove failing test
hendrikmakait Sep 16, 2022
ffda2cb
Review comments
fjetter Sep 16, 2022
1f2f55b
Add docstring for _run_dependency_balance_test
hendrikmakait Sep 26, 2022
6e0b468
Even more docstrings
hendrikmakait Sep 26, 2022
d0c3ff7
Rename variables
hendrikmakait Sep 26, 2022
89ecd82
Cleanup
hendrikmakait Sep 26, 2022
288305f
Additional test
hendrikmakait Sep 26, 2022
0a7ebb3
Merge branch 'main' into balanced-stealing
crusaderky Sep 28, 2022
6b08c7f
Wait until tasks arrive on worker
hendrikmakait Sep 28, 2022
b5afd77
Disable queueing on test_balance_prefers_busier_with_dependency
hendrikmakait Sep 29, 2022
2ae65c9
Merge branch 'main' into balanced-stealing
hendrikmakait Sep 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions distributed/stealing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import logging
from collections import defaultdict, deque
from collections.abc import Container
from functools import partial
from math import log2
from time import time
from typing import TYPE_CHECKING, Any, ClassVar, TypedDict, cast
Expand Down Expand Up @@ -522,12 +523,12 @@ def _get_thief(
) -> WorkerState | None:
valid_workers = scheduler.valid_workers(ts)
if valid_workers is not None:
subset = potential_thieves & valid_workers
if subset:
return next(iter(subset))
valid_thieves = potential_thieves & valid_workers
if valid_thieves:
potential_thieves = valid_thieves
elif not ts.loose_restrictions:
return None
return next(iter(potential_thieves))
return min(potential_thieves, key=partial(scheduler.worker_objective, ts))


fast_tasks = {"split-shuffle"}
Loading