Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
onnxscript/ir/passes/common/constant_manipulation.py:54
- [nitpick] The type assertion for node.graph was removed, which may allow unintended types if the invariant is not otherwise enforced. Consider documenting or validating that node.graph is always a Graph as it is set in _core.py.
assert isinstance(node.graph, ir.Graph)
❌ 18 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
xadupre
reviewed
Apr 11, 2025
gramalingam
reviewed
Apr 11, 2025
titaiwangms
reviewed
Apr 14, 2025
|
|
||
| # Add the node to the graph if graph is specified | ||
| if self._graph is not None: | ||
| self._graph.append(self) |
Contributor
There was a problem hiding this comment.
I don't understand how moving these up make any difference?
Collaborator
Author
There was a problem hiding this comment.
I moved it closer to were graph is created so it is more readable.
titaiwangms
approved these changes
Apr 14, 2025
justinchuby
added a commit
that referenced
this pull request
Apr 15, 2025
Implement model.graphs() as a way to retrieve the main graph and all subgraphs of it in the model. Given (1) how useful the method is (2) I couldn't find an appropriate name for it in `traversal.py` (3) Users familiar with onnxruntime optimization tools expect this method. In PyTorch a similar `modules()` method exists. I created this method as a core method instead of an iterator in `traversal.py`. Depends on #2183
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Always assign a
Graphobject to the node's graph.Fix #2181