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

Commit

Permalink
Add requires(icevision) for loading data (icevision integration)
Browse files Browse the repository at this point in the history
  • Loading branch information
krshrimali committed Oct 26, 2022
1 parent d0eeedc commit 7d067c8
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 7d067c8

Please sign in to comment.