Skip to content

Commit

Permalink
check vocab files exist at start of preprocessing (OpenNMT#1396)
Browse files Browse the repository at this point in the history
  • Loading branch information
awavefunction authored and vince62s committed Apr 12, 2019
1 parent f7fc40e commit d3d280e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions onmt/utils/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,8 @@ def validate_preprocess_args(cls, opt):
"Please check path of your valid src file!"
assert not opt.valid_tgt or os.path.isfile(opt.valid_tgt), \
"Please check path of your valid tgt file!"

assert not opt.src_vocab or os.path.isfile(opt.src_vocab), \
"Please check path of your src vocab!"
assert not opt.tgt_vocab or os.path.isfile(opt.tgt_vocab), \
"Please check path of your tgt vocab!"

0 comments on commit d3d280e

Please sign in to comment.