pytorch/torch/csrc/jit/python
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
..
init.cpp Fix PyTorchStreamWriter exception handling (#88128) 2022-10-31 23:38:03 +00:00
init.h
module_python.h Improve torch::jit::as_{module,object} performance (#84399) 2022-09-07 16:58:28 +00:00
pybind_utils.cpp Unify SymIntNode and SymFloatNode into SymNode (#87817) 2022-10-27 20:56:02 +00:00
pybind_utils.h Fix: prefer .is_none() over .is(py::none()) for pybind11 (#88051) 2022-10-31 16:41:27 +00:00
pybind.h
python_arg_flatten.cpp
python_arg_flatten.h
python_custom_class.cpp
python_custom_class.h
python_dict.cpp Revert "Revert "Add a lint rule for torch/csrc/util/pybind.h include (#82552)"" (#82599) 2022-08-02 19:37:02 +00:00
python_dict.h
python_interpreter.cpp Revert "Revert "Add a lint rule for torch/csrc/util/pybind.h include (#82552)"" (#82599) 2022-08-02 19:37:02 +00:00
python_ir.cpp [ONNX] Partially re-enable RoiAlign and RoiPool unit tests (#86169) 2022-10-13 14:39:44 +00:00
python_ir.h
python_ivalue.h Revert "Revert "Add a lint rule for torch/csrc/util/pybind.h include (#82552)"" (#82599) 2022-08-02 19:37:02 +00:00
python_list.cpp Revert "Revert "Add a lint rule for torch/csrc/util/pybind.h include (#82552)"" (#82599) 2022-08-02 19:37:02 +00:00
python_list.h
python_sugared_value.cpp Fix: prefer .is_none() over .is(py::none()) for pybind11 (#88051) 2022-10-31 16:41:27 +00:00
python_sugared_value.h [ROCm] Enable/fix unit tests test_stream_args and test_event_args (#82346) 2022-08-01 22:55:15 +00:00
python_tracer.cpp Support unpacking python dictionary in torch.jit.trace() (#81623) 2022-10-15 05:33:09 +00:00
python_tracer.h Support unpacking python dictionary in torch.jit.trace() (#81623) 2022-10-15 05:33:09 +00:00
python_tree_views.cpp
python_tree_views.h
script_init.cpp Fix: prefer .is_none() over .is(py::none()) for pybind11 (#88051) 2022-10-31 16:41:27 +00:00
script_init.h
update_graph_executor_opt.cpp
update_graph_executor_opt.h