Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
francoishernandez committed Jan 29, 2025
1 parent f2d4931 commit daafc42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eole/inputters/text_corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ class ParallelCorpusIterator(object):
offset (int): iterate corpus with this line offset.
"""

def __init__(self, corpus, transform, skip_empty_level="warning", stride=1, offset=0):
def __init__(self, corpus, transform, skip_empty_level="warning", stride=1, offset=0, is_train=False):
self.cid = corpus.id
self.corpus = corpus
self.transform = transform
Expand Down Expand Up @@ -425,7 +425,7 @@ def build_corpora_iters(corpora, transforms, corpora_info, skip_empty_level="war
skip_empty_level=skip_empty_level,
stride=stride,
offset=offset,
is_train=corpus.is_train,
is_train=getattr(corpus, "is_train", None),
)
corpora_iters[c_id] = corpus_iter
return corpora_iters
Expand Down

0 comments on commit daafc42

Please sign in to comment.