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

Cannot use OpenAIGenerator or HuggingFaceLocalGenerator on Databricks - package conflict? #7751

Open
1 task
lukasz-kastelik opened this issue May 27, 2024 · 3 comments

Comments

@lukasz-kastelik
Copy link

Describe the bug
While importing
from haystack.components.generators import OpenAIGenerator or from haystack.components.generators import HuggingFaceLocalGenerator on Databricks Runtime 14.3 LTS or 15.1 ML you get an error:
Error message
Error that was thrown (if available)

Expected behavior
cannot import name 'Iterator' from 'typing_extensions' (/databricks/python/lib/python3.10/site-packages/typing_extensions.py)

Additional context
Full list of Python dependencies available in Databricks is listed here: https://docs.databricks.com/en/release-notes/runtime/14.3lts.html

To Reproduce
Provision a Databricks cluster and install the newest verstion of haystack-ai using pip.

FAQ Check

@anakin87
Copy link
Member

anakin87 commented May 27, 2024

Hey!

The issue seems similar to this stack overflow thread.

Which version of typing-extension is installed?
Can you upgrade it to typing-extension>=4.7?

(probably a duplicate of #7647)

@lukasz-kastelik
Copy link
Author

Hey!

The issue seems similar to this stack overflow thread.

Which version of typing-extension is installed? Can you upgrade it to typing-extension>=4.7?

(probably a duplicate of #7647)

I tried
%pip install --force-reinstall typing-extensions>=4.7
with no effect

@anakin87
Copy link
Member

Has the new version of typing-extensions been correctly installed? Please check the output of ! pip freeze|grep typing...

If yes, can you force reinstalling Haystack and restarting the kernel (IDK if this is feasible on databricks)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants