Open torvalds-dev opened 7 months ago
torvalds.dev is analyzing the ticket
The issue is about a feature request for the InstructorEmbedding
module in the llama_index
library
torvalds.dev is analyzing the ticket
The issue is about a feature request for the InstructorEmbedding
module in the llama_index
package. The InstructorEmbedding
module raises a custom ImportError
if the INSTRUCTOR
module cannot be imported. The user is requesting that the original error raised be included in the error message.
The reason for this request is that the error message can be misleading. The pip install InstructorEmbedding
command does not install all required dependencies. In the user's case, they had to manually install sentence_transformers
after having installed INSTRUCTOR
.
The value of this feature is to provide a more accurate error message to the user, helping them understand what might be going wrong when they try to import the INSTRUCTOR
module.
The relevant file to this issue is llama_index/embeddings/huggingface.py
. This file contains the InstructorEmbedding
module that is raising the custom ImportError
.
The actions that should be taken to resolve this issue are:
InstructorEmbedding
module to catch the original error when trying to import the INSTRUCTOR
module.ImportError
that is raised.ImportError
.
Feature Description
The InstructorEmbedding will raise a custom ImportError if INSTRUCTOR module cannot be imported.
As a feature request, I propose to include the original error raised in the error message.
Reason
The error shown can be misleading, as pip install InstructorEmbedding does not install all required dependencies (see this https://github.com/xlang-ai/instructor-embedding/issues/7).
In my case, I had to install sentence_transformers manually after having installed INSTRUCTOR
Value of Feature
The current custom message may be misleading.