Graphviz Runner

class forml.provider.runner.graphviz.Runner(instance: asset.Instance | None = None, feed: io.Feed | None = None, sink: io.Sink | None = None, filepath: str | Path | None = None, view: bool = True, **options: Any)[source]

Bases: Runner

(Pseudo)runner using the Graphviz drawing software for rendering graphical visualization of the workflow task graph.

The workflow obviously does not get really executed!

For better readability, the runner is using the following shapes to plot the different objects:

Shape

Meaning

Square box

Actor in train mode.

Round box

Actor in apply mode.

Ellipse

System actor for output port selection.

Cylinder

System actor for state persistence.

Solid edge

Data transfer.

Dotted edge

State transfer.

Parameters:
filepath: str | Path | None = None

Target path for producing the DOT file.

view: bool = True

If True, open the rendered result with the default application.

**options: Any

Any of the supported (and non-colliding) graphviz.Digraph keyword arguments.

The provider can be enabled using the following platform configuration:

config.toml
 [RUNNER.visual]
 provider = "graphviz"
 format = "svg"
 engine = "dot"
 graph_attr = { rankdir = "LR", bgcolor = "transparent" }
 node_attr = { nodesep = "0.75", ranksep = "0.75" }
 edge_attr = { weight = "1.2" }

Important

Select the graphviz extras to install ForML together with the Graphviz support. Additionally, download and install also the native Graphviz system binary (OS specific procedure).