jupyter-ai icon indicating copy to clipboard operation
jupyter-ai copied to clipboard

Incorrect example for model ID in the `HfHubProvider`

Open krassowski opened this issue 1 year ago • 0 comments
trafficstars

Description

The help message suggests

https://github.com/jupyterlab/jupyter-ai/blob/e27293cf86fa37b2ea20de6b481ad989e209933a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py#L503-L505

but passing it in this format results in:

pydantic.v1.error_wrappers.ValidationError: 1 validation error for HfHubProvider
__root__
  Repo id must use alphanumeric chars or '-', '_', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96: 'huggingface_hub:ExampleOwner/example-model'. (type=value_error.hfvalidation)

Removing huggingface_hub: works. The error message from upstream is confusing though.

Also there is a warning:

site-packages/huggingface_hub/utils/_deprecation.py:131: FutureWarning: 'InferenceApi' (from 'huggingface_hub.inference_api') is deprecated and will be removed from version '1.0'. `InferenceApi` client is deprecated in favor of the more feature-complete `InferenceClient`. Check out this guide to learn how to convert your script to use it: https://huggingface.co/docs/huggingface_hub/guides/inference#legacy-inferenceapi-client.

krassowski avatar Apr 20 '24 20:04 krassowski