-
Notifications
You must be signed in to change notification settings - Fork 2k
[BUG] fix sparse autoembed queries on search api #5800
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
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
|
Fix auto-embedding of string KNN queries in This PR patches a bug where Key Changes• Updated Affected Areas• This summary was automatically generated by @propel-code-bot |
| schema = Schema().create_index( | ||
| key="sparse_field", | ||
| config=SparseVectorIndexConfig( | ||
| source_key=Key.DOCUMENT, # type: ignore[arg-type] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we cut a ticket for this type error? It should not happen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea ill cut it. it's weird, doesnt give red squiggly its only mypy
8e19882 to
0eaa460
Compare
0eaa460 to
7188c4c
Compare
## Description of changes _Summarize the changes made by this PR._ - Improvements & Bug fixes - There was a bug in the search api, where search queries were not auto-embedded. This PR fixes that and adds a test to ensure that search api explicitly works on autoembedding in both the read and write path. previously, there were tests on the underlying search class and manually calling the embed function to ensure the embedded results were valid. this test is e2e, ensuring that adds and queries return the desired result and the search api functions as intended - New functionality - ... ## Test plan _How are these changes tested?_ - [ ] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Migration plan _Are there any migrations, or any forwards/backwards compatibility changes needed in order to make sure this change deploys reliably?_ ## Observability plan _What is the plan to instrument and monitor this change?_ ## Documentation Changes _Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the [docs section](https://github.com/chroma-core/chroma/tree/main/docs/docs.trychroma.com)?_

Description of changes
Summarize the changes made by this PR.
Test plan
How are these changes tested?
pytestfor python,yarn testfor js,cargo testfor rustMigration plan
Are there any migrations, or any forwards/backwards compatibility changes needed in order to make sure this change deploys reliably?
Observability plan
What is the plan to instrument and monitor this change?
Documentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs section?