Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds check for FSPDOptimizer wrapper (#788)
Summary: Pull Request resolved: #788 DCP expects the entire optimizer to be initialized in the state dict before calling load. Unfortunately, since optimizers are sometimes lazy loaded, this means dcp_saver has to do a check for optimizer objects and ensure they are properly initialized. This diff adds a check for optimizers which are hidden inside wrappers. An alternative to this would be to implement in the FSDP wrapper in under utils/prepare_module, but I found that change to be higher risk, and then we'd also have the change in both places. ghstack-source-id: 222855240 exported-using-ghexport Reviewed By: JKSenthil Differential Revision: D56075363 fbshipit-source-id: 68a4086ce322d9453bdd7954d56a455163d7189e
- Loading branch information