Skip to content

Commit

Permalink
add error message details
Browse files Browse the repository at this point in the history
Co-authored-by: Isabella Basso <[email protected]>

Signed-off-by: Matteo Mortari <[email protected]>
  • Loading branch information
tarilabs committed Sep 10, 2024
1 parent abb3821 commit 7ff4113
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion clients/python/src/model_registry/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,17 @@ def register_hf_model(
try:
from huggingface_hub import HfApi, hf_hub_url, utils
except ImportError as e:
msg = "huggingface_hub is not installed"
msg = """package `huggingface-hub` is not installed.
To import models from Hugging Face Hub, start by installing the `huggingface-hub` package, either directly or as an
extra (available as `model-registry[hf]`), e.g.:
```sh
!pip install --pre model-registry[hf]
```
or
```sh
!pip install huggingface-hub
```
"""
raise StoreError(msg) from e

api = HfApi()
Expand Down

0 comments on commit 7ff4113

Please sign in to comment.