Skip to content

Commit

Permalink
Fix the checkpoint directory cleaning (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
l-k-11235 authored Jun 7, 2024
1 parent 9a299df commit 60fbbe4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eole/models/model_saver.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ def __init__(
def cleanup(self):
if self.keep_checkpoint > 0:
if len(self.checkpoint_queue) == self.checkpoint_queue.maxlen:
step_dir_to_delete = self.checkpoint_queue.popleft()
step_dir_to_delete = os.path.join(
self.model_path, self.checkpoint_queue.popleft()
)
shutil.rmtree(step_dir_to_delete)
self.checkpoint_queue.append(self.step_dir)

Expand Down

0 comments on commit 60fbbe4

Please sign in to comment.