MCPcopy
hub / github.com/dask/dask / convert_legacy_graph

Function convert_legacy_graph

dask/_task_spec.py:259–273  ·  view source on GitHub ↗
(
    dsk: Mapping,
    all_keys: Container | None = None,
)

Source from the content-addressed store, hash-verified

257
258
259def convert_legacy_graph(
260 dsk: Mapping,
261 all_keys: Container | None = None,
262):
263 if all_keys is None:
264 all_keys = set(dsk)
265 new_dsk = {}
266 for k, arg in dsk.items():
267 t = convert_legacy_task(k, arg, all_keys)
268 if isinstance(t, Alias) and t.target == k:
269 continue
270 elif not isinstance(t, GraphNode):
271 t = DataNode(k, t)
272 new_dsk[k] = t
273 return new_dsk
274
275
276def resolve_aliases(dsk: dict, keys: set, dependents: dict) -> dict:

Callers 13

getFunction · 0.90
__dask_graph__Method · 0.90
start_state_from_daskFunction · 0.90
get_asyncFunction · 0.90
optimizeFunction · 0.90
_layer_cacheMethod · 0.90
convert_and_verify_keysFunction · 0.90
test_hybrid_legacy_newFunction · 0.90
_check_dskFunction · 0.90

Calls 4

setClass · 0.85
convert_legacy_taskFunction · 0.85
DataNodeClass · 0.85
itemsMethod · 0.45

Tested by 4

convert_and_verify_keysFunction · 0.72
test_hybrid_legacy_newFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…