[tune] fix pbt checkpoint_freq (#9517)

* Only delete old checkpoint if it is not the same as the new one

* Return early if old checkpoint value coincides with new checkpoint value

Co-authored-by: Kai Fricke <kai@anyscale.com>
This commit is contained in:
krfricke
2020-07-18 00:58:16 -07:00
committed by GitHub
co-authored by Kai Fricke
parent b12b8e1324
commit ad0219b80d
3 changed files with 102 additions and 0 deletions
+4
View File
@@ -109,6 +109,10 @@ class CheckpointManager:
return
old_checkpoint = self.newest_persistent_checkpoint
if old_checkpoint.value == checkpoint.value:
return
self.newest_persistent_checkpoint = checkpoint
# Remove the old checkpoint if it isn't one of the best ones.