def has_checkpoint(self): """ Returns: bool: whether a checkpoint exists in the target directory. """ save_file = os.path.join(self.save_dir, "last_checkpoint") return PathManager.exists(save_file)
def has_checkpoint(self): save_file = os.path.join(self.save_dir, f"last_weight_{self.rank:02d}") return PathManager.exists(save_file)