pytorch/caffe2/serialize
Nikita Shulga caaf37a111 Fix PyTorchStreamWriter exception handling (#88128)
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 https://github.com/pytorch/pytorch/issues/87997

Pull Request resolved: https://github.com/pytorch/pytorch/pull/88128
Approved by: https://github.com/albanD
2022-10-31 23:38:03 +00:00
..
CMakeLists.txt Updating miniz library from version 2.0.8 -> 2.1.0 (#79636) 2022-06-22 15:02:16 +00:00
crc_alt.h Enable win-arm64 2022-02-28 17:17:56 +00:00
crc.cc Forbid trailing whitespace (#53406) 2021-03-05 17:22:55 -08:00
file_adapter.cc [easy][PyTorchEdge] print error message when failing to load model file (#63404) 2021-08-17 22:27:49 -07:00
file_adapter.h [Prototype] [PyTorch Edge] Speed up model loading by 12% by directly calling the C file API from FileAdapter (#61997) 2021-07-29 20:14:49 -07:00
in_memory_adapter.h [BE][flatbuffer] Remove code duplications and refactor (#79184) 2022-06-20 16:37:38 +00:00
inline_container_test.cc Fix sign-compare in caffe2 cpp tests 2022-04-05 00:08:05 +00:00
inline_container.cc Fix PyTorchStreamWriter exception handling (#88128) 2022-10-31 23:38:03 +00:00
inline_container.h Fix PyTorchStreamWriter exception handling (#88128) 2022-10-31 23:38:03 +00:00
istream_adapter.cc Make PyTorch code-base clang-tidy compliant (#56892) 2021-04-28 14:10:25 -07:00
istream_adapter.h [caffe2] fixes to allow stricter compilation flag (#64016) 2021-08-27 10:38:37 -07:00
read_adapter_interface.cc Make PyTorch code-base clang-tidy compliant (#56892) 2021-04-28 14:10:25 -07:00
read_adapter_interface.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
versions.h Get rid of ENABLE_UPGRADERS macro (#77574) 2022-08-09 05:33:14 +00:00