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

Method visualize

dask/typing.py:350–401  ·  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: str = "mydask",
        format: str | None = None,
        optimize_graph: bool = False,
        **kwargs: Any,
    )

Source from the content-addressed store, hash-verified

348
349 @abc.abstractmethod
350 def visualize(
351 self,
352 filename: str = "mydask",
353 format: str | None = None,
354 optimize_graph: bool = False,
355 **kwargs: Any,
356 ) -> DisplayObject | None:
357 """Render the computation of this object's task graph using graphviz.
358
359 Requires ``graphviz`` to be installed.
360
361 Parameters
362 ----------
363 filename : str or None, optional
364 The name of the file to write to disk. If the provided
365 `filename` doesn't include an extension, '.png' will be
366 used by default. If `filename` is None, no file will be
367 written, and we communicate with dot using only pipes.
368 format : {'png', 'pdf', 'dot', 'svg', 'jpeg', 'jpg'}, optional
369 Format in which to write output file. Default is 'png'.
370 optimize_graph : bool, optional
371 If True, the graph is optimized before rendering.
372 Otherwise, the graph is displayed as is. Default is False.
373 color: {None, 'order'}, optional
374 Options to color nodes. Provide ``cmap=`` keyword for
375 additional colormap
376 **kwargs
377 Additional keyword arguments to forward to ``to_graphviz``.
378
379 Examples
380 --------
381 >>> x.visualize(filename='dask.pdf') # doctest: +SKIP
382 >>> x.visualize(filename='dask.pdf', color='order') # doctest: +SKIP
383
384 Returns
385 -------
386 result : IPython.display.Image, IPython.display.SVG, or None
387 See dask.dot.dot_graph for more information.
388
389 See Also
390 --------
391 dask.visualize
392 dask.dot.dot_graph
393
394 Notes
395 -----
396 For more information on optimization see here:
397
398 https://docs.dask.org/en/latest/optimize.html
399
400 """
401 raise NotImplementedError("Inheriting class must implement this method.")
402
403
404@runtime_checkable

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected