-
Notifications
You must be signed in to change notification settings - Fork 915
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
Changes from 1 commit
36febfd
7d9d2e8
68bafe5
bc39bfc
10fded0
609b936
091b160
7563b54
836c485
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -16,9 +16,9 @@ | |||||
dask_cuda = pytest.importorskip("dask_cuda") | ||||||
|
||||||
|
||||||
def more_than_two_gpus(): | ||||||
def more_than_n_gpus(n): | ||||||
ngpus = len(numba.cuda.gpus) | ||||||
return ngpus >= 2 | ||||||
return ngpus >= n | ||||||
|
||||||
|
||||||
@pytest.mark.parametrize("delayed", [True, False]) | ||||||
|
@@ -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" | ||||||
) | ||||||
def test_ucx_seriesgroupby(): | ||||||
pytest.importorskip("ucp") | ||||||
|
@@ -97,3 +97,19 @@ def test_p2p_shuffle(): | |||||
ddf.compute().sort_values("x"), | ||||||
check_index=False, | ||||||
) | ||||||
|
||||||
|
||||||
@pytest.mark.skipif( | ||||||
not more_than_n_gpus(3), | ||||||
reason="Machine does not have more than three GPUs", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
) | ||||||
def test_unique(): | ||||||
with dask_cuda.LocalCUDACluster(n_workers=3) as cluster: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR does something pretty simple, but the background is slightly confusing:
|
||||||
with Client(cluster): | ||||||
df = cudf.DataFrame({"x": ["a", "b", "c", "a", "a"]}) | ||||||
ddf = dask_cudf.from_cudf(df, npartitions=2) | ||||||
dd.assert_eq( | ||||||
df.x.unique(), | ||||||
ddf.x.unique().compute(), | ||||||
check_index=False, | ||||||
) |
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.
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.
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.