-
Notifications
You must be signed in to change notification settings - Fork 72
[IR][fix] Implement copy() for graph inputs/outputs #2338
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
Conversation
❌ 5 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Implement the copy()
method for graph inputs/outputs to satisfy torch.onnx.verification
requirements in PyTorch 2.7.
- Add a new
copy()
implementation and remove the_unimplemented
placeholder. - Introduce unit tests for
inputs.copy()
andoutputs.copy()
behavior.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
onnxscript/ir/_graph_containers.py | Implement copy() method returning a shallow list copy and remove the old unimplemented alias. |
onnxscript/ir/_core_test.py | Add test_inputs_copy and test_outputs_copy to verify copy() functionality. |
Comments suppressed due to low confidence (1)
onnxscript/ir/_core_test.py:1317
- [nitpick] Test method names typically follow a verb-object pattern (e.g.,
test_copy_inputs
); consider renaming for consistency with other tests liketest_take_inputs
.
def test_inputs_copy(self):
Implement copy() for graph inputs/outputs because torch.onnx.verification is using it for version torch 2.7.