Skip to content

Commit

Permalink
Added missing arguments to multilingual_translation_sampled get_batch…
Browse files Browse the repository at this point in the history
…_iterator.
  • Loading branch information
taidopurason committed Nov 26, 2021
1 parent 59054f2 commit 7093ca2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fairseq/tasks/multilingual_translation_sampled.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ def get_batch_iterator(
epoch=1,
data_buffer_size=0,
disable_iterator_cache=False,
skip_remainder_batch=False,
grouped_shuffling=False,
update_epoch_batch_itr=False,
):
"""
Get an iterator that yields batches of data from the given dataset.
Expand Down Expand Up @@ -252,6 +255,11 @@ def get_batch_iterator(
disable_iterator_cache (bool, optional): don't cache the
EpochBatchIterator (ignores `FairseqTask::can_reuse_epoch_itr`)
(default: False).
grouped_shuffling (bool, optional): group batches with each groups
containing num_shards batches and shuffle groups. Reduces difference
between sequence lengths among workers for batches sorted by length.
update_epoch_batch_itr (bool optional): if true then donot use the cached
batch iterator for the epoch
Returns:
~fairseq.iterators.EpochBatchIterator: a batched iterator over the
given dataset split
Expand All @@ -275,6 +283,9 @@ def get_batch_iterator(
epoch=epoch,
data_buffer_size=data_buffer_size,
disable_iterator_cache=disable_iterator_cache,
skip_remainder_batch=False,
grouped_shuffling=False,
update_epoch_batch_itr=False,
)
self.dataset_to_epoch_iter[dataset] = batch_iter
return batch_iter
Expand Down

0 comments on commit 7093ca2

Please sign in to comment.