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

Don't consider scheduler idle while executing Scheduler.update_graph #8877

Conversation

hendrikmakait
Copy link
Member

Partially addresses #8876

  • Tests added / passed
  • Passes pre-commit run --all-files

@hendrikmakait hendrikmakait self-assigned this Sep 19, 2024
Copy link
Contributor

github-actions bot commented Sep 19, 2024

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

    25 files  ± 0      25 suites  ±0   10h 22m 24s ⏱️ - 3m 32s
 4 127 tests + 1   4 014 ✅ + 4    111 💤 ±0  2 ❌  - 3 
47 674 runs  +12  45 564 ✅ +15  2 108 💤 +1  2 ❌  - 4 

For more details on these failures, see this check.

Results for commit 40f3a35. ± Comparison against base commit 80b3af5.

♻️ This comment has been updated with latest results.

@hendrikmakait hendrikmakait changed the title Don't consider Scheduler idle while executing Scheduler.update_graph Don't consider scheduler idle while executing Scheduler.update_graph Sep 19, 2024
Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks @hendrikmakait. I think this will help when dealing with large graphs

@hendrikmakait hendrikmakait marked this pull request as ready for review September 23, 2024 10:49
Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hendrikmakait, this LGTM. I left a couple of non-blocking comments. Feel free to include or ignore.

@@ -4913,8 +4916,11 @@ async def update_graph(
# (which may not have been added to who_wants yet)
client=client,
)
end = time()
self.digest_metric("update-graph-duration", end - start)
finally:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noting that this finally block is being used to ensure we always decrement the _active_graph_updates counter

distributed/tests/test_scheduler.py Outdated Show resolved Hide resolved
class UpdateGraphTrackerPlugin(SchedulerPlugin):
def start(self, scheduler):
self.scheduler = scheduler
self.idle_during_update_graph = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Non-blocking nit] This is totally fine as is but maybe don't even assign self.idle_during_update_graph until inside the update_graph plugin hook? assert plugin.idle_during_update_graph is None could mean that the update_graph hook didn't run at all.

Suggested change
self.idle_during_update_graph = None

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've slightly adjusted this such that idle_during_update_graph is initialized to None and set to True or False during the hook.

@jrbourbeau jrbourbeau merged commit f870325 into dask:main Sep 24, 2024
27 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants