chroma
chroma copied to clipboard
[Bug]: Can not use custom embedding functions in server mode
What happened?
I use "docker compose up -d --build" to start a chroma server on Ubuntu 22.04. But when I use my own embedding functions, which works well in the client mode, in the client, the chroma.log shows " WARNING chromadb.api.models.Collection No embedding_function provided, using default embedding function: SentenceTransformerEmbeddingFunction". It seems that custom embedding functions does not work in server mode.
Versions
Chroma 0.3.21 Python 3.10.6 Ubuntu 22.04
Relevant log output
No response
Hi - I believe this is a confusing error message from the server. Technically, embedding functions only ever run on the client right now. server-side embedding functions are yet to be supported.
Does the data actually get stored properly for you and is this a UX issue or are you not seeing data when you query/get?
@HammadB You are right. It is a confusing error message from the server.
Re opening this as we should clean up the confusing error message!
Yes , I got the same bug.
docker-compose up -d --build
import chromadb
from chromadb.config import Settings
chroma_client = chromadb.Client(Settings(chroma_api_impl="rest",
chroma_server_host="localhost",
chroma_server_http_port="8000"
))
chroma_client.heartbeat()
# output : 1683602373047580430000
get collection list
chroma_client.list_collections()
logs:
WARNING chromadb.api.models.Collection No embedding_function provided, using default embedding function: SentenceTransformerEmbeddingFunction
ERROR chromadb.server.fastapi 401 Client Error.
Repository Not Found for url: https://huggingface.co/api/models/sentence-transformers/all-MiniLM-L6-v2.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password.
closing in favor of - https://github.com/chroma-core/chroma/issues/705