-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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]: "Collection is not created" message despite being returned by list_collections method #2207
Comments
Hey @hoosengold, thanks for pointing this out. This is just an info-level log message used for tracking the behavior of the Let us improve on the messaging. |
Hi @tazarov, thank you for the fast reply!
It seems like the message is always displayed, not just when getting the collection but also when creating it. That means that the However, thanks again for the quick response and fixing the info message! |
Thanks for this insight, @hoosengold. I will have a look in sysdb and fix that if necessary. |
I just tested with: import chromadb
client = chromadb.HttpClient()
client.get_or_create_collection("Test") Results:
As expected, the message was returned only when trying to |
Thank you for the provided logs. I reproduced your test with a import chromadb
client = chromadb.PersistentClient(path=os.path.join(os.getcwd(), "chroma"))
client.get_or_create_collection("Test") Logs:
When I test it with the code from the initial issue, I get the info message no matter if the collection exists or not. I guess the problem is someplace else. I will update this comment (or write a new one) if I find where the problem is. Thank you for the fast replies and for your time! |
Closing this for bug hygiene. Feel free to create another issue if you find another issue. |
What happened?
I am trying to get an existing ChromaDB collection with the
get_or_create_collection
method of aPersistentClient
object but I get 'Collection "collection_name" is not created.'.Here's a snippet of the source code:
I tracked down the source of the message and it is
*/chromadb/api/segment.py
, line189
.I also tried to reproduce the message by creating a copy of the project and changing the version of the
chromadb
Python package inside apipenv
environment. I could not get the message despite everything being the same (package version, collection directory path, collection name and embedding function) when I used version0.4.24
. I've asserted the values of all parameters and they are always correct. The message appears when I upgrade to the latest version0.5.0
.It is possible to perform all actions with the collection such as creating one, inserting and deleting data and querying chunks from the collection despite the above message.
Expected behaviour: the message should not appear if the collection exists or it's getting created and there are no errors.
Versions
Chroma 0.5.0
Python 3.10.12
Ubuntu 22.04 (WSL 2)
Relevant log output
No response
The text was updated successfully, but these errors were encountered: