pytorch
410ef133 - [JIT] Add buffer/parameter metadata test to test_save_load.py (#49594)

Commit
3 years ago
[JIT] Add buffer/parameter metadata test to test_save_load.py (#49594) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/49594 **Summary** This commit adds a unit test to `test_save_load.py` that checks that saving and loading a module preserves metadata about which module attributes are parameters and buffers. The hooks that are currently used to automatically check serialization of every function and module in the unit tests check that the archive produced by saving and loading and saving again are the same and that the type tags for the actual IValues representing the module match before saving and after loading. However, these tests do not check that buffer and parameter metadata was not lost or destroyed during serialization. **Test Plan** Ran the new unit test. Test Plan: Imported from OSS Reviewed By: xw285cornell Differential Revision: D25730603 Pulled By: SplitInfinity fbshipit-source-id: 06a202935d9e0654cb1966c34f54707f0a28a331
Author
Meghan Lele
Parents
Loading