Skip to content

Commit fe98f49

Browse files
Update persist in tests for async clients (#9089)
1 parent ca6efac commit fe98f49

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

distributed/comm/tests/test_ucx.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,16 +307,16 @@ async def test_stress(
307307
asynchronous=True,
308308
host=HOST,
309309
) as cluster:
310-
async with Client(cluster, asynchronous=True):
310+
async with Client(cluster, asynchronous=True) as client:
311311
rs = da.random.RandomState()
312312
x = rs.random((10000, 10000), chunks=(-1, chunksize))
313-
x = x.persist()
313+
x = client.persist(x)
314314
await wait(x)
315315

316316
for _ in range(10):
317317
x = x.rechunk((chunksize, -1))
318318
x = x.rechunk((-1, chunksize))
319-
x = x.persist()
319+
x = client.persist(x)
320320
await wait(x)
321321

322322

@@ -377,9 +377,9 @@ async def test_transpose(
377377
async with LocalCluster(
378378
protocol="ucx", n_workers=2, threads_per_worker=2, asynchronous=True
379379
) as cluster:
380-
async with Client(cluster, asynchronous=True):
380+
async with Client(cluster, asynchronous=True) as client:
381381
assert cluster.scheduler_address.startswith("ucx://")
382-
x = da.ones((10000, 10000), chunks=(1000, 1000)).persist()
382+
x = client.persist(da.ones((10000, 10000), chunks=(1000, 1000)))
383383
await x
384384
y = (x + x.T).sum()
385385
await y

distributed/diagnostics/tests/test_rmm_diagnostics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ async def test_rmm_metrics(c, s, *workers):
3232
assert w.metrics["rmm"]["rmm-used"] == 0
3333
assert w.metrics["rmm"]["rmm-total"] == parse_bytes("10MiB")
3434
result = delayed(rmm.DeviceBuffer)(size=10)
35-
result = result.persist()
35+
result = c.persist(result)
3636

3737
deadline = Deadline.after(5)
3838

0 commit comments

Comments
 (0)