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

Pause to disable dependency gathering #6195

Merged
merged 6 commits into from
Apr 27, 2022

Conversation

crusaderky
Copy link
Collaborator

@crusaderky crusaderky commented Apr 25, 2022

Closes #5702

@crusaderky crusaderky requested a review from fjetter April 25, 2022 14:34
@crusaderky crusaderky self-assigned this Apr 25, 2022
@mrocklin
Copy link
Member

Maybe errant issue number?

@crusaderky
Copy link
Collaborator Author

Fixed - thanks

crusaderky added a commit to crusaderky/distributed that referenced this pull request Apr 25, 2022
crusaderky added a commit to crusaderky/distributed that referenced this pull request Apr 25, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Apr 26, 2022

Unit Test Results

       16 files  ±0         16 suites  ±0   7h 39m 42s ⏱️ + 13m 43s
  2 740 tests +1    2 658 ✔️ ±  0       80 💤  - 1  2 +2 
21 805 runs  +8  20 759 ✔️ +10  1 044 💤  - 4  2 +2 

For more details on these failures, see this check.

Results for commit 7c23586. ± Comparison against base commit 84cbb09.

♻️ This comment has been updated with latest results.

y = c.submit(inc, 1, key="y", workers=[b.address])
await wait([x, y])

# - z reaches worker a with higher priority than w
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As far as I could test, this seems to be deterministic - however I can't understand if it's intentional?

Copy link
Member

Choose a reason for hiding this comment

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

If you rely on the priorities in this test, I would suggest to set them explicitly. This not only makes the test easier to read but it is also more robust to changes in the way we calculate internal priorities, i.e. excluding user priorities.

Copy link
Member

@fjetter fjetter left a comment

Choose a reason for hiding this comment

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

I would suggest to use explicit priorities in the test. If priorities are not properly assigned on task submission that is obviously something we care about but this test should not care about that fact.

Otherwise, LGTM

y = c.submit(inc, 1, key="y", workers=[b.address])
await wait([x, y])

# - z reaches worker a with higher priority than w
Copy link
Member

Choose a reason for hiding this comment

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

If you rely on the priorities in this test, I would suggest to set them explicitly. This not only makes the test easier to read but it is also more robust to changes in the way we calculate internal priorities, i.e. excluding user priorities.


while "y" not in a.tasks or a.tasks["y"].state != "fetch":
await asyncio.sleep(0.01)
await asyncio.sleep(0.1)
Copy link
Member

Choose a reason for hiding this comment

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

why is this additional sleep required?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To make sure the task remained in fetch state and didn't transition to flight

@crusaderky
Copy link
Collaborator Author

If you rely on the priorities in this test, I would suggest to set them explicitly.

Done. However, note that the test relies on w and z to be clustered together by the batched comms.
I couldn't find a way that doesn't rely on it (short of monkey-patching handle_status_change so that we can pause and unpause without informing the scheduler).

@crusaderky crusaderky merged commit 9bad573 into dask:main Apr 27, 2022
@crusaderky crusaderky deleted the pause_disables_gather branch April 27, 2022 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Paused workers should not be able to fetch any more data
3 participants