-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[BUG] Remove unnecessary call to get_metadata
for query
#3035
[BUG] Remove unnecessary call to get_metadata
for query
#3035
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @Sicheng-Pan and the rest of your teammates on Graphite |
knns: Sequence[Sequence[VectorQueryResult]] = [[]] * len(plan.knn.embeddings) | ||
if len(prefiltered_ids) > 0: | ||
if prefiltered_ids is None or len(prefiltered_ids) > 0: |
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.
nit - Doesn't this query step always run? Is this only avoiding the case where len(prefiltered_ids) == 0? Can we make that more explicit then?
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.
Added comments for this
## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - Restore the logic to skip the filter when the user does not specify any in the `query` - New functionality - ... ## Test plan *How are these changes tested?* - [ ] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Documentation Changes *Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the [docs repository](https://github.com/chroma-core/docs)?* --------- Co-authored-by: Sicheng Pan <[email protected]>
Description of changes
Summarize the changes made by this PR.
query
Test plan
How are these changes tested?
pytest
for python,yarn test
for js,cargo test
for rustDocumentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?