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

Creating collection fails with ChromaDB >v0.6.2 #192

Open
mempirate opened this issue Jan 26, 2025 · 3 comments
Open

Creating collection fails with ChromaDB >v0.6.2 #192

mempirate opened this issue Jan 26, 2025 · 3 comments

Comments

@mempirate
Copy link

mempirate commented Jan 26, 2025

Context

I'm testing out Chroma-go with a Chroma DB 0.6.3 server running in docker. Compose setup is shown below.

When creating a collection like so:

newCollection, err = client.NewCollection(
	context.TODO(),
	"test-collection",
	collection.WithMetadata("key1", "value1"),
	// NOTE: Apparently OpenAI embeddings are optimized for cosine distance
	collection.WithHNSWDistanceFunction(types.COSINE),
	collection.WithEmbeddingFunction(embedding),
)

if err != nil {
	log.Fatalf("Error creating collection: %s \n", err)
}

The following error is printed:

Error creating collection: Error (400) InvalidArgumentError: cannot unpack non-iterable coroutine object 

From the container logs, it seems that GET /api/v1/tenants/default_tenant call fails:

server-1  | INFO:     192.168.97.1:42134 - "GET /api/v1/tenants/default_tenant HTTP/1.1" 400 Bad Request

Is this expected, maybe because of API deprecation? It doesn't happen in v0.6.2.

Docker Compose

networks:
  net:
    driver: bridge
services:
  server:
    image: ghcr.io/chroma-core/chroma:0.6.3
    environment:
      # Set to true to persist data to disk
      - IS_PERSISTENT=FALSE
    # volumes:
      # Default configuration for persist_directory in chromadb/config.py
      # Currently it's located in "/chroma/chroma/"
      # - chroma-data:/chroma/chroma/
    ports:
      - 8000:8000
    networks:
      - net
    healthcheck:
      # Adjust below to match your container port
      test: [ "CMD", "curl", "-f", "http://localhost:8000/api/v2/heartbeat" ]
      interval: 30s
      timeout: 10s
      retries: 3
    command: "--workers 1 --host 0.0.0.0 --port 8000 --proxy-headers --timeout-keep-alive 30"


volumes:
  chroma-data:
    driver: local
@chrisbward
Copy link

I'm also seeing this error, chroma 0.6.3, installed locally as a python package

@chrisbward
Copy link

perhaps to do with this post?
chroma-core/chroma#3498

@tazarov
Copy link
Contributor

tazarov commented Jan 29, 2025

@chrisbward, @mempirate the issue is with a bug in Chroma - chroma-core/chroma#3514

The API v1 is still supported but will be phased out in the future. I'm working on releasing the v2 support very soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants