forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[package] Allow save_module to accept module as arg (pytorch#55996)
Summary: Pull Request resolved: pytorch#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 pytorch#55939. Test Plan: Imported from OSS Reviewed By: jamesr66a, huiguoo Differential Revision: D27771781 Pulled By: SplitInfinity fbshipit-source-id: 57c8cf45575bb8dcfca711759fadfff72efb35e7
- Loading branch information
1 parent
1a116a9
commit 669a8ac
Showing
2 changed files
with
32 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters