pytorch
669a8acc - [package] Allow save_module to accept module as arg (#55996)

Commit
3 years ago
[package] Allow save_module to accept module as arg (#55996) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/55996 **Sumamary** This commit modifies `PackageExporter.save_module` so that the `module` argument can be either a string (`str`) or a module (`types.ModuleType`). **Test Plan** This commit adds a unit test similar to `TestSaveLoad.test_save_module` that tests that calling `save_module` with a module object works. **Fixes** This commit fixes #55939. Test Plan: Imported from OSS Reviewed By: jamesr66a, huiguoo Differential Revision: D27771781 Pulled By: SplitInfinity fbshipit-source-id: 57c8cf45575bb8dcfca711759fadfff72efb35e7
Author
Meghan Lele
Parents
Loading