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

[ENH] add included to .get() & .query() response #2044

Merged
merged 3 commits into from
Apr 30, 2024

Conversation

codetheweb
Copy link
Contributor

@codetheweb codetheweb commented Apr 23, 2024

Helps clarify behavior when fields like embeddings are returned as None. Not a breaking change.

Test plan

How are these changes tested?

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Documentation Changes

I didn't see any relevant documentation that needs to be updated.

Clarifies behavior when fields like `embeddings` are returned as `None`.
Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

@codetheweb codetheweb force-pushed the feat-get-query-returns-included branch 3 times, most recently from 6ea9699 to d8e0bf0 Compare April 23, 2024 17:27
@codetheweb codetheweb force-pushed the feat-get-query-returns-included branch from d8e0bf0 to 5e59276 Compare April 23, 2024 18:19
@codetheweb codetheweb marked this pull request as ready for review April 23, 2024 20:13
@codetheweb codetheweb requested a review from HammadB April 23, 2024 20:14
@codetheweb codetheweb linked an issue Apr 23, 2024 that may be closed by this pull request
Copy link
Contributor

@beggers beggers left a comment

Choose a reason for hiding this comment

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

looks great

@@ -1290,6 +1319,8 @@ def test_get_nearest_neighbors_where_n_results_more_than_element(api):
for key in results.keys():
if key in includes or key == "ids":
assert len(results[key][0]) == 2
elif key == "included":
Copy link
Collaborator

Choose a reason for hiding this comment

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

oh for future reference, this is really a grab bag of tests, we try to pull tests out on-demand, we can leave for now

@codetheweb codetheweb merged commit c46ea2a into main Apr 30, 2024
120 checks passed
@codetheweb codetheweb deleted the feat-get-query-returns-included branch April 30, 2024 00:14
@atroyn
Copy link
Contributor

atroyn commented Apr 30, 2024

👏

HammadB added a commit that referenced this pull request Apr 30, 2024
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - Ran prettier to fix breakage lint rule breakge in #2044
 - New functionality
	 - ...

## Test plan
*How are these changes tested?*
Lint CI failed, this is a fix
- [x] 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)?*
@jeffchuber
Copy link
Contributor

@codetheweb 🥳

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.

Improve message on collection.get empty embeddings
5 participants