diff --git a/src/datasets/iterable_dataset.py b/src/datasets/iterable_dataset.py index 8d1cefa3e72..02e5d9854d8 100644 --- a/src/datasets/iterable_dataset.py +++ b/src/datasets/iterable_dataset.py @@ -2992,7 +2992,7 @@ def _step(self, step: int, offset: int) -> "IterableDataset": def _resolve_features(self): if self.features is not None: return self - elif isinstance(self._ex_iterable, TypedExamplesIterable): + if isinstance(self._ex_iterable, TypedExamplesIterable): features = self._ex_iterable.features else: features = _infer_features_from_batch(self.with_format(None)._head())