Skip to content

Commit

Permalink
Give path when checkpoint can't be found (facebookresearch#1040)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebookresearch#1040

Pull Request resolved: fairinternal/fairseq-py#836

Reviewed By: myleott, liezl200

Differential Revision: D16889252

fbshipit-source-id: 45a1b6c1217fb099f0350096e38e1c7d83ea0a64
  • Loading branch information
aryamccarthy authored and facebook-github-bot committed Aug 20, 2019
1 parent 4812f64 commit 9e5edc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fairseq/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ def load_checkpoint(
self.get_model().load_state_dict(state['model'], strict=True)
except Exception:
raise Exception(
'Cannot load model parameters from checkpoint, '
'please ensure that the architectures match.'
'Cannot load model parameters from checkpoint {}; '
'please ensure that the architectures match.'.format(filename)
)

extra_state = state['extra_state']
Expand Down

0 comments on commit 9e5edc1

Please sign in to comment.