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

Method visualize

dask/base.py:274–324  ·  view source on GitHub ↗

Render the computation of this object's task graph using graphviz. Requires ``graphviz`` to be installed. Parameters ---------- filename : str or None, optional The name of the file to write to disk. If the provided `filename` doesn't include

(self, filename="mydask", format=None, optimize_graph=False, **kwargs)

Source from the content-addressed store, hash-verified

272 __slots__ = ("__weakref__",)
273
274 def visualize(self, filename="mydask", format=None, optimize_graph=False, **kwargs):
275 """Render the computation of this object's task graph using graphviz.
276
277 Requires ``graphviz`` to be installed.
278
279 Parameters
280 ----------
281 filename : str or None, optional
282 The name of the file to write to disk. If the provided `filename`
283 doesn't include an extension, '.png' will be used by default.
284 If `filename` is None, no file will be written, and we communicate
285 with dot using only pipes.
286 format : {'png', 'pdf', 'dot', 'svg', 'jpeg', 'jpg'}, optional
287 Format in which to write output file. Default is 'png'.
288 optimize_graph : bool, optional
289 If True, the graph is optimized before rendering. Otherwise,
290 the graph is displayed as is. Default is False.
291 color: {None, 'order'}, optional
292 Options to color nodes. Provide ``cmap=`` keyword for additional
293 colormap
294 **kwargs
295 Additional keyword arguments to forward to ``to_graphviz``.
296
297 Examples
298 --------
299 >>> x.visualize(filename='dask.pdf') # doctest: +SKIP
300 >>> x.visualize(filename='dask.pdf', color='order') # doctest: +SKIP
301
302 Returns
303 -------
304 result : IPython.display.Image, IPython.display.SVG, or None
305 See dask.dot.dot_graph for more information.
306
307 See Also
308 --------
309 dask.visualize
310 dask.dot.dot_graph
311
312 Notes
313 -----
314 For more information on optimization see here:
315
316 https://docs.dask.org/en/latest/optimize.html
317 """
318 return visualize(
319 self,
320 filename=filename,
321 format=format,
322 optimize_graph=optimize_graph,
323 **kwargs,
324 )
325
326 def persist(self, **kwargs):
327 """Persist this dask collection into memory

Callers

nothing calls this directly

Calls 1

visualizeFunction · 0.70

Tested by

no test coverage detected