Giter Club home page Giter Club logo

Comments (6)

hoosengold avatar hoosengold commented on August 11, 2024 1

@tazarov

Thank you for the provided logs. I reproduced your test with a PersistentClient (with a basic FastAPI implementation) and it works as expected and described by you. Here's a snippet of the code:

import chromadb
client = chromadb.PersistentClient(path=os.path.join(os.getcwd(), "chroma"))
client.get_or_create_collection("Test")

Logs:

INFO:     Application startup complete.
INFO: Anonymized telemetry enabled. See https://docs.trychroma.com/telemetry for more information.
INFO:     127.0.0.1:53838 - "POST /api/v1/test HTTP/1.1" 200 OK
INFO: Collection Test is not created.
INFO:     127.0.0.1:33750 - "POST /api/v1/test HTTP/1.1" 200 OK

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!

from chroma.

tazarov avatar tazarov commented on August 11, 2024

Hey @hoosengold, thanks for pointing this out. This is just an info-level log message used for tracking the behavior of the get_or_create_collection() function semantics. It just lets you know that the call did not create a new collection but returned an existing one. I can see how this exact phrasing can be misleading and interpreted as an error.

Let us improve on the messaging.

from chroma.

hoosengold avatar hoosengold commented on August 11, 2024

Hi @tazarov, thank you for the fast reply!

It just lets you know that the call did not create a new collection but returned an existing one.

It seems like the message is always displayed, not just when getting the collection but also when creating it. That means that the created bool variable is always set to False by the _sysdb.create_collection() method for some reason. I hope that this does not indicate a more complex problem.

However, thanks again for the quick response and fixing the info message!

from chroma.

tazarov avatar tazarov commented on August 11, 2024

Thanks for this insight, @hoosengold. I will have a look in sysdb and fix that if necessary.

from chroma.

tazarov avatar tazarov commented on August 11, 2024

@hoosengold,

I just tested with:

import chromadb

client = chromadb.HttpClient()

client.get_or_create_collection("Test")

Results:

INFO:     [15-05-2024 13:57:01] Application startup complete.
INFO:     [15-05-2024 13:57:01] Uvicorn running on http://localhost:8000 (Press CTRL+C to quit)
INFO:     [15-05-2024 13:57:09] ::1:50449 - "GET /api/v1/tenants/default_tenant HTTP/1.1" 200
INFO:     [15-05-2024 13:57:09] ::1:50449 - "GET /api/v1/databases/default_database?tenant=default_tenant HTTP/1.1" 200
INFO:     [15-05-2024 13:57:09] ::1:50450 - "POST /api/v1/collections?tenant=default_tenant&database=default_database HTTP/1.1" 200
INFO:     [15-05-2024 13:57:17] ::1:50453 - "GET /api/v1/tenants/default_tenant HTTP/1.1" 200
INFO:     [15-05-2024 13:57:17] ::1:50453 - "GET /api/v1/databases/default_database?tenant=default_tenant HTTP/1.1" 200
DEBUG:    [15-05-2024 13:57:17] Collection Test already exists, returning existing collection.
INFO:     [15-05-2024 13:57:17] ::1:50454 - "POST /api/v1/collections?tenant=default_tenant&database=default_database HTTP/1.1" 200

As expected, the message was returned only when trying to get_or_create_collection() on an existing collection. The initial creation (INFO: [15-05-2024 13:57:09] ::1:50450 - "POST /api/v1/collections?tenant=default_tenant&database=default_database HTTP/1.1" 200) of the collection did not trigger the message.

from chroma.

sanketkedia avatar sanketkedia commented on August 11, 2024

Closing this for bug hygiene. Feel free to create another issue if you find another issue.

from chroma.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.