From 1d6c444cb613af3d3395110c5688f272e3041fff Mon Sep 17 00:00:00 2001 From: Wang Peng <36780733+logicwong@users.noreply.github.com> Date: Wed, 6 Jul 2022 13:33:55 +0800 Subject: [PATCH] Update ofa_task.py --- tasks/ofa_task.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/ofa_task.py b/tasks/ofa_task.py index 45fc1fa8..2771d351 100644 --- a/tasks/ofa_task.py +++ b/tasks/ofa_task.py @@ -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(