Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Raise better error if icevision not installed if module isn't found (loading data) #1474

Merged
merged 2 commits into from
Nov 4, 2022
Merged
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion flash/core/integrations/icevision/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -33,6 +33,7 @@ class IceVisionInput(Input):
num_classes: int
labels: list

@requires("icevision")
def load_data(
self,
root: str,
Expand Down