@@ -286,7 +286,7 @@ async def test_bad_disk(c, s, a, b):
286
286
)
287
287
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
288
288
out = df .shuffle ("x" )
289
- out = out .persist ()
289
+ out = c .persist (out )
290
290
shuffle_id = await wait_until_new_shuffle_is_initialized (s )
291
291
while not get_active_shuffle_runs (a ):
292
292
await asyncio .sleep (0.01 )
@@ -1068,7 +1068,7 @@ async def test_heartbeat(c, s, a, b):
1068
1068
)
1069
1069
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
1070
1070
out = df .shuffle ("x" )
1071
- out = out .persist ()
1071
+ out = c .persist (out )
1072
1072
1073
1073
while not s .plugins ["shuffle" ].heartbeats :
1074
1074
await asyncio .sleep (0.001 )
@@ -1272,7 +1272,7 @@ async def test_head(c, s, a, b):
1272
1272
)
1273
1273
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
1274
1274
out = df .shuffle ("x" )
1275
- out = await out .head (compute = False ). persist ( ) # Only ask for one key
1275
+ out = await c . persist ( out .head (compute = False )) # Only ask for one key
1276
1276
1277
1277
assert list (os .walk (a .local_directory )) == a_files # cleaned up files?
1278
1278
assert list (os .walk (b .local_directory )) == b_files
@@ -1380,7 +1380,7 @@ async def test_clean_after_forgotten_early(c, s, a, b):
1380
1380
)
1381
1381
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
1382
1382
out = df .shuffle ("x" )
1383
- out = out .persist ()
1383
+ out = c .persist (out )
1384
1384
await wait_for_tasks_in_state ("shuffle-transfer" , "memory" , 1 , a )
1385
1385
await wait_for_tasks_in_state ("shuffle-transfer" , "memory" , 1 , b )
1386
1386
del out
@@ -1399,12 +1399,12 @@ async def test_tail(c, s, a, b):
1399
1399
)
1400
1400
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
1401
1401
x = df .shuffle ("x" )
1402
- full = await x .persist ()
1402
+ full = await c .persist (x )
1403
1403
ntasks_full = len (s .tasks )
1404
1404
del full
1405
1405
while s .tasks :
1406
1406
await asyncio .sleep (0 )
1407
- partial = await x .tail (compute = False ). persist ( ) # Only ask for one key
1407
+ partial = await c . persist ( x .tail (compute = False )) # Only ask for one key
1408
1408
1409
1409
assert len (s .tasks ) < ntasks_full
1410
1410
del partial
@@ -1539,7 +1539,7 @@ async def test_crashed_worker_after_shuffle_persisted(c, s, a):
1539
1539
)
1540
1540
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
1541
1541
out = df .shuffle ("x" )
1542
- out = out .persist ()
1542
+ out = c .persist (out )
1543
1543
1544
1544
await event .wait ()
1545
1545
await out
@@ -1597,7 +1597,7 @@ async def test_new_worker(c, s, a, b):
1597
1597
)
1598
1598
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
1599
1599
shuffled = df .shuffle ("x" )
1600
- persisted = shuffled .persist ()
1600
+ persisted = c .persist (shuffled )
1601
1601
while not s .plugins ["shuffle" ].active_shuffles :
1602
1602
await asyncio .sleep (0.001 )
1603
1603
@@ -1646,7 +1646,7 @@ async def test_delete_some_results(c, s, a, b):
1646
1646
freq = "10 s" ,
1647
1647
)
1648
1648
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
1649
- x = df .shuffle ("x" ). persist ( )
1649
+ x = c . persist ( df .shuffle ("x" ))
1650
1650
while not s .tasks or not any (ts .state == "memory" for ts in s .tasks .values ()):
1651
1651
await asyncio .sleep (0.01 )
1652
1652
@@ -1669,12 +1669,12 @@ async def test_add_some_results(c, s, a, b):
1669
1669
)
1670
1670
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
1671
1671
x = df .shuffle ("x" )
1672
- y = x .partitions [: x .npartitions // 2 ]. persist ( )
1672
+ y = c . persist ( x .partitions [: x .npartitions // 2 ])
1673
1673
1674
1674
while not s .tasks or not any (ts .state == "memory" for ts in s .tasks .values ()):
1675
1675
await asyncio .sleep (0.01 )
1676
1676
1677
- x = x .persist ()
1677
+ x = c .persist (x )
1678
1678
1679
1679
await c .compute (x .size )
1680
1680
@@ -1697,7 +1697,7 @@ async def test_clean_after_close(c, s, a, b):
1697
1697
1698
1698
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
1699
1699
out = df .shuffle ("x" )
1700
- out = out .persist ()
1700
+ out = c .persist (out )
1701
1701
1702
1702
await wait_for_tasks_in_state ("shuffle-transfer" , "executing" , 1 , a )
1703
1703
await wait_for_tasks_in_state ("shuffle-transfer" , "memory" , 1 , b )
@@ -2079,7 +2079,7 @@ async def test_deduplicate_stale_transfer(c, s, a, b, wait_until_forgotten):
2079
2079
)
2080
2080
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
2081
2081
shuffled = df .shuffle ("x" )
2082
- shuffled = shuffled .persist ()
2082
+ shuffled = c .persist (shuffled )
2083
2083
2084
2084
shuffle_extA = a .plugins ["shuffle" ]
2085
2085
shuffle_extB = b .plugins ["shuffle" ]
@@ -2131,7 +2131,7 @@ async def test_handle_stale_barrier(c, s, a, b, wait_until_forgotten):
2131
2131
)
2132
2132
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
2133
2133
shuffled = df .shuffle ("x" )
2134
- shuffled = shuffled .persist ()
2134
+ shuffled = c .persist (shuffled )
2135
2135
2136
2136
shuffle_extA = a .plugins ["shuffle" ]
2137
2137
shuffle_extB = b .plugins ["shuffle" ]
@@ -2190,7 +2190,7 @@ async def test_shuffle_run_consistency(c, s, a):
2190
2190
# Initialize first shuffle execution
2191
2191
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
2192
2192
out = df .shuffle ("x" )
2193
- out = out .persist ()
2193
+ out = c .persist (out )
2194
2194
2195
2195
shuffle_id = await wait_until_new_shuffle_is_initialized (s )
2196
2196
spec = scheduler_ext .get (shuffle_id , a .worker_address )["run_spec" ].data
@@ -2214,7 +2214,7 @@ async def test_shuffle_run_consistency(c, s, a):
2214
2214
# Initialize second shuffle execution
2215
2215
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
2216
2216
out = df .shuffle ("x" )
2217
- out = out .persist ()
2217
+ out = c .persist (out )
2218
2218
2219
2219
new_shuffle_id = await wait_until_new_shuffle_is_initialized (s )
2220
2220
assert shuffle_id == new_shuffle_id
@@ -2241,7 +2241,7 @@ async def test_shuffle_run_consistency(c, s, a):
2241
2241
# Create an unrelated shuffle on a different column
2242
2242
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
2243
2243
out = df .shuffle ("y" )
2244
- out = out .persist ()
2244
+ out = c .persist (out )
2245
2245
independent_shuffle_id = await wait_until_new_shuffle_is_initialized (s )
2246
2246
assert shuffle_id != independent_shuffle_id
2247
2247
@@ -2284,7 +2284,7 @@ async def test_fail_fetch_race(c, s, a):
2284
2284
)
2285
2285
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
2286
2286
out = df .shuffle ("x" )
2287
- out = out .persist ()
2287
+ out = c .persist (out )
2288
2288
2289
2289
shuffle_id = await wait_until_new_shuffle_is_initialized (s )
2290
2290
spec = scheduler_ext .get (shuffle_id , a .worker_address )["run_spec" ].data
@@ -2365,7 +2365,7 @@ async def test_replace_stale_shuffle(c, s, a, b):
2365
2365
# Initialize first shuffle execution
2366
2366
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
2367
2367
out = df .shuffle ("x" )
2368
- out = out .persist ()
2368
+ out = c .persist (out )
2369
2369
2370
2370
shuffle_id = await wait_until_new_shuffle_is_initialized (s )
2371
2371
@@ -2391,7 +2391,7 @@ async def test_replace_stale_shuffle(c, s, a, b):
2391
2391
# Initialize second shuffle execution
2392
2392
with dask .config .set ({"dataframe.shuffle.method" : "p2p" }):
2393
2393
out = df .shuffle ("x" )
2394
- out = out .persist ()
2394
+ out = c .persist (out )
2395
2395
2396
2396
await wait_for_tasks_in_state ("shuffle-transfer" , "memory" , 1 , a )
2397
2397
await run_manager_B .finished_get_shuffle_run .wait ()
0 commit comments