dask 2021.10.0

NotesParametersReturnsBackRef
visualize(*args, **kwargs)

Requires graphviz to be installed. All options that are not the dask graph(s) should be passed as keyword arguments.

Notes

For more information on optimization see here:

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

Parameters

args : dict(s) or collection(s)

The low level dask graph(s) to visualize.

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. colormap - None, the default, no colors. - 'order', colors the nodes' border based on the order they appear in the graph

collapse_outputs : bool, optional

Whether to collapse output boxes, which often have empty labels. Default is False.

verbose : bool, optional

Whether to label output and input boxes even if the data aren't chunked. Beware: these labels can get very long. Default is False.

**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.

Visualize several low level dask graphs at once.

See Also

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 :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

dask.base.DaskMethodsMixin.visualize

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#574
type: <class 'function'>
Commit: