02_mlflow_logging_inference.py fails to create Endpoint (cannot import name 'cached_download' from 'huggingface_hub')

Open
#108 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python

Research direction

Start with llm-models/embedding/bge/bge-m3/02_mlflow_logging_inference.py, especially the pip_requirements list around lines 43-55, and review the dependency versions against the cached_download import error. Run the example to create the Model Serving Endpoint; done means the endpoint is created without that ImportError.

Written by the indexing model from the issue text.

Description

Issue

Running llm-models/embedding/bge/bge-m3/02_mlflow_logging_inference.py fails to create a Model Serving Endpoint.
The Endpoint log shows the following error:
ImportError: cannot import name 'cached_download' from 'huggingface_hub'

Cause

Breaking changes in huggingface_hub v0.26.0

Temporary workaround

Pin the versions as follows here

pip_requirements=[
      "mlflow==2.11.2",
      "sentence-transformers==2.7.0",
      "torch==2.2.1",
      "transformers==4.41.2",
      "huggingface-hub==0.24.6"
],
Dominant language
Python
Stars
370
Forks
132
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from databricks/databricks-ml-examples

All issues in databricks/databricks-ml-examples

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.