inline(dsk, keys=None, inline_constants=True, dependencies=None)
Inlines all constants if inline_constants
keyword is True. Note that the constant keys will remain in the graph, to remove them follow inline
with cull
.
Return new dask with the given keys inlined with their values.
>>> d = {'x': 1, 'y': (inc, 'x'), 'z': (add, 'x', 'y')}This example is valid syntax, but we were not able to check execution
... inline(d) # doctest: +ELLIPSIS {'x': 1, 'y': (<function inc at ...>, 1), 'z': (<function add at ...>, 1, 'y')}
>>> inline(d, keys='y') # doctest: +ELLIPSIS {'x': 1, 'y': (<function inc at ...>, 1), 'z': (<function add at ...>, 1, (<function inc at ...>, 1))}This example is valid syntax, but we were not able to check execution
>>> inline(d, keys='y', inline_constants=False) # doctest: +ELLIPSIS {'x': 1, 'y': (<function inc at ...>, 'x'), 'z': (<function add at ...>, 'x', (<function inc at ...>, 'x'))}See :
The following pages refer to to this document either explicitly or contain code examples using this.
dask.optimization.inline
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them