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

Avoid "p2p" shuffle as a default when dask_cudf is imported #15469

Merged
merged 9 commits into from
Apr 8, 2024

Conversation

rjzamora
Copy link
Member

@rjzamora rjzamora commented Apr 5, 2024

Description

I was looking through some dask-related test failures in rapidsai/cuml#5819 and noticed that the "p2p" shuffle is causing some problems when query-planning is enabled. This PR sets the global default to "tasks". It may make sense to roll back this change once we fix the underlying problem(s), but I doubt it.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@rjzamora rjzamora added bug Something isn't working 2 - In Progress Currently a work in progress dask Dask issue non-breaking Non-breaking change labels Apr 5, 2024
@rjzamora rjzamora self-assigned this Apr 5, 2024
@rjzamora rjzamora requested a review from a team as a code owner April 5, 2024 02:52
@github-actions github-actions bot added the Python Affects Python cuDF API. label Apr 5, 2024
reason="Machine does not have more than three GPUs",
)
def test_unique():
with dask_cuda.LocalCUDACluster(n_workers=3) as cluster:
Copy link
Member Author

Choose a reason for hiding this comment

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

Needed >2 workers to reproduce the error locally. Not sure what the problem is yet, but the to-pyarrow dispatch is failing to register on one or more workers.

Copy link
Member

Choose a reason for hiding this comment

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

So that means the error is not reproducible by disabling P2P shuffle and this test confirms that, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

This PR does something pretty simple, but the background is slightly confusing:

  • Using the latest release of dask, this test would fail without the global "tasks" config that is set in this PR
  • After Add lazy "cudf" registration for p2p-related dispatch functions dask/dask#11040, this test will also pass when the "p2p" shuffle is used
  • Even though "p2p" works for dask:main, I still think it makes sense to use the "tasks" default (at least for now). Although "p2p" should theoretically be more stable, I have not found this to be the case in practice for GPUs. Also, "tasks" is definitely faster.

@rjzamora rjzamora added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Apr 5, 2024
Copy link
Member

@pentschev pentschev left a comment

Choose a reason for hiding this comment

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

Mostly semantical suggestions which are not really blockers, otherwise LGTM.

@@ -54,7 +54,7 @@ def test_merge():


@pytest.mark.skipif(
not more_than_two_gpus(), reason="Machine does not have more than two GPUs"
not more_than_n_gpus(2), reason="Machine does not have more than two GPUs"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
not more_than_n_gpus(2), reason="Machine does not have more than two GPUs"
not more_than_n_gpus(2), reason="Machine does not at least two GPUs"

Copy link
Member

Choose a reason for hiding this comment

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

Just like the message was misleading, I believe the function name is too and I would suggest renaming it to at_least_n_gpus or something more accurate.


@pytest.mark.skipif(
not more_than_n_gpus(3),
reason="Machine does not have more than three GPUs",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
reason="Machine does not have more than three GPUs",
reason="Machine does not have at least three GPUs",

reason="Machine does not have more than three GPUs",
)
def test_unique():
with dask_cuda.LocalCUDACluster(n_workers=3) as cluster:
Copy link
Member

Choose a reason for hiding this comment

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

So that means the error is not reproducible by disabling P2P shuffle and this test confirms that, right?

@rjzamora rjzamora added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 3 - Ready for Review Ready for review by team labels Apr 8, 2024
@rjzamora
Copy link
Member Author

rjzamora commented Apr 8, 2024

/merge

@rapids-bot rapids-bot bot merged commit 44e0640 into rapidsai:branch-24.06 Apr 8, 2024
70 checks passed
@rjzamora rjzamora deleted the avoid-p2p-default branch April 8, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge bug Something isn't working dask Dask issue non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants