MCPcopy Create free account
hub / github.com/dask/dask / custom_scheduler_get

Function custom_scheduler_get

dask/array/tests/test_array_core.py:6208–6215  ·  view source on GitHub ↗

Custom scheduler that returns the result of the first key.

(dsk, keys, **kwargs)

Source from the content-addressed store, hash-verified

6206
6207def test_blockwise_fusion():
6208 def custom_scheduler_get(dsk, keys, **kwargs):
6209 """Custom scheduler that returns the result of the first key."""
6210 dsk = dsk.__dask_graph__()
6211 # two sum
6212 # one sum agg
6213 # one finalize Alias
6214 assert len(dsk) == 4, "False number of tasks"
6215 return [42 for _ in keys]
6216
6217 # First test that this mocking stuff works as expecged
6218 with pytest.raises(AssertionError, match="False number of tasks"):

Callers

nothing calls this directly

Calls 1

__dask_graph__Method · 0.45

Tested by

no test coverage detected