-
-
Notifications
You must be signed in to change notification settings - Fork 749
Partially forgotten dependencies #9068
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
Conversation
|
|
||
| # We'll need the list to be | ||
| # ['key', 'lost_dep_of_key'] | ||
| keys = key, lost_dep_of_key = list({"foo", "bar"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The behavior of this is depending on the ordering of the keys. In particular _find_lost_dependencies is misbehaving depending on the order of this line
distributed/distributed/scheduler.py
Line 4641 in 358402d
| for k in list(keys): |
With this test setup we always prepare for the case where the one key is not discarded as it should be
|
The weakref thing happens in error_message while handling the exception in update_graph. It is just a log which is why the TB is cut off. The weakref this is referring to is probably |
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 27 files ± 0 27 suites ±0 11h 4m 1s ⏱️ -7s For more details on these failures and errors, see this check. Results for commit 04a713a. ± Comparison against base commit 10b6288. This pull request removes 1 and adds 2 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
|
I think as a "fix" I will just abort update_graph if any key does not exist. I think the situation where one wants to continue is rather artificial and it is driving complexity a lot |
089403c to
26dc7d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR aims to address issues related to partially forgotten dependencies that cause transition errors during graph updates. Key changes include:
- Adding a new test (test_compute_partially_forgotten) in distributed/tests/test_client.py to simulate lost dependencies.
- Modifying the _find_lost_dependencies function in distributed/scheduler.py to remove in‐place mutation of dependency data.
- Adjusting the lost dependency check in update_graph to report and cancel the graph update when lost dependencies are detected.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| distributed/tests/test_client.py | Added a new parametrized test that verifies behavior when a task’s lost dependency triggers a cancellation. |
| distributed/scheduler.py | Updated the lost dependencies logic in _find_lost_dependencies and update_graph to change how task keys are reported and released. |
Comments suppressed due to low confidence (1)
distributed/scheduler.py:4957
- The update_graph branch now uses the full keys set rather than a computed lost_keys set when detecting lost dependencies. Confirm that this change in behavior is intentional and that canceling the graph update based on the entire keys set does not lead to unintended cancellations.
if self._find_lost_dependencies(dsk, keys):
| # ['key', 'lost_dep_of_key'] | ||
| # At the time of writing, it is unclear why the lost_dep_of_key is part of | ||
| # keys but this triggers an observed error | ||
| keys = key, lost_dep_of_key = list({"foo", "bar"}) |
Copilot
AI
May 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] This tuple assignment simultaneously defining 'key', 'lost_dep_of_key' and 'keys' can be confusing. Consider splitting the assignment into two separate statements for better clarity.
| keys = key, lost_dep_of_key = list({"foo", "bar"}) | |
| keys = list({"foo", "bar"}) | |
| key, lost_dep_of_key = keys |
This raises transition errors as
If
validateis enabled, as in our test suite, the error is simply