Skip to content

Commit

Permalink
lazy import openvino
Browse files Browse the repository at this point in the history
Signed-off-by: Isotr0py <[email protected]>
  • Loading branch information
Isotr0py committed Nov 23, 2024
1 parent 945c5b5 commit cad6158
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions vllm/platforms/openvino.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from typing import TYPE_CHECKING

import openvino as ov
import openvino.properties.hint as hints
import torch

import vllm.envs as envs
Expand All @@ -16,6 +14,12 @@

logger = init_logger(__name__)

try:
import openvino as ov
import openvino.properties.hint as hints
except ImportError as e:
logger.warning("Failed to import OpenVINO with %r", e)


class OpenVinoPlatform(Platform):
_enum = PlatformEnum.OPENVINO
Expand Down

0 comments on commit cad6158

Please sign in to comment.