Open krassowski opened 1 month ago
@krassowski Thank you for documenting this! The huggingface_hub
dependency is listed in the [all]
optional dependency group, as we keep all of our model provider dependencies optional to minimize conflicts with a user's environment.
To install & upgrade all optional dependencies, you should be able to run:
pip install -U "jupyter_ai[all]"
I agree that we should both 1) add version ranges to each provider's declared dependencies, and 2) somehow check in the backend both a) whether the package is installed, and b) whether the package meets the version range, if specified.
2.a) is tracked in #680. Most ImportError
s raised by LangChain are caught and returned as an error message in the chat, but there seem to be edge cases that require further investigation. 1) and 2.b) are not implemented. I had explored this route, but ran into difficulties reliably getting the version of a package.
Description
https://github.com/jupyterlab/jupyter-ai/pull/784 was released yesterday but it does not work out of the box on existing installations. When trying to get a reply I get:
I would wager that this is because a specific version of
huggingface_hub
is needed, but there is no pin on version as of now:huggingface_hub
https://github.com/jupyterlab/jupyter-ai/blob/465d9913d8f6679dcf79c4f6d9111b18daac08b9/packages/jupyter-ai-magics/pyproject.toml#L41
Reproduce
Upgrading
huggingface-hub
to 0.23.1 fixes the problem.Expected behavior