Skip to content

Commit 175b51e

Browse files
committed
Fix spawn plugins not deleting temp checkpoint (#10935)
1 parent fc8d719 commit 175b51e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
1919
- Fixed an issue with item assignment on the logger on rank > 0 for those who support it ([#10917](https://github.com/PyTorchLightning/pytorch-lightning/pull/10917))
2020
- Fixed importing `torch_xla.debug` for `torch-xla<1.8` ([#10836](https://github.com/PyTorchLightning/pytorch-lightning/pull/10836))
2121

22+
- Fixed an issue with `DDPSpawnPlugin` and related plugins leaving a temporary checkpoint behind ([#10934](https://github.com/PyTorchLightning/pytorch-lightning/pull/10934))
23+
2224

2325
## [1.5.4] - 2021-11-30
2426

pytorch_lightning/plugins/training_type/ddp_spawn.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ def __recover_child_process_weights(self, best_path, last_path):
333333
if last_path is not None and self.lightning_module.trainer.state.fn == TrainerFn.FITTING:
334334
ckpt = pl_load(last_path, map_location=lambda storage, loc: storage)
335335
self.lightning_module.load_state_dict(ckpt)
336+
self.checkpoint_io.remove_checkpoint(last_path)
336337

337338
def barrier(self, *args, **kwargs) -> None:
338339
if not distributed_available():

0 commit comments

Comments
 (0)