chroma-core / chroma

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

[Bug]: get_or_create_collection logs 'Collection <name> is not created.' when collection already exists #2353

Open verveguy opened 2 weeks ago

verveguy commented 2 weeks ago

What happened?

get_or_create_collection logs Collection <name> is not created. when collection already exists at INFO level.

It seems that this message is meant to convey that the collection was not created because it already exists.

The wording is confusing. Better would be to report nothing at all for this case and only log.INFO Collection <name> created.

Or if you really want to log something, log.INFO Collection <name> exists.

Versions

Chroma 0.5.0 MacOS 14.5 Python 3.11.6

Relevant log output

INFO     16 Jun 2024 | 19:35:57 | MainThread | Collection testcollection is not created.                                        segment.py:189
jeffchuber commented 1 week ago

@verveguy thanks - this is good feedback. we are considering deprecating this API in general because it's semantic are really wonky.

verveguy commented 1 week ago

The API itself is very useful. It's like upsert, but for a whole collection.

It's really just the message it generates that is odd.