mirror of
https://github.com/twitter/the-algorithm-ml.git
synced 2025-01-08 22:20:40 +01:00
use else blocks
This commit is contained in:
parent
78c3235eee
commit
d02aa2ad8f
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user