Skip to content

Commit

Permalink
OpenVino log warning
Browse files Browse the repository at this point in the history
  • Loading branch information
alexriedel1 committed Jun 21, 2023
1 parent 8797b19 commit 303caae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/anomalib/deploy/inferencers/openvino_inferencer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from importlib.util import find_spec
from pathlib import Path
from typing import Any
import logging

import albumentations as A
import cv2
Expand All @@ -18,10 +19,12 @@

from .base_inferencer import Inferencer

logger = logging.getLogger("anomalib")

if find_spec("openvino") is not None:
from openvino.runtime import Core
else:
raise ImportWarning("OpenVINO is not installed. Please install OpenVINO to use OpenVINOInferencer.")
logger.warning("OpenVINO is not installed. Please install OpenVINO to use OpenVINOInferencer.")


class OpenVINOInferencer(Inferencer):
Expand Down

0 comments on commit 303caae

Please sign in to comment.