chroma-core / chroma

the AI-native open-source embedding database
https://www.trychroma.com/
Apache License 2.0
13.36k stars 1.14k forks source link

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

Closed tazarov closed 1 week ago

tazarov commented 1 week ago

Closes #2377 #2379

Description of changes

Summarize the changes made by this PR.

Test plan

How are these changes tested?

Documentation Changes

N/A

github-actions[bot] commented 1 week ago

Reviewer Checklist

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

Testing, Bugs, Errors, Logs, Documentation

tazarov commented 1 week ago

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

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

HammadB commented 1 week ago

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

HammadB commented 1 week ago

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

HammadB commented 1 week ago

What about list_collections?

HammadB commented 1 week ago

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 commented 1 week ago

Done.

tazarov commented 1 week ago

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

codetheweb commented 1 week ago

@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 commented 1 week ago

@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.