MCPcopy
hub / github.com/dask/dask / test_optimize_fuse_keys

Function test_optimize_fuse_keys

dask/bag/tests/test_bag.py:1503–1512  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1501
1502
1503def test_optimize_fuse_keys():
1504 x = db.range(10, npartitions=2)
1505 y = x.map(inc)
1506 z = y.map(inc)
1507
1508 dsk = z.__dask_optimize__(z.dask, z.__dask_keys__())
1509 assert not y.dask.keys() & dsk.keys()
1510
1511 dsk = z.__dask_optimize__(z.dask, z.__dask_keys__(), fuse_keys=y.__dask_keys__())
1512 assert all(k in dsk for k in y.__dask_keys__())
1513
1514
1515def test_reductions_are_lazy():

Callers

nothing calls this directly

Calls 5

allFunction · 0.85
__dask_optimize__Method · 0.80
mapMethod · 0.45
__dask_keys__Method · 0.45
keysMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…