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

[BUG]: Fix cross version compatibility 0.5.0 or lower with 0.5.1+ #2378

Conversation

tazarov
Copy link
Contributor

@tazarov tazarov commented Jun 19, 2024

Closes #2377 #2379

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • Making dimension and version lookup optional in the Collection model creation in fastapi client

Test plan

How are these changes tested?

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

Documentation Changes

N/A

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)

Copy link
Contributor Author

tazarov commented Jun 19, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @tazarov and the rest of your teammates on Graphite Graphite

@tazarov tazarov requested a review from HammadB June 19, 2024 10:28
@HammadB
Copy link
Collaborator

HammadB commented Jun 19, 2024

We don't usually make changes for sake of forward compatibility but this makes sense.

@HammadB
Copy link
Collaborator

HammadB commented Jun 19, 2024

Don't we have to do this in other methods too - like get_collection?

@HammadB
Copy link
Collaborator

HammadB commented Jun 19, 2024

What about list_collections?

@HammadB
Copy link
Collaborator

HammadB commented Jun 19, 2024

What about https://github.com/chroma-core/chroma/blob/main/chromadb/api/async_fastapi.py?

Can we encapsulate this so we aren't repeating it everywhere?

cc @codetheweb

@tazarov
Copy link
Contributor Author

tazarov commented Jun 19, 2024

Done.

@HammadB HammadB enabled auto-merge (squash) June 19, 2024 19:51
@tazarov
Copy link
Contributor Author

tazarov commented Jun 19, 2024

@HammadB, shouldn't dimension and version also make it into chromadb.api.models.CollectionCommon.CollectionCommon, or are these for internal consumption?

@HammadB HammadB disabled auto-merge June 19, 2024 19:56
@HammadB HammadB enabled auto-merge (squash) June 19, 2024 19:57
@codetheweb
Copy link
Contributor

@HammadB, shouldn't dimension and version also make it into chromadb.api.models.CollectionCommon.CollectionCommon, or are these for internal consumption?

CollectionCommon is just a base class with some helpers that the async/sync variants inherent from. I don't think it needs to care about those fields unless I'm missing something.

@HammadB
Copy link
Collaborator

HammadB commented Jun 19, 2024

@tazarov

  1. That is unrelated to this PR.
  2. I don't think we need to expose these right now. We could maybe expose dimension but version is internal.

@HammadB HammadB merged commit 131e8dd into main Jun 19, 2024
65 checks passed
Anush008 pushed a commit to Anush008/chroma that referenced this pull request Jun 27, 2024
…roma-core#2378)

Closes chroma-core#2377 chroma-core#2379

## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
- Making dimension and version lookup optional in the Collection model
creation in fastapi client

## Test plan
*How are these changes tested?*

- [x] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes
N/A
@tazarov tazarov linked an issue Jul 2, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants