pytorch
c55b425d - [flatbuffer] Bugfix: some class dont have __getstate__ (#76197)

Commit
2 years ago
[flatbuffer] Bugfix: some class dont have __getstate__ (#76197) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/76197 some class only have setstate but not getstate. Those should be able to serialize correctly. Test Plan: by hand `buck run fbcode/mode/dbg xplat/caffe2/fb/lite_predictor:convert_model -- --model=$HOME/models/pytorchmodel_from_manifold.pt --output_name=$HOME/models/pytorchmodel.ff --use_original_bytecode=1` the model above is a .pt file created using version 4 of bytecode. In particular, __setstate__ is serialized there but __getstate__ is not. Reviewed By: pavithranrao Differential Revision: D35827479 fbshipit-source-id: 3d3fdb63d20d41170eac46d076b162d213169f96 (cherry picked from commit 13e966e5c62ce3faf85e8f8fe20e50ad9bb240e5)
Author
Committer
Parents
Loading