Closed pradeepdev-1995 closed 2 weeks ago
Hi @pradeepdev-1995 ! This could be a network issue.
This line:
2024-05-20 22:05:20.542 | ERROR | fastembed.common.model_management:download_model:236 - Could not download model from HuggingFace: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/qdrant/all-MiniLM-L6-v2-onnx/revision/main (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1131)')))"), '(Request ID: e682d2b8-a897-4c7f-bea3-663cc0914a84)')Falling back to other sources.
shows that the embeddings model can't be downloaded from HuggingFace. Can you double check you can download that model? Perhaps with a small python script that runs on the same server.
@drazvan Okay, I can download that model in a local directory path separately. Now, how can I specify the embedding model locally stored path in the rail configuration?
Setting the FASTEMBED_CACHE_PATH
environment variable should do it. Let me know if it works.
@drazvan the offtopic rail working well in my local machine. i can see more logs and intermediate results
But the same code, after deploying to a kubernet cluster it always show as I'm sorry, an internal error has occurred without any other error message the intermediate steps also lesser than the local what might be the reason? my local and kubernet cluster, both use python 3.9 The stranger thing is we cant see any other error to debug this
A few more questions to help debug this:
nemoguardrails server
or some other Python code that uses the LLMRails
instance? @drazvan 1) Are you using the provided Dockerfile to build the container? - yes the entire application is containerizing using docker file for the deployment. but I am not using any nemo-guardrail specific docker file/image tag anything
2) Do you run the nemoguardrails server or some other Python code that uses the LLMRails instance? - I am not using nemoguardrails server. using the LLMRails python client as below
from nemoguardrails import LLMRails, RailsConfig
config = RailsConfig.from_path("./config")
rails = LLMRails(config,llm=model,verbose=True)
also now I can see like this in the logs
Error while execution generate user intent: Permission denied: '.cache' nemo guardrails
This is likely coming from here: https://github.com/NVIDIA/NeMo-Guardrails/blob/develop/nemoguardrails/embeddings/embedding_providers/fastembed.py#L54
Can you create a .cache
folder in the current working directory for your app and make sure it's writable?
Also, you can try putting the downloaded model in that folder.
I'm just do like hello_world, but also get the same problem which the response is always that"I'm sorry, an internal error has occurred."
Then I set verbose=True
and then print the log like u show ,but i didn't have the error info.
i want to know how can i locate the internal error or how can i print the detail error info??
i have try and confim this:
.cache
can be created.cache/embedding
I'm just do like hello_world, but also get the same problem which the response is always that
"I'm sorry, an internal error has occurred."
Then I set
verbose=True
and then print the log like u show ,but i didn't have the error info.i want to know how can i locate the internal error or how can i print the detail error info??
i have try and confim this:
- the folder
.cache
can be created- the mode all-MiniLM-L6-v2 i has already downloaded under the
.cache/embedding
oh , i finally find the mistake.
it's my fault , in the config.yml
file, i miss the s
for the models
I am using the Nemo guardrails for off-topic rail functionality here is the config.yml file content
off-topic.co file contents(not original)
and app.py file
But the response is always
And here are the logs
@drazvan