dask 2021.10.0

NotesParametersReturns
visualize(self, filename='mydask', format=None, optimize_graph=False, **kwargs)

Requires graphviz to be installed.

Notes

For more information on optimization see here:

https://docs.dask.org/en/latest/optimize.html

Parameters

filename : str or None, optional

The name of the file to write to disk. If the provided :None:None:`filename` doesn't include an extension, '.png' will be used by default. If :None:None:`filename` is None, no file will be written, and we communicate with dot using only pipes.

format : {'png', 'pdf', 'dot', 'svg', 'jpeg', 'jpg'}, optional

Format in which to write output file. Default is 'png'.

optimize_graph : bool, optional

If True, the graph is optimized before rendering. Otherwise, the graph is displayed as is. Default is False.

color: {None, 'order'}, optional :

Options to color nodes. Provide cmap= keyword for additional colormap

**kwargs :

Additional keyword arguments to forward to to_graphviz .

Returns

result : IPython.diplay.Image, IPython.display.SVG, or None

See dask.dot.dot_graph for more information.

Render the computation of this object's task graph using graphviz.

See Also

dask.base.visualize
dask.dot.dot_graph

Examples

This example is valid syntax, but we were not able to check execution
>>> x.visualize(filename='dask.pdf')  # doctest: +SKIP
... x.visualize(filename='dask.pdf', color='order') # doctest: +SKIP
See :

Local connectivity graph

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


File: /dask/base.py#170
type: <class 'function'>
Commit: