From 7d067c8c8d42bfdd861c0c77d1b27d816d93b2f2 Mon Sep 17 00:00:00 2001 From: Kushashwa Ravi Shrimali Date: Wed, 26 Oct 2022 13:44:04 +0530 Subject: [PATCH] Add requires(icevision) for loading data (icevision integration) --- flash/core/integrations/icevision/data.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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,