Skip to content

Commit

Permalink
Update ofa_task.py
Browse files Browse the repository at this point in the history
  • Loading branch information
logicwong committed Jul 6, 2022
1 parent 630e193 commit 1d6c444
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/ofa_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def get_batch_iterator(
total_row_count = dataset.dataset.get_total_row_count()
num_batches = math.ceil(math.ceil(total_row_count / num_shards) / max_sentences)
if len(batch_sampler) < num_batches:
batch_sampler.append([1])
batch_sampler.append([])

# return a reusable, sharded iterator
epoch_iter = iterators.EpochBatchIterator(
Expand Down

0 comments on commit 1d6c444

Please sign in to comment.