Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
delete loaded ckpt after use to save memory
Summary: Pull Request resolved: facebookresearch#574 Currently, d2go runner doesn't delete checkpoint after loading. This is fine if we run `resume=True` because all the model/optimizer/ema state in the checkpoint will be loaded into the corresponding training components. However, in the case of `resume=False`, only model state will be loaded and the optimizer/ema state will be left in memory until the end of training. This could potentially cause OOM if the checkpoint size is large. This diff deletes loaded ckpt after use to save memory and avoid potentiall OOM issues. Reviewed By: tglik Differential Revision: D46674618 fbshipit-source-id: 2b70a8e46c7f2a309f83cc4deefe5d7a14783734
- Loading branch information