Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow openvino-nightly #466

Merged
merged 1 commit into from
Nov 2, 2023
Merged

Allow openvino-nightly #466

merged 1 commit into from
Nov 2, 2023

Conversation

helena-intel
Copy link
Collaborator

OpenVINO recently added nightly releases: https://pypi.org/project/openvino-nightly/
This currently doesn't work well with optimum-intel, because import_utils expects a package named "openvino". This PR fixes that.

$ python -c "from optimum.intel import OVModelForCausalLM; OVModelForCausalLM.from_pretrained('hf-internal-testing/tiny-random-gpt2', export=True, compile=False)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/helena/venvs/openvino_env/lib/python3.10/site-packages/optimum/intel/utils/dummy_openvino_objects.py", line 70, in from_pretrained
    requires_backends(cls, ["openvino"])
  File "/home/helena/venvs/openvino_env/lib/python3.10/site-packages/optimum/intel/utils/import_utils.py", line 264, in requires_backends
    raise ImportError("".join(failed))
ImportError: 
OVModelForCausalLM requires the openvino library but it was not found in your environment. You can install it with pip:
`pip install openvino`. Please note that you may need to restart your runtime after installation.

Note that there is no guaruantee that openvino-nightly works well; it is prerelease software for testing only (see the note on the PyPI page). The only thing that this PR does is make sure that we can use openvino-nightly for testing optimum-intel.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 31, 2023

The documentation is not available anymore as the PR was closed or merged.

@helena-intel helena-intel force-pushed the helena/openvino-nightly branch from 0538b49 to abb0fe5 Compare October 31, 2023 19:13
Copy link
Collaborator

@echarlaix echarlaix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @helena-intel !

@echarlaix echarlaix merged commit 6c179be into main Nov 2, 2023
12 checks passed
@echarlaix echarlaix deleted the helena/openvino-nightly branch November 2, 2023 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants