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

Function custom_scheduler_get

dask/array/tests/test_array_core.py:6171–6178  ·  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

6169
6170def test_blockwise_fusion():
6171 def custom_scheduler_get(dsk, keys, **kwargs):
6172 """Custom scheduler that returns the result of the first key."""
6173 dsk = dsk.__dask_graph__()
6174 # two sum
6175 # one sum agg
6176 # one finalize Alias
6177 assert len(dsk) == 4, "False number of tasks"
6178 return [42 for _ in keys]
6179
6180 # First test that this mocking stuff works as expecged
6181 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