Hi there again - I remember reading somewhere in t...
# prefect-community
Hi there again - I remember reading somewhere in the docs about "hiding" inputs for visualizations. Can't seem to find it. Can you point me to the docs or show an example? Thanks again. Keep up the good work.
Hi itay -
will always display all tasks within your flow. You might be referring to Prefect’s auto-generated tasks (e.g., if you provide a standard python dictionary as an input to a task, prefect will create tasks for every key, value, etc.) There is some information here: https://docs.prefect.io/core/tutorials/task-guide.html#adding-tasks-to-flows on how to avoid this auto-generation
thank you
@itay livni fyi I wanted to do the same recently and ended up manually dropping all the tasks/edges I didn’t want to see before plotting, seems to work ok:
Copy code
to_viz = flow.copy()
to_skip = {'Constant', '/', 'Add', 'Div', '1.0', 'GetItem', '0'}
to_viz.edges = {edge for edge in to_viz.edges if not any(s in task.name for task in edge.tasks for s in to_skip)}
to_viz.tasks = {task for task in to_viz.tasks if not any(s in task.name for s in to_skip)}
@Brett Naul That is really neat! I can see generating two visualizations. One being an outline\summary of the
. And the other being a detailed view. Self documenting code 🙂