You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/home/anqin/miniconda3/envs/sova/lib/python3.11/site-packages/transformers/tokenization_utils_base.py:1601: FutureWarning: clean_up_tokenization_spaces was not set. It will be set to True by default. This behavior will be depracted in transformers v4.45, and will be then set to False by default. For more details check this issue: huggingface/transformers#31884
warnings.warn(
[2024-08-07 17:22:00,910] ERROR in app: Exception on / [POST]
Traceback (most recent call last):
File "/home/anqin/miniconda3/envs/sova/lib/python3.11/site-packages/flask/app.py", line 1463, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anqin/miniconda3/envs/sova/lib/python3.11/site-packages/flask/app.py", line 872, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anqin/miniconda3/envs/sova/lib/python3.11/site-packages/flask/app.py", line 870, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anqin/miniconda3/envs/sova/lib/python3.11/site-packages/flask/app.py", line 855, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/c/workspace/github/sova_ollama/app.py", line 87, in index
context = get_context(query)
^^^^^^^^^^^^^^^^^^
File "/mnt/c/workspace/github/sova_ollama/app.py", line 43, in get_context
db = Chroma.from_texts(documents, embedding=embeddings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anqin/miniconda3/envs/sova/lib/python3.11/site-packages/langchain_community/vectorstores/chroma.py", line 742, in from_texts
chroma_collection.add_texts(texts=texts, metadatas=metadatas, ids=ids)
File "/home/anqin/miniconda3/envs/sova/lib/python3.11/site-packages/langchain_community/vectorstores/chroma.py", line 275, in add_texts
embeddings = self._embedding_function.embed_documents(texts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anqin/miniconda3/envs/sova/lib/python3.11/site-packages/langchain_community/embeddings/huggingface.py", line 93, in embed_documents
embeddings = self.client.encode(
^^^^^^^^^^^^^^^^^^^
File "/home/anqin/miniconda3/envs/sova/lib/python3.11/site-packages/sentence_transformers/SentenceTransformer.py", line 565, in encode
if all_embeddings[0].dtype == torch.bfloat16:
~~~~~~~~~~~~~~^^^
IndexError: list index out of range
The text was updated successfully, but these errors were encountered:
I tried to run the app follow the README, however I got the follow error.
Not sure whether it come from the sentence transformer, since it is missed in the requirement.txt. So I run pip to install the missing packages.
================ LOG for run ============
$ gunicorn -b 0.0.0.0:8080 app:app
[2024-08-07 17:21:29 +0800] [16314] [INFO] Starting gunicorn 21.2.0
[2024-08-07 17:21:29 +0800] [16314] [INFO] Listening at: http://0.0.0.0:8080 (16314)
[2024-08-07 17:21:29 +0800] [16314] [INFO] Using worker: sync
[2024-08-07 17:21:29 +0800] [16315] [INFO] Booting worker with pid: 16315
Init Search
/home/anqin/miniconda3/envs/sova/lib/python3.11/site-packages/transformers/tokenization_utils_base.py:1601: FutureWarning:
clean_up_tokenization_spaces
was not set. It will be set toTrue
by default. This behavior will be depracted in transformers v4.45, and will be then set toFalse
by default. For more details check this issue: huggingface/transformers#31884warnings.warn(
[2024-08-07 17:22:00,910] ERROR in app: Exception on / [POST]
Traceback (most recent call last):
File "/home/anqin/miniconda3/envs/sova/lib/python3.11/site-packages/flask/app.py", line 1463, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anqin/miniconda3/envs/sova/lib/python3.11/site-packages/flask/app.py", line 872, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anqin/miniconda3/envs/sova/lib/python3.11/site-packages/flask/app.py", line 870, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anqin/miniconda3/envs/sova/lib/python3.11/site-packages/flask/app.py", line 855, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/c/workspace/github/sova_ollama/app.py", line 87, in index
context = get_context(query)
^^^^^^^^^^^^^^^^^^
File "/mnt/c/workspace/github/sova_ollama/app.py", line 43, in get_context
db = Chroma.from_texts(documents, embedding=embeddings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anqin/miniconda3/envs/sova/lib/python3.11/site-packages/langchain_community/vectorstores/chroma.py", line 742, in from_texts
chroma_collection.add_texts(texts=texts, metadatas=metadatas, ids=ids)
File "/home/anqin/miniconda3/envs/sova/lib/python3.11/site-packages/langchain_community/vectorstores/chroma.py", line 275, in add_texts
embeddings = self._embedding_function.embed_documents(texts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anqin/miniconda3/envs/sova/lib/python3.11/site-packages/langchain_community/embeddings/huggingface.py", line 93, in embed_documents
embeddings = self.client.encode(
^^^^^^^^^^^^^^^^^^^
File "/home/anqin/miniconda3/envs/sova/lib/python3.11/site-packages/sentence_transformers/SentenceTransformer.py", line 565, in encode
if all_embeddings[0].dtype == torch.bfloat16:
~~~~~~~~~~~~~~^^^
IndexError: list index out of range
The text was updated successfully, but these errors were encountered: