-
Notifications
You must be signed in to change notification settings - Fork 501
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
Problems with vectorstores: "RuntimeError: Cannot open header file" #3
Comments
I have the same issue this is the solution that works for me: `# Split the document into chunks with a maximum size of 100, with overlap for better context
` |
Thanks @ELBEQQAL94 it also worked for me. |
Thanks a lot! It works for me too! |
Thanks for this great course! I'm encountering a weird issue when creating those RAG vectorstores. Sometimes there appears a "index_metadata.pickle" file in a subfolder of a persistent vectorstore. If this file is present, vectorstore cannot be loaded as I get "RuntimeError: Cannot open header file" error. If I manually delete that pickle file, issue goes away.
After lots of testing with Langchain and Chroma, this event seems to occur only when vectorstore becomes large enough. Toy examples have no issues. I get this error with your RAG example "2a_rag_basics_metadata.py" which has over 13k chunks. I also get error for the "custom" type vectorstore in your "3_rag_text_splitting_deep_dive.py" example with over 1k items, while other 4 types work fine (no index file created).
Is there any workaround or reasonable cause for this issue? It appears some sort of bug in Langchain and/or Chroma...
EDIT: This appears to be a known issue with Chroma, discussed also here chroma-core/chroma#872
Workaround is to increase HNSW cache limit from default 1000 to avoid writing that index file, e.g., by adding "collection_metadata={"hnsw:sync_threshold": 20000}" when creating a vectorstore. Hopefully this helps others running those RAG example codes.
The text was updated successfully, but these errors were encountered: