Let `/bulk-lookup` callers tell "not searched" apart from "no matches"
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- api, backend-api-design
Direzione di ricerca
Start by reading lookup() and the /bulk-lookup endpoint, then compare its response shape with /lookup and the RequestValidationError response. Decide whether to document the behavior or expose per-string diagnostics without failing the batch or breaking existing callers; the issue leaves that API design open. Done means callers can distinguish unsearched strings from searched strings with no matches, while one unsearchable string still does not fail the batch.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
/bulk-lookup returns [] for a string that was rejected without being searched and for a string that was searched and matched nothing. A caller cannot tell the two apart.
There are two ways a string gets an empty list today, both from the length check in lookup():
- it is empty, or empty once leading/trailing whitespace is stripped;
- it is shorter than
minimum_query_length(default 2,NAMERES_MINIMUM_QUERY_LENGTH) and is not anexactquery.
/lookup distinguishes these — it rejects them with an HTTP 422 carrying a RequestValidationError body. /bulk-lookup deliberately does not, because failing the whole batch over one bad string is worse than the missing diagnostic (see #279). But that leaves a caller sending a few thousand strings with no way to find out that some of them were never searched, and the natural conclusion — "NameRes has nothing for this string" — is wrong.
This matters most for the callers /bulk-lookup exists to serve: a named entity recognition pipeline feeding NameRes its extracted spans has no reason to expect that a two-character span is treated differently from a twenty-character one, and will silently record a miss.
Worth deciding:
- whether to report it at all, or to document the behaviour more loudly and leave it;
- if reported, where it goes. The response is
Dict[str, List[LookupResult]]keyed by the input string, so there is no obvious place for per-string metadata without changing that shape — which would be a breaking change for every existing caller. A sibling key in the response body ({"results": {...}, "not_searched": [...]}), or an opt-in query parameter that switches to the richer shape, both avoid that.
Note that any fix should keep the property that one unsearchable string does not fail the batch; that part is working as intended.
- Lingua principale
- Python
- Stelle
- 5
- Fork
- 4
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna 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 NCATSTranslator/NameResolution
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 43/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 66/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Tutte le issue di NCATSTranslator/NameResolution
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
huggingface/kernels#1006 ·
I maintainer di solito rispondono entro 1 giorno
-
precond_kda (new op, #1552) backward kernels hit CUDA illegal memory access on Blackwell under triton 3.3.1, pass under triton 3.7.1Forse già presa @YYuJLiu l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
fla-org/flash-linear-attention#1749 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
bridgecrewio/checkov#7804 ·
I maintainer di solito rispondono entro 2 giorni
-
area:filesystem bug need-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
triage/confirmed
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
agentscope-ai/agentscope#4068 ·
I maintainer di solito rispondono entro 2 giorni