Skip to content

Conversation

malfet
Copy link
Contributor

@malfet malfet commented Oct 31, 2022

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

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
@pytorch-bot
Copy link

pytorch-bot bot commented Oct 31, 2022

🔗 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 Failures

As of commit 7b8a002:

The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the release notes: jit release notes category label Oct 31, 2022
@malfet malfet requested review from albanD, ezyang and zou3519 October 31, 2022 19:53
Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good!

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 31, 2022
@malfet
Copy link
Contributor Author

malfet commented Oct 31, 2022

@pytorchbot merge -f "torch.nn.convolution failure on ROCM is unrelated"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@malfet malfet deleted the malfet/fix-torch.save branch November 4, 2022 04:30
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Nov 5, 2022
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
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Dec 10, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged release notes: jit release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash while handling torch.save exception

3 participants