Skip to content

Commit 0e6fbfd

Browse files
authored
More explicit what training data path is expected (#1715)
1 parent f5c9cd4 commit 0e6fbfd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

onmt/inputters/inputter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -822,11 +822,12 @@ def build_dataset_iter(corpus_type, fields, opt, is_train=True, multi=False):
822822
to iterate over. We implement simple ordered iterator strategy here,
823823
but more sophisticated strategy like curriculum learning is ok too.
824824
"""
825+
dataset_glob = opt.data + '.' + corpus_type + '.[0-9]*.pt'
825826
dataset_paths = list(sorted(
826-
glob.glob(opt.data + '.' + corpus_type + '.[0-9]*.pt')))
827+
glob.glob(dataset_glob)))
827828
if not dataset_paths:
828829
if is_train:
829-
raise ValueError('Training data %s not found' % opt.data)
830+
raise ValueError('Training data %s not found' % dataset_glob)
830831
else:
831832
return None
832833
if multi:

0 commit comments

Comments
 (0)