From 303caaea11836481ae98e098ac4621c7b1a8a132 Mon Sep 17 00:00:00 2001 From: alexriedel1 Date: Wed, 21 Jun 2023 18:13:08 +0200 Subject: [PATCH] OpenVino log warning --- src/anomalib/deploy/inferencers/openvino_inferencer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/anomalib/deploy/inferencers/openvino_inferencer.py b/src/anomalib/deploy/inferencers/openvino_inferencer.py index 3edc04cdb9..bcf8cb5019 100644 --- a/src/anomalib/deploy/inferencers/openvino_inferencer.py +++ b/src/anomalib/deploy/inferencers/openvino_inferencer.py @@ -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 @@ -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):