Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/datasets/iterable_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2194,8 +2194,10 @@ def _prepare_ex_iterable_for_iteration(
self, batch_size: int = 1, drop_last_batch: bool = False
) -> _BaseExamplesIterable:
ex_iterable = self._ex_iterable
if (self._formatting or (self.features and ex_iterable.features != self.features)) and (
ex_iterable.iter_arrow or self._formatting.is_table
if (
self._formatting
and (ex_iterable.iter_arrow or self._formatting.is_table)
or (self.features and ex_iterable.features != self.features)
):
ex_iterable = RebatchedArrowExamplesIterable(
ex_iterable, batch_size=batch_size, drop_last_batch=drop_last_batch
Expand Down
Loading