-
Notifications
You must be signed in to change notification settings - Fork 24.4k
[ONNX] Remove special handling of torchvision.ops imports in onnx export #141569
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
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/141569
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit fc26914 with merge base 9dd3b85 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
This will remove support for the torch vision ops, right? Is that intended?
Ok sorry. I think what should be done instead is to remove "ops." from the get attr line |
@justinchuby I tested this locally, and it actually fixes the bug. We do have torchvision::nms. It's the bug in registration that we wrongly registered it under the function nms itself. In here, it will register torchvision::nms symbolic function under nms function itself because that's what we get from |
@Bludator Do you mind adding your repro as a test here: https://github.com/titaiwangms/pytorch/blob/main/test/onnx/exporter/test_small_models_e2e.py 8000 |
thank you! |
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.
LGTM if torch.ops.torchvision.* is defined
Is the torchvision installed in the test environment? |
I believe so. We have torchvision tests for legacy torchscript exporter. |
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.
Thanks!
Co-authored-by: Ti-Tai Wang <titaiwang@microsoft.com>
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 mandatory check(s) failed. The first few are: Dig deeper by viewing the failures on hud |
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 mandatory check(s) failed. The first few are: Dig deeper by viewing the failures on hud |
Now it should work, I had broken environment so I didn't properly test it. |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 3 mandatory check(s) failed. The first few are: Dig deeper by viewing the failures on hud |
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…ort (pytorch#141569) Fixes pytorch#141568 Pull Request resolved: pytorch#141569 Approved by: https://github.com/titaiwangms Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com> Co-authored-by: Ti-Tai Wang <titaiwang@microsoft.com>
Fixes #141568