@@ -82,23 +82,22 @@ def test_merge():
8282@pytest .mark .skipif (
8383 not at_least_n_gpus (2 ), reason = "Machine does not have two GPUs"
8484)
85+ @pytest .mark .filterwarnings ("ignore:Port" )
8586def test_ucx_seriesgroupby ():
8687 pytest .importorskip ("distributed_ucxx" )
8788
88- with warnings .catch_warnings ():
89- warnings .filterwarnings ("ignore" , category = Warning , message = "Port" )
90- with (
91- dask_cuda .LocalCUDACluster (
92- n_workers = 3 , dashboard_address = None
93- ) as cluster ,
94- cluster .get_client (),
95- ):
96- # Repro Issue#3913
97- df = cudf .DataFrame ({"a" : [1 , 2 , 3 , 4 ], "b" : [5 , 1 , 2 , 5 ]})
98- dask_df = dask_cudf .from_cudf (df , npartitions = 2 )
99- dask_df_g = dask_df .groupby (["a" ]).b .sum ().compute ()
89+ with (
90+ dask_cuda .LocalCUDACluster (
91+ n_workers = 3 , dashboard_address = None
92+ ) as cluster ,
93+ cluster .get_client (),
94+ ):
95+ # Repro Issue#3913
96+ df = cudf .DataFrame ({"a" : [1 , 2 , 3 , 4 ], "b" : [5 , 1 , 2 , 5 ]})
97+ dask_df = dask_cudf .from_cudf (df , npartitions = 2 )
98+ dask_df_g = dask_df .groupby (["a" ]).b .sum ().compute ()
10099
101- assert dask_df_g .name == "b"
100+ assert dask_df_g .name == "b"
102101
103102
104103@pytest .mark .usefixtures ("dask_client" )
@@ -141,24 +140,22 @@ def test_p2p_shuffle():
141140 reason = "Machine does not have three GPUs" ,
142141)
143142@pytest .mark .filterwarnings ("ignore::ResourceWarning" )
143+ @pytest .mark .filterwarnings ("ignore:Port" )
144144def test_unique ():
145145 # Using `"p2p"` can produce dispatching problems
146146 # TODO: Test "p2p" after dask > 2024.4.1 is required
147147 # See: https://github.com/dask/dask/pull/11040
148- with warnings .catch_warnings ():
149- warnings .filterwarnings ("ignore" , category = Warning , message = "Port" )
150-
151- with dask_cuda .LocalCUDACluster (
152- n_workers = 3 , dashboard_address = None
153- ) as cluster :
154- with Client (cluster ):
155- df = cudf .DataFrame ({"x" : ["a" , "b" , "c" , "a" , "a" ]})
156- ddf = dask_cudf .from_cudf (df , npartitions = 2 )
157- dd .assert_eq (
158- df .x .unique (),
159- ddf .x .unique ().compute (),
160- check_index = False ,
161- )
148+ with dask_cuda .LocalCUDACluster (
149+ n_workers = 3 , dashboard_address = None
150+ ) as cluster :
151+ with Client (cluster ):
152+ df = cudf .DataFrame ({"x" : ["a" , "b" , "c" , "a" , "a" ]})
153+ ddf = dask_cudf .from_cudf (df , npartitions = 2 )
154+ dd .assert_eq (
155+ df .x .unique (),
156+ ddf .x .unique ().compute (),
157+ check_index = False ,
158+ )
162159
163160
164161@pytest .mark .usefixtures ("dask_client" )
0 commit comments