diff --git a/python/paddle/fluid/trainer.py b/python/paddle/fluid/trainer.py index b4f719855f4791a081c0ef4a9f06fd816dc65ff6..69577a98fbd5a3b7f26730f4f6fdb518020b2ecf 100644 --- a/python/paddle/fluid/trainer.py +++ b/python/paddle/fluid/trainer.py @@ -425,7 +425,7 @@ class Trainer(object): return self._get_parallel_executor() def _clean_checkpoint(self): - if not self.checkpoint: + if not self.checkpoint and not self.chief: return io.clean_checkpoint(checkpoint_dir=self.checkpoint.checkpoint_dir)