提交 bca4da42 编写于 作者: T tangwei12

cancle only chief delete files

上级 e44c278e
......@@ -499,7 +499,8 @@ def save_checkpoint(executor,
if is_chief:
save_persist_vars_without_grad(executor, cur_dir, main_program)
_lru_delete(checkpoint_dir, max_num_checkpoints)
_lru_delete(checkpoint_dir, max_num_checkpoints)
def need_load_checkpoint(checkpoint_dir):
......
......@@ -425,7 +425,7 @@ class Trainer(object):
return self._get_parallel_executor()
def _clean_checkpoint(self):
if not self.checkpoint and not self.chief:
if not self.checkpoint:
return
io.clean_checkpoint(checkpoint_dir=self.checkpoint.checkpoint_dir)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册