Skip to content

Commit

Permalink
[Release] Parse OV version on demand (#3247)
Browse files Browse the repository at this point in the history
### Changes

Follow-up to #3233 . Fix an issue arising during documentation building.

### Reason for changes

Caught here:
https://github.com/openvinotoolkit/nncf/actions/runs/13131916886/job/36638718655
. This test is run on PRs to develop only. That's why it was not caught
during merging to release branch.

### Tests

https://github.com/openvinotoolkit/nncf/actions/runs/13132576726/job/36640708447?pr=3246
  • Loading branch information
nikita-savelyevv authored Feb 4, 2025
1 parent f94cd1e commit 909544d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nncf/common/utils/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import openvino # type: ignore # noqa: F401

_OPENVINO_AVAILABLE = True
_OPENVINO_VERSION = version.parse(openvino.__version__.split("-")[0])
except ImportError:
_OPENVINO_AVAILABLE = False

Expand Down Expand Up @@ -189,4 +188,5 @@ def is_openvino_at_least(version_str: str) -> bool:
if not _OPENVINO_AVAILABLE:
return False

return version.parse(version_str) <= _OPENVINO_VERSION
openvino_version = version.parse(openvino.__version__.split("-")[0])
return version.parse(version_str) <= openvino_version

0 comments on commit 909544d

Please sign in to comment.