-
Notifications
You must be signed in to change notification settings - Fork 2k
[ENH]: Allow specifiying multiple filter keys in get_statistics #5963
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
base: wrapper_change
Are you sure you want to change the base?
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Enable multi-key filtering in The PR updates Overall, the change introduces a new calling signature for Key Changes• Replaced the Affected Areas• This summary was automatically generated by @propel-code-bot |
d05aed4 to
99059fd
Compare
| if keys is not None and len(keys) > MAX_KEYS: | ||
| raise ValueError( | ||
| f"Too many keys provided: {len(keys)}. " | ||
| f"Maximum allowed is {MAX_KEYS} keys per request. " | ||
| "Consider calling get_statistics multiple times with smaller key batches." | ||
| ) |
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.
[Testing] This is a great safeguard to prevent overly large queries. To ensure this new validation is covered, could you please add a test case to chromadb/test/distributed/test_statistics_wrapper.py that asserts a ValueError is raised when more than 30 keys are provided?
Context for Agents
This is a great safeguard to prevent overly large queries. To ensure this new validation is covered, could you please add a test case to `chromadb/test/distributed/test_statistics_wrapper.py` that asserts a `ValueError` is raised when more than 30 keys are provided?
File: chromadb/utils/statistics.py
Line: 190
kylediaz
left a comment
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.
let's gooo

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?