-
Notifications
You must be signed in to change notification settings - Fork 22.1k
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
Fix PyTorchStreamWriter
exception handling
#88128
Conversation
Avoid double exception in destructor if attempting to serialize to python object that does not have `write` method Use `Finalizer` class in `PyTorchStreamWriter::writeEndOfFile()` to a always set `finailized_` property even if excretion occurs. (as there isn't much one can do at this point) Add expicit check for the attribue to `_open_zipfile_writer_buffer` and add unitests Modernize code a bit by using Python-3 `super()` method Fixes #87997
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/88128
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 FailuresAs of commit 7b8a002: 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.
Sounds good!
@pytorchbot merge -f "torch.nn.convolution failure on ROCM is unrelated" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Avoid double exception in destructor if attempting to serialize to python object that does not have `write` method Use `Finalizer` class in `PyTorchStreamWriter::writeEndOfFile()` to a always set `finailized_` property even if excretion occurs. (as there isn't much one can do at this point) Add expicit check for the attribue to `_open_zipfile_writer_buffer` and add unitests Modernize code a bit by using Python-3 `super()` method Fixes pytorch#87997 Pull Request resolved: pytorch#88128 Approved by: https://github.com/albanD
Avoid double exception in destructor if attempting to serialize to python object that does not have `write` method Use `Finalizer` class in `PyTorchStreamWriter::writeEndOfFile()` to a always set `finailized_` property even if excretion occurs. (as there isn't much one can do at this point) Add expicit check for the attribue to `_open_zipfile_writer_buffer` and add unitests Modernize code a bit by using Python-3 `super()` method Fixes pytorch#87997 Pull Request resolved: pytorch#88128 Approved by: https://github.com/albanD
Avoid double exception in destructor if attempting to serialize to
python object that does not have
write
methodUse
Finalizer
class inPyTorchStreamWriter::writeEndOfFile()
to aalways set
finailized_
property even if excretion occurs. (as thereisn't much one can do at this point)
Add expicit check for the attribue to
_open_zipfile_writer_buffer
andadd unitests
Modernize code a bit by using Python-3
super()
methodFixes #87997