diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a77d72ec0..024a1413b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ### Fixed +- Fixed the error message to suggest installing `icevision`, if it's not found while loading data ([#1474](https://github.com/Lightning-AI/lightning-flash/pull/1474)) - Fixed compatibility with `torchmetrics==1.10.0` ([#1469](https://github.com/Lightning-AI/lightning-flash/pull/1469)) diff --git a/flash/core/integrations/icevision/data.py b/flash/core/integrations/icevision/data.py index 81ce73782d..569e20fb01 100644 --- a/flash/core/integrations/icevision/data.py +++ b/flash/core/integrations/icevision/data.py @@ -20,7 +20,7 @@ from flash.core.data.utilities.loading import IMG_EXTENSIONS, load_image, NP_EXTENSIONS from flash.core.data.utilities.paths import list_valid_files from flash.core.integrations.icevision.transforms import from_icevision_record -from flash.core.utilities.imports import _ICEVISION_AVAILABLE +from flash.core.utilities.imports import _ICEVISION_AVAILABLE, requires if _ICEVISION_AVAILABLE: from icevision.core.record import BaseRecord @@ -33,6 +33,7 @@ class IceVisionInput(Input): num_classes: int labels: list + @requires("icevision") def load_data( self, root: str,