[Bug] [python] ChromaVectorStore.get truncates explicitly requested IDs
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
Direzione di ricerca
Read the BaseVectorStore.get contract in python/flink_agents/api/vector_stores/vector_store.py and the adapter implementation in python/flink_agents/integrations/vector_stores/chroma/chroma_vector_store.py. The report includes a direct reproduction for explicit IDs and a scan without IDs; begin by checking how the adapter forwards limit. Done means requested existing IDs are all returned regardless of limit, while scans still honor limit, with regression tests covering both cases.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Search before asking
- I searched in the issues and found nothing similar.
Description
The public BaseVectorStore.get contract states that when ids is supplied, the ID selection bounds the result and limit is effectively ignored.
The Python Chroma adapter always forwards limit, including the default of 100. Consequently, requesting 101 existing IDs returns 100 documents. Requesting two existing IDs with limit=1 returns one document. Supplying limit=None returns all requested documents.
This can silently omit explicitly requested documents during batch reads. A scan without IDs should continue to respect its limit.
I would like to work on this fix and have prepared a local patch with regression tests. The proposed scope is to ignore the scan limit when IDs are supplied, while retaining filtering and bounded scans. Could a committer confirm whether this approach is appropriate? Please assign the issue to me if that fits the project's workflow.
Related code
How to reproduce
Use the current source checkout with its Python package on PYTHONPATH and the declared Chroma dependency installed.
from flink_agents.api.vector_stores.vector_store import Document
from flink_agents.integrations.vector_stores.chroma.chroma_vector_store import (
ChromaVectorStore,
)
store = ChromaVectorStore(
name="explicit_ids_probe",
embedding_model="unused",
collection="explicit_ids_probe",
)
ids = [str(i) for i in range(101)]
store.add([
Document(
id=doc_id,
content="sample",
metadata={"category": "a"},
embedding=[1.0, 0.0],
)
for doc_id in ids
])
print(len(store.get(ids=ids, limit=None))) # 101
print(len(store.get(ids=ids))) # actual 100, expected 101
print(len(store.get(ids=ids[:2], limit=1))) # actual 1, expected 2
print(len(store.get(limit=1))) # 1, expected 1
The adapter uses a local ephemeral Chroma client. The vectors are precomputed, so this reproduction requires no embedding service or LLM.
Version and environment
- Apache Flink Agents main at
5b0b5531657aacb050201056ebc717fc8e683f09 - Windows, Python 3.12.1
- ChromaDB 1.0.21
- Pydantic 2.12.5
- Reproduced through the adapter directly without a Flink cluster
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Lingua principale
- Java
- Stelle
- 491
- Fork
- 184
- Merge medio
- 1g 17h
- PR unite (30g)
- 69
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/flink-agents
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
apache/flink-agents#1395 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug][plan][java][python] BashTool accepts unlisted bare commands when cwd is allowedForse già presa @wenjin272 l’ha presa oggi. Apertabug priority/major
apache/flink-agents#1392 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Tech Debt] Unify embedding model result APIs across Java and PythonForse già presa @wenjin272 l’ha presa 4 giorni fa. Apertapriority/major tech debt
apache/flink-agents#1385 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Feature][api] Standardize framework duration configurationForse già presa @HsbcJone l’ha presa 4 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 43/100
apache/flink-agents#1384 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
apache/flink-agents#1381 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/flink-agents
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
floci-io/floci#8666 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
quarkiverse/quarkiverse#476 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
chinabugotech/hutool#4364 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
lesson-submission pending-review
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
Ikalus1988/MisakaNet#5115 ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
crowdin/crowdin-api-client-java#441 ·
I maintainer di solito rispondono entro 1 giorno