Skip to content

Commit

Permalink
Allow openvino-nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
helena-intel committed Oct 31, 2023
1 parent 87da8b0 commit 0538b49
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/test_openvino.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,9 @@ jobs:
- name: Test with Pytest
run: |
pytest tests/openvino/ --ignore test_modeling_basic
- name: Test openvino-nightly import
run: |
pip uninstall -y openvino
pip install openvino-nightly
python -c "from optimum.intel import OVModelForCausalLM; OVModelForCausalLM.from_pretrained('hf-internal-testing/tiny-random-gpt2', export=True, compile=False)"
5 changes: 4 additions & 1 deletion optimum/intel/utils/import_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@
try:
_openvino_version = importlib_metadata.version("openvino")
except importlib_metadata.PackageNotFoundError:
_openvino_available = False
try:
_openvino_version = importlib_metadata.version("openvino-nightly")
except importlib_metadata.PackageNotFoundError:
_openvino_available = False


_nncf_available = importlib.util.find_spec("nncf") is not None
Expand Down

0 comments on commit 0538b49

Please sign in to comment.