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

Function inlinable

dask/optimization.py:345–359  ·  view source on GitHub ↗
(key, task)

Source from the content-addressed store, hash-verified

343 dependents = reverse_dict(dependencies)
344
345 def inlinable(key, task):
346 if (
347 not isinstance(task, GraphNode)
348 and istask(task)
349 and key not in output
350 and dependents[key]
351 ):
352 try:
353 if functions_of(task).issubset(fast_functions) and not any(
354 isinstance(dsk[d], GraphNode) for d in dependents[key]
355 ):
356 return True
357 except TypeError:
358 pass
359 return False
360
361 keys = [k for k, v in dsk.items() if inlinable(k, v)]
362

Callers 1

inline_functionsFunction · 0.85

Calls 3

istaskFunction · 0.90
functions_ofFunction · 0.85
anyFunction · 0.85

Tested by

no test coverage detected