Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualization improvements #526

Open
majosm opened this issue Jul 22, 2024 · 4 comments
Open

Visualization improvements #526

majosm opened this issue Jul 22, 2024 · 4 comments

Comments

@majosm
Copy link
Collaborator

majosm commented Jul 22, 2024

I just wanted to brainstorm some ideas here for improving visualization of large DAGs, with the intent of possibly finding one or more improvements that @kajalpatelinfo could work on while she's still with us for the summer.

I don't know if there have been any past discussions about this; at least I didn't see anything while browsing through past issues. I have a couple of vague ideas for improvements that I think would be useful. However, I'm not very familiar with the visualization code, so I don't have a sense of how difficult they would be to implement. Here they are in any case:

  1. Collapsing subexpressions. I'm picturing tagging a node that represents the result of some calculation (temperature, RHS, whatever), and then collapsing all of the nodes that go into that calculation into one visualization node. (How it would decide what exactly to collapse, I'm not 100% sure. Maybe something along the lines of collapsing a node if all of the nodes that depend on it are also part of the collapsed set? Might require a different traversal order than what we usually do with mappers.)
  2. Coloring nodes. If one wants to find a certain node in the DAG easily, they could tag it to be colored a certain way just before calling show_dot_graph.

Any thoughts @inducer, @kaushikcfd? I'd be interested in hearing about any other visualization ideas you've thought of as well.

@majosm
Copy link
Collaborator Author

majosm commented Jul 22, 2024

@matthiasdiener too 🙂

@matthiasdiener
Copy link
Collaborator

I remember that @kaushikcfd had code that would only show the type of node (with different node colors and shapes), without the metadata like id, tags, etc. I think this can be helpful when visualizing large DAGs.

@inducer
Copy link
Owner

inducer commented Jul 23, 2024

My main problem with the current visualization is that it's incredibly verbose. IMO, ideally, a node adding two arrays would look like this:

grafik

with everything else in a tooltip that can pop up on request. (That is something that graphviz supports.)

@nkoskelo
Copy link
Contributor

nkoskelo commented Aug 2, 2024

In using show_dot_graph, I notice that there are times that the information about an individual operation can sometimes extend over the bounding box drawn for the operation. I like @inducer's request to make the information appear as a pop up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants