Skip to content
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

[Bug]: Python kernel crashes when using Chroma's from_texts #2856

Open
Kviilen opened this issue Sep 25, 2024 · 3 comments
Open

[Bug]: Python kernel crashes when using Chroma's from_texts #2856

Kviilen opened this issue Sep 25, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Kviilen
Copy link

Kviilen commented Sep 25, 2024

What happened?

When using the from_texts method of Chroma, the Python kernel crashes without any error messages. The process finishes with exit code -1073741819 (0xC0000005). This issue occurs consistently and makes it impossible to use this method effectively. I am using the latest version of Chroma and have tried on different environments but still encounter the same problem. Any help or suggestions to resolve this issue would be greatly appreciated.

Versions

System Information

OS: Windows
OS Version: 10.0.22631
Python Version: 3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 15:03:56) [MSC v.1929 64 bit (AMD64)]

Package Information

langchain_core: 0.3.5
langchain: 0.3.0
langchain_community: 0.3.0
langsmith: 0.1.125
langchain_experimental: 0.3.0
langchain_huggingface: 0.1.0
langchain_text_splitters: 0.3.0

Optional packages not installed

langgraph
langserve

Other Dependencies

aiohttp: 3.9.5
async-timeout: Installed. No version info available.
dataclasses-json: 0.6.7
httpx: 0.27.0
huggingface-hub: 0.24.5
jsonpatch: 1.33
numpy: 1.26.4
orjson: 3.10.6
packaging: 23.2
pydantic: 2.8.2
pydantic-settings: 2.5.2
PyYAML: 6.0.1
requests: 2.32.2
sentence-transformers: 3.0.1
SQLAlchemy: 2.0.30
tenacity: 8.5.0
tokenizers: 0.19.1
transformers: 4.44.0
typing-extensions: 4.11.0

Relevant log output

from langchain_community.vectorstores import Chroma
embed_model_path = '.././AI-ModelScope/bge-small-en-v1___5'
from langchain_huggingface import HuggingFaceEmbeddings
embedding = HuggingFaceEmbeddings(model_name=embed_model_path)
texts = [
    "Test"
]
try:
    smalldb_chinese = Chroma.from_texts(texts, embedding=embedding)
except Exception as r:
    print('%s' %(r))


Process finished with exit code -1073741819 (0xC0000005)
@Kviilen Kviilen added the bug Something isn't working label Sep 25, 2024
@tazarov
Copy link
Contributor

tazarov commented Sep 25, 2024

@Kviilen, recently we've observed kernel crashes on Windows system. One of the workarounds was to update your system with the latest patches from Microsoft and use python 3.10. Alternatively users have reported that running 0.5.3 also solved the problem (although I wouldn't recommend downgrading).

@Kviilen
Copy link
Author

Kviilen commented Sep 25, 2024

I have located that the code at line 382 in the file embeddings_queue.py: if len(filtered_embeddings) > 0: sub.callback(filtered_embeddings) will cause the Python kernel to crash.

@neerajg5
Copy link

thanks @Kviilen I was able to test chroma on local by both downgrading the chroma. Another way of lowering python version to 3.10.

However, the query results are not clear to me. The query is showing results (documents and scores) of completely unrelated query term, which i fail to infer or understand. Documentation is also providing the clear behaviour

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants