Skip to content
Snippets Groups Projects
Commit 3710c464 authored by Guy Jacob's avatar Guy Jacob
Browse files

Fix exception type being caught in checkpoint load sanity check

parent 2dcf3ff3
No related branches found
No related tags found
No related merge requests found
...@@ -178,7 +178,7 @@ def load_checkpoint(model, chkpt_file, optimizer=None, ...@@ -178,7 +178,7 @@ def load_checkpoint(model, chkpt_file, optimizer=None,
try: try:
if model.arch != checkpoint["arch"]: if model.arch != checkpoint["arch"]:
raise ValueError("The model architecture does not match the checkpoint architecture") raise ValueError("The model architecture does not match the checkpoint architecture")
except (NameError, KeyError): except (AttributeError, KeyError):
# One of the values is missing so we can't perform the comparison # One of the values is missing so we can't perform the comparison
pass pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment