Improved error messages for P2P shuffling#7979
Merged
hendrikmakait merged 8 commits intodask:mainfrom Jul 10, 2023
Merged
Conversation
wence-
reviewed
Jul 10, 2023
|
|
||
| async def barrier(self, id: ShuffleId, run_id: int) -> None: | ||
| shuffle = self.states[id] | ||
| assert shuffle.run_id == run_id |
Contributor
There was a problem hiding this comment.
Suggested change
| assert shuffle.run_id == run_id | |
| assert shuffle.run_id == run_id, "Shuffle barrier ID does not match requested run_id" |
? Or something like that?
| ) | ||
| if run_id < shuffle.run_id: | ||
| raise RuntimeError("Stale shuffle") | ||
| raise RuntimeError(f"{shuffle} stale, expected run_id=={run_id}") |
Contributor
There was a problem hiding this comment.
Suggested change
| raise RuntimeError(f"{shuffle} stale, expected run_id=={run_id}") | |
| raise RuntimeError(f"{shuffle} stale, expected {run_id=}") |
| elif run_id > shuffle.run_id: | ||
| # This should never happen | ||
| raise RuntimeError("Invalid shuffle state") | ||
| raise RuntimeError(f"{shuffle} invalid, expected run_id=={run_id}") |
Contributor
There was a problem hiding this comment.
Suggested change
| raise RuntimeError(f"{shuffle} invalid, expected run_id=={run_id}") | |
| raise RuntimeError(f"{shuffle} invalid, expected {run_id=}") |
| @@ -696,10 +703,10 @@ async def _get_shuffle_run( | |||
| shuffle_id=shuffle_id, | |||
| ) | |||
| if run_id < shuffle.run_id: | |||
Contributor
There was a problem hiding this comment.
Minor: use the same ordering for the conditions (shuffle.run_id > run_id) as in _restrict_task in the scheduler extensions?
| elif run_id > shuffle.run_id: | ||
| # This should never happen | ||
| raise RuntimeError("Invalid shuffle state") | ||
| if run_id > shuffle.run_id: |
Contributor
There was a problem hiding this comment.
Minor: flip order of operands to align with restrict_task in the scheduler extension?
Co-authored-by: Lawrence Mitchell <wence@gmx.li>
2 tasks
wence-
approved these changes
Jul 10, 2023
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pre-commit run --all-files