agents-course icon indicating copy to clipboard operation
agents-course copied to clipboard

[HANDS-ON BUG] module not found in using tools LLmaindex

Open mehdinathani opened this issue 1 year ago • 3 comments

Describe the bug

ModuleNotFoundError Traceback (most recent call last) in <cell line: 0>() 3 from llama_index.core import VectorStoreIndex 4 from llama_index.llms.huggingface_api import HuggingFaceInferenceAPI ----> 5 from llama_index.embeddings.huggingface_api import HuggingFaceInferenceAPIEmbedding 6 from llama_index.core.tools import QueryEngineTool 7 from llama_index.vector_stores.chroma import ChromaVectorStore

ModuleNotFoundError: No module named 'llama_index.embeddings.huggingface_api'


NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the "Open Examples" button below.

To Reproduce Please provide any informations and a link to your hands-on so that we can investigate.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

mehdinathani avatar Apr 06 '25 15:04 mehdinathani

I'm getting the same issue when I run the notebook in Google collab: https://huggingface.co/agents-course/notebooks/blob/main/unit2/llama-index/tools.ipynb

ModuleNotFoundError                       Traceback (most recent call last)
[<ipython-input-8-be74750cdd2d>](https://localhost:8080/#) in <cell line: 0>()
      3 from llama_index.core import VectorStoreIndex
      4 from llama_index.llms.huggingface_api import HuggingFaceInferenceAPI
----> 5 from llama_index.embeddings.huggingface_api import HuggingFaceInferenceAPIEmbedding
      6 from llama_index.core.tools import QueryEngineTool
      7 from llama_index.vector_stores.chroma import ChromaVectorStore

ModuleNotFoundError: No module named 'llama_index.embeddings.huggingface_api'

ericrobinson-indeed avatar Apr 08 '25 14:04 ericrobinson-indeed

https://github.com/huggingface/agents-course/issues/306#issuecomment-2786735144

ericrobinson-indeed avatar Apr 08 '25 14:04 ericrobinson-indeed

We've addressed this problem and improved it in #426. Closing for now and thanks for reporting!

sergiopaniego avatar Apr 16 '25 07:04 sergiopaniego