-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Re-enable passing BytesIO as path in .to_onnx()
#20172
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #20172 +/- ##
=========================================
- Coverage 88% 81% -7%
=========================================
Files 267 264 -3
Lines 23076 23023 -53
=========================================
- Hits 20280 18613 -1667
- Misses 2796 4410 +1614 |
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 a lot for the PR! To complete it, we need to add a test. Could we extend the same test as in #19727 by passing in a bytes io? Let me know if you need help with that.
file_path
is Path instance. (fix #20171)file_path
is Path instance
… with bytesio as `to_onnx` input argument.
Hi @awaelchli |
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.
That looks great, thanks for adding the test!
file_path
is Path instance.to_onnx()
(cherry picked from commit 828fd99)
(cherry picked from commit 828fd99)
What does this PR do?
Fixes #20171
In
to_onnx
, only convertfile_path
to string when its aPath
instance, and keepio.BytesIO
intact and pass it totorch.export.onnx
.Before submitting
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:
Reviewer checklist
📚 Documentation preview 📚: https://pytorch-lightning--20172.org.readthedocs.build/en/20172/