MCPcopy
hub / github.com/dask/dask / block_one

Function block_one

dask/graph_manipulation.py:519–536  ·  view source on GitHub ↗
(coll)

Source from the content-addressed store, hash-verified

517 blocker = checkpoint(*collections, split_every=split_every)
518
519 def block_one(coll):
520 tok = tokenize(coll, blocker)
521 dsks = []
522 rename = {}
523 for prev_name in get_collection_names(coll):
524 new_name = "wait_on-" + tokenize(prev_name, tok)
525 rename[prev_name] = new_name
526 layer = _build_map_layer(
527 chunks.bind, prev_name, new_name, coll, dependencies=(blocker,)
528 )
529 dsks.append(
530 HighLevelGraph.from_collections(
531 new_name, layer, dependencies=(coll, blocker)
532 )
533 )
534 dsk = HighLevelGraph.merge(*dsks)
535 rebuild, args = coll.__dask_postpersist__()
536 return rebuild(dsk, *args, rename=rename)
537
538 unpacked, repack = unpack_collections(*collections)
539 out = repack([block_one(coll) for coll in unpacked])

Callers 1

wait_onFunction · 0.85

Calls 6

get_collection_namesFunction · 0.90
_build_map_layerFunction · 0.85
from_collectionsMethod · 0.80
tokenizeFunction · 0.70
mergeMethod · 0.45
__dask_postpersist__Method · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…