chroma-core/chroma · error · NotImplementedError
Fork count is not implemented for Local Chroma
Error message
Fork count is not implemented for Local Chroma
What it means
RustBindingsAPI._fork_count (chromadb/api/rust.py:373) is a deliberate stub. Counting forks of a collection (Collection.fork_count) is a Chroma-server capability; in embedded mode with the Rust bindings there is no fork lineage to count, so the call always raises NotImplementedError.
Source
Thrown at chromadb/api/rust.py:373
def _fork(
self,
collection_id: UUID,
new_name: str,
tenant: str = DEFAULT_TENANT,
database: str = DEFAULT_DATABASE,
) -> CollectionModel:
raise NotImplementedError(
"Collection forking is not implemented for Local Chroma"
)
@override
def _fork_count(
self,
collection_id: UUID,
tenant: str = DEFAULT_TENANT,
database: str = DEFAULT_DATABASE,
) -> int:
raise NotImplementedError("Fork count is not implemented for Local Chroma")
@override
def _get_indexing_status(
self,
collection_id: UUID,
tenant: str = DEFAULT_TENANT,
database: str = DEFAULT_DATABASE,
) -> "IndexingStatus":
raise NotImplementedError("Indexing status is not implemented for Local Chroma")
@override
def _search(
self,
collection_id: UUID,
searches: List[Search],
tenant: str = DEFAULT_TENANT,
database: str = DEFAULT_DATABASE,
read_level: ReadLevel = ReadLevel.INDEX_AND_WAL,View on GitHub (pinned to aecdd12c8a)
Solutions
- Point the code at a Chroma server via chromadb.HttpClient - the server tracks fork lineage and supports fork_count
- Track fork relationships yourself in application metadata (e.g. store parent collection id in the forked collection's metadata)
- Guard the call with a backend capability check and skip/return 0 when embedded
Example fix
# before (raises NotImplementedError)
count = client.get_collection('docs').fork_count()
# after - only call on server-backed clients
if type(client._server).__module__.startswith('chromadb.api.fastapi'):
count = client.get_collection('docs').fork_count()
else:
count = 0 # embedded mode has no fork lineage Defensive patterns
Strategy: try-catch
Validate before calling
def fork_count_safe(collection, default: int = 0) -> int:
try:
return collection.fork_count()
except NotImplementedError:
return default # embedded backend has no fork lineage Try / catch
try:
count = collection.fork_count()
except NotImplementedError as e:
# embedded mode: no fork support
count = 0 Prevention
- Query fork lineage only from server-backed (HttpClient) deployments
- Record parent/child collection relationships in collection metadata when you need lineage embedded
- Centralize backend capability checks instead of scattering try/except at call sites
When it happens
Trigger: client = chromadb.RustClient(...); client.get_collection('docs').fork_count() - or the async equivalent. Any Collection.fork_count() call routed to the Rust bindings backend.
Common situations: Monitoring or lineage-audit code that worked against a Chroma server being run against an embedded Rust client; sharing utility code between server and embedded deployments.
Related errors
- Collection forking is not implemented for Local Chroma
- Indexing status is not implemented for Local Chroma
- Search is not implemented for Local Chroma
- Conditional transactions are only supported when connecting
- Attached functions are only supported when connecting to a C
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/7b63576167bc5c5d.
Report an issue: GitHub.