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

Function _get_dependencies

dask/_task_spec.py:620–633  ·  view source on GitHub ↗
(obj: object)

Source from the content-addressed store, hash-verified

618
619
620def _get_dependencies(obj: object) -> set | frozenset:
621 if _is_dask_future(obj):
622 return obj.key # type: ignore[attr-defined]
623 elif isinstance(obj, GraphNode):
624 return obj.dependencies
625 elif isinstance(obj, dict):
626 if not obj:
627 return _no_deps
628 return set().union(*map(_get_dependencies, obj.values()))
629 elif isinstance(obj, (list, tuple, frozenset, set)):
630 if not obj:
631 return _no_deps
632 return set().union(*map(_get_dependencies, obj))
633 return _no_deps
634
635
636class Task(GraphNode):

Callers 1

test_array_as_argumentFunction · 0.90

Calls 3

_is_dask_futureFunction · 0.85
setClass · 0.85
valuesMethod · 0.45

Tested by 1

test_array_as_argumentFunction · 0.72