use else blocks

This commit is contained in:
rickdeu 2023-04-02 21:24:55 +01:00
parent 78c3235eee
commit d02aa2ad8f

View File

@ -73,8 +73,8 @@ class Snapshot:
snapshot.restore(self.state)
# we still need to ensure that extra_state has walltime in it
self.state["extra_state"] = torchsnapshot.StateDict(step=self.step, walltime=0.0)
logging.info(f"Restored snapshot from {snapshot.path}. ({time.time() - start_time:.05}s")
else:
logging.info(f"Restored snapshot from {snapshot.path}. ({time.time() - start_time:.05}s")
@classmethod
def get_torch_snapshot(