Skip to content

Commit

Permalink
fix dummy batch (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
guolinke committed Jun 8, 2024
1 parent bcf247c commit 8cc441a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion unicore/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,9 @@ def get_valid_iterator(
data_buffer_size=self.args.data_buffer_size,
disable_iterator_cache=disable_iterator_cache,
)
self.reset_dummy_batch(batch_iterator.first_batch)
# Using training data for dummy batch. If the following line is enabled, the dummy batch will be from validation data,
# and cause OOM error for some corner case during training. So disable it.
# self.reset_dummy_batch(batch_iterator.first_batch)
return batch_iterator

def begin_epoch(self, epoch):
Expand Down

0 comments on commit 8cc441a

Please sign in to comment.