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 gRPC conversion for sparse search batch #484

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

agourlay
Copy link
Member

@agourlay agourlay commented Feb 8, 2024

Fixes the gRPC conversion for batch search requests containing sparse vectors.

Copy link

netlify bot commented Feb 8, 2024

Deploy Preview for poetic-froyo-8baba7 ready!

Name Link
🔨 Latest commit 4100711
🔍 Latest deploy log https://app.netlify.com/sites/poetic-froyo-8baba7/deploys/65c4ab2ae822950008e1f919
😎 Deploy Preview https://deploy-preview-484--poetic-froyo-8baba7.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@agourlay agourlay changed the title Fix gRPC convertion for sparse search batch Fix gRPC conversion for sparse search batch Feb 8, 2024
@agourlay agourlay marked this pull request as ready for review February 8, 2024 10:24
@agourlay agourlay requested review from joein and generall February 8, 2024 10:25
@@ -1955,23 +1955,26 @@ def convert_batch_vector_struct(
@classmethod
def convert_named_vector_struct(
cls, model: rest.NamedVectorStruct
) -> Tuple[List[float], Optional[str]]:
) -> Tuple[List[float], Optional[grpc.SparseIndices], Optional[str]]:
if isinstance(model, list):
Copy link
Member

@joein joein Feb 8, 2024

Choose a reason for hiding this comment

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

I am a little bit confused by our naming...

Why do we have List[StrictFloat] in NamedVectorStruct :(

Code is correct though 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

Anonymous named vector #legacy

@joein joein merged commit d23c4d4 into master Feb 8, 2024
14 checks passed
joein pushed a commit that referenced this pull request Feb 8, 2024
* Fix gRPC convertion for sparse search batch

* fix conversion & add test
@generall generall deleted the fix-grpc-batch-sparse-search branch May 3, 2024 10:50
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 this pull request may close these issues.

3 participants