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

refactor: Change Document.embedding type to list of floats #6135

Merged
merged 5 commits into from
Oct 23, 2023

Conversation

silvanocerza
Copy link
Contributor

Related Issues

Proposed Changes:

This PR changes the Document.embedding from numpy.ndarray to List[float] to ease usage of embeddings.

It also changes all usages and tests that were setting embedding as an ndarray. Some tests were already using it as a List[float] so they weren't changed.

How did you test it?

Ran unit tests locally.

Notes for the reviewer

Depends on #6127.

Checklist

@silvanocerza silvanocerza added the 2.x Related to Haystack v2.0 label Oct 20, 2023
@silvanocerza silvanocerza self-assigned this Oct 20, 2023
@silvanocerza silvanocerza requested review from a team as code owners October 20, 2023 12:36
@silvanocerza silvanocerza requested review from dfokina and masci and removed request for a team October 20, 2023 12:36
@github-actions github-actions bot added topic:tests type:documentation Improvements on the docs labels Oct 20, 2023
@silvanocerza silvanocerza changed the base branch from main to remove-id-hash-document October 20, 2023 12:37
@anakin87 anakin87 self-requested a review October 20, 2023 12:45
Copy link
Member

@anakin87 anakin87 left a comment

Choose a reason for hiding this comment

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

👍

@silvanocerza silvanocerza force-pushed the remove-id-hash-document branch from 67459a2 to 96055c2 Compare October 20, 2023 13:37
@silvanocerza silvanocerza force-pushed the document-embedding-type branch 3 times, most recently from 8851c2c to 43a0502 Compare October 20, 2023 13:51
@silvanocerza silvanocerza force-pushed the remove-id-hash-document branch from c8ac5c6 to 11c916a Compare October 20, 2023 14:33
@silvanocerza silvanocerza force-pushed the document-embedding-type branch from 43a0502 to 12bccc0 Compare October 20, 2023 14:34
@silvanocerza silvanocerza force-pushed the remove-id-hash-document branch from 11c916a to 5180526 Compare October 20, 2023 14:51
@silvanocerza silvanocerza force-pushed the document-embedding-type branch from 12bccc0 to 3194cfb Compare October 20, 2023 14:52
Base automatically changed from remove-id-hash-document to main October 23, 2023 08:35
@silvanocerza silvanocerza force-pushed the document-embedding-type branch from 3194cfb to 8350f80 Compare October 23, 2023 08:36
@silvanocerza silvanocerza merged commit c8d162c into main Oct 23, 2023
@silvanocerza silvanocerza deleted the document-embedding-type branch October 23, 2023 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Related to Haystack v2.0 topic:tests type:documentation Improvements on the docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Document.embedding a list of float
2 participants