-
Notifications
You must be signed in to change notification settings - Fork 10
Adding Flow Visualization for Prefect
Gaurang Katre edited this page Jan 22, 2022
·
1 revision
Now you have created a Prefect (perhaps perfect) Flow but sometimes wonder how the tasks interact with one another...now there is a way to visually see a schematic of how the task-graph looks like
How to add Graphical Flow Visualization for Prefect
Steps:
- add the
graphviz
as a dev-package in the PRPipfile
. Note: this may have already been done in thePipfile
gitrepo and you may only need to update your pipenv local development environment withpipenv update
- the
graphviz
executable will also be needed to see the Flow Visualizations. Find the install instructions for your local workstation here: (install graphviz) - to see the cool visualizations for your Flow, use
flow.visualize()
as shown in this example:
from prefect import Flow, Parameter
with Flow("math") as f:
x, y = Parameter("x"), Parameter("y")
a = x + y
f.visualize()
A visualization example with graphviz
:
Flow visualization with task dependencies