inducer / inducer/pytato

Consistency of `show_dot_graph` and `get_num_nodes`

Open
#504 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
15
Forks
16
Avg merge
17m
Merged PRs (30d)
1

Description

A question came up while revisiting #489 with @kajalpatelinfo: should `show_dot_graph` be consistent with `get_num_nodes`, in the sense that the number of nodes displayed in the graph matches what `get_num_nodes` computes? It looks like `show_dot_graph`'s code is based on `CopyMapper`, which ignores duplicates, but currently `get_num_nodes` uses `id(expr)` for a hash key, meaning it counts duplicates separately.

I'm tempted to think they should behave the same, at least by default. It might actually be useful to give them both an option to include/exclude duplicates? Thoughts @inducer?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.