-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More informative exceptions #21
Comments
this reproduces against the rest endpoint. short input -
long input -
no differentiation from other input issues -
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The error log could be more informative for nemo embeddings.
In the code calling the nemo embeddings, I get the following error:
File "/home/anudeep/swastika/oran_chatbot/env/lib/python3.10/site-packages/langchain_core/vectorstores.py", line 550, in from_documents
return cls.from_texts(texts, embedding, metadatas=metadatas, **kwargs)
File "/home/anudeep/swastika/oran_chatbot/env/lib/python3.10/site-packages/langchain_community/vectorstores/faiss.py", line 930, in from_texts
embeddings = embedding.embed_documents(texts)
File "/home/anudeep/swastika/oran_chatbot/env/lib/python3.10/site-packages/langchain_community/embeddings/nemo.py", line 122, in embed_documents
return [self._embedding_func(text, input_type="passage") for text in documents]
File "/home/anudeep/swastika/oran_chatbot/env/lib/python3.10/site-packages/langchain_community/embeddings/nemo.py", line 122, in
return [self._embedding_func(text, input_type="passage") for text in documents]
File "/home/anudeep/swastika/oran_chatbot/env/lib/python3.10/site-packages/langchain_community/embeddings/nemo.py", line 109, in _embedding_func
embedding = response_json["data"][0]["embedding"]
KeyError: 'data'
The error was actually due to input_length>512, and only shows in the NREM docker logs as:
Failed to process the request(s) for model instance 'NV-Embed-QA_tokenizer_0_3', message: RequestValidationError: Input length 548 exceeds maximum allowed token size 512
So, it is very difficult to debug such cases. It'd be super helpful if the error messages are more informative. Thank you!!
The text was updated successfully, but these errors were encountered: