Skip to content

Commit

Permalink
Update ofa_task.py
Browse files Browse the repository at this point in the history
  • Loading branch information
logicwong authored Jun 23, 2022
1 parent a742ad2 commit 630e193
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([])
batch_sampler.append([1])

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

0 comments on commit 630e193

Please sign in to comment.