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

test_faiss_with_metadatas: key mismatch in assert #674

Closed
rvorias opened this issue Jan 21, 2023 · 0 comments · Fixed by #676
Closed

test_faiss_with_metadatas: key mismatch in assert #674

rvorias opened this issue Jan 21, 2023 · 0 comments · Fixed by #676

Comments

@rvorias
Copy link
Contributor

rvorias commented Jan 21, 2023

https://github.com/hwchase17/langchain/blob/236ae93610a8538d3d0044fc29379c481acc6789/tests/integration_tests/vectorstores/test_faiss.py#L54

This test will fail because FAISS.from_texts will assign uuid4s as keys in its docstore, while expected_docstore has string numbers as keys.

rvorias added a commit to rvorias/langchain that referenced this issue Jan 21, 2023
hwchase17 pushed a commit that referenced this issue Jan 22, 2023
- This uses the faiss built-in `write_index` and `load_index` to save
and load faiss indexes locally
- Also fixes #674
- The save/load functions also use the faiss library, so I refactored
the dependency into a function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant