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

Feature request: Data structure to hide details of graph rendering #64

Open
Tracked by #72
sklam opened this issue Jun 12, 2023 · 0 comments
Open
Tracked by #72

Feature request: Data structure to hide details of graph rendering #64

sklam opened this issue Jun 12, 2023 · 0 comments

Comments

@sklam
Copy link
Member

sklam commented Jun 12, 2023

Graph rendering code can be messy. Sometimes we need viz-backend specific logic. It's also hard to test.

The suggestion is to add a AbstractDataType for hiding the details of graph rendering. All it needs is really a set of nodes, edges and node grouping for regions.

Sample implementation in: https://github.com/numba/numba/blob/edfc1b95bf633abb346fbbe265acf2bb20560a6e/numba/core/frontend2/regionrenderer.py#L56

Such a class will also allow us to exercise graph rendering in tests. For instance, the sample implementation has a .verify() method to ensure the graph is wellformed; e.g. edges points to existing locations.

This ADT will allow backend specific code to be isolated: https://github.com/numba/numba/blob/edfc1b95bf633abb346fbbe265acf2bb20560a6e/numba/core/frontend2/regionrenderer.py#L127
Testing for this will be hard to automate but now it's contained in one place without mixing with other logic.

@kc611 kc611 mentioned this issue Jun 19, 2023
6 tasks
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

1 participant