diff --git a/flash/vision/classification/data.py b/flash/vision/classification/data.py index 766da2460b..fcbfb5e5a1 100644 --- a/flash/vision/classification/data.py +++ b/flash/vision/classification/data.py @@ -245,7 +245,7 @@ def before_collate(self, samples: Any) -> Any: output = self._loader(sample) transform = self._valid_transform if self._use_valid_transform else self._train_transform outputs.append(transform(output)) - except UnidentifiedImageError as e: + except UnidentifiedImageError: print(f'Skipping: could not read file {sample}') return outputs