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

Fix vector_id collision in FAISS #1961

Merged
merged 2 commits into from
Jan 5, 2022
Merged

Fix vector_id collision in FAISS #1961

merged 2 commits into from
Jan 5, 2022

Conversation

yorickvanzweeden
Copy link
Contributor

Proposed changes:
Closes #1954

Status (please check what you already did):

  • [ X] First draft (up for discussions & feedback)
  • [ X] Final code
  • Added tests
  • Updated documentation

@MichelBartels
Copy link
Contributor

Thanks for submitting the PR!
I see you are having some typing issues. Those issues aren't actually caused by your code changes. They seem to have existed before and just weren't caught by mypy.
Just changing line 332 from vector_id_map[doc.id] = vector_id to vector_id_map[str(doc.id)] = str(vector_id) should solve them.

Copy link
Contributor

@MichelBartels MichelBartels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thank you for your contribution!

@MichelBartels MichelBartels merged commit 65cd39b into deepset-ai:master Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vector_IDs collide when using two document indexes and updating the embeddings (FAISS)
3 participants