Sri Sudarsan
03/12/2025, 9:18 AMMarvin
03/12/2025, 9:19 AMvisualize
method from the flow object. This method generates a graphviz object representing the current flow. If you're using an IPython notebook, it should render inline, otherwise, it will open a new window as a PNG.
Here are some steps you can follow:
1. Ensure that graphviz
is installed on your system. You can install it via pip:
bash
pip install graphviz
2. Use the visualize
method on your flow:
python
from prefect import flow
@flow
def my_flow():
# Define tasks here
my_flow.visualize()
3. If you're still facing issues, make sure the dot
executable from Graphviz is in your system's PATH.
For more details, you can refer to the Prefect documentation on visualizing flow structure.
Additionally, Prefect 3.x includes several changes that might affect how you're used to working with Prefect 2.x. For example, agents are replaced by workers, and work pools replace infrastructure blocks. You can find more about these changes in the Prefect 3.x gotchas.Sri Sudarsan
03/12/2025, 9:21 AMMarvin
03/12/2025, 9:22 AMvisualize
method on your flow object to generate a visual representation of your flow. This won't automatically display upon completion but can be invoked as needed.
For more details, you can explore the Prefect documentation or the Prefect UI. Here's a link to the Prefect documentation for further exploration.