Rerank with an empty documents array or object documents fails with an internal tokenizer error
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 24/100
Direzione di ricerca
Read rerank_calculator_ov.cc where the calculator reads getDocumentsList() and calls the tokenizer, then inspect rerank_handler_test.cpp for how empty and object documents are parsed. Reproduce the request with a rerank model and trace how the empty list reaches tokenization. Done means these inputs return a clear 400 response instead of an internal tokenizer error; the report notes a rerank model is needed for end-to-end verification.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
RerankHandler::parseRequest() accepts "documents": [] and documents given as {"title", "text"}
objects. The rerank calculator only reads getDocumentsList() (rerank_calculator_ov.cc), which is
empty in both cases: object documents are parsed into documentsMap, which is not used yet (the docs
list dictionary documents as unsupported, and parseResponse has a TODO for the map). The
calculator then calls the tokenizer with an empty list.
With a real Qwen3 tokenizer, encode() of an empty list throws:
Exception from src/inference/src/cpp/infer_request.cpp:224:
Exception from src/plugins/intel_cpu/src/graph.cpp:1626:
Node SpecialTokensSplit_122229 of type Reference
basic_string::_M_create
The calculator catches the exception and returns its message as an internal error, so the client
gets an opaque 500 instead of a message saying the documents are not supported or are missing.
Two documents given as objects with the same title also collapse into one, because the map is keyed
by title.
I checked the parsing and the tokenizer call separately; I did not run the calculator end to end,
since that needs a rerank model.
To Reproduce
curl http://localhost:8000/v3/rerank -H "Content-Type: application/json" \
-d '{"model": "<rerank model>", "query": "hello", "documents": []}'
The same with "documents": [{"title": "a", "text": "Welcome"}].
Expected behavior
A 400 that says what is wrong: "documents array should not be empty" or "documents given as objects
are not supported, use an array of strings".
Logs
The tokenizer exception above.
Configuration
- OVMS version: main @ eec7daac
- rerank servable
- N/A
- N/A
- N/A
Additional context
The existing tests deliberately expect object documents to parse into the map
(rerank_handler_test.cpp), so I left the parser alone and checked after it.
I have a patch with tests and will open a PR.
- Lingua principale
- C++
- Stelle
- 952
- Fork
- 285
- Merge medio
- 3g 5h
- PR unite (30g)
- 45
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 openvinotoolkit/model_server
-
KServe REST parser drops requested outputs except the lastForse già presa @YugShah1510 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
openvinotoolkit/model_server#4690 ·
I maintainer di solito rispondono entro 2 giorni
-
KServe REST rejects INT64 and UINT64 values outside 32-bit rangeForse già presa @YugShah1510 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
openvinotoolkit/model_server#4688 ·
I maintainer di solito rispondono entro 2 giorni
-
Preserve double precision when parsing FP64 REST inputsForse già presa @YugShah1510 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
openvinotoolkit/model_server#4686 ·
I maintainer di solito rispondono entro 2 giorni
-
Downloading an image from a URL has no timeoutForse già presa @Daksha1611 l’ha presa 5 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
openvinotoolkit/model_server#4669 ·
I maintainer di solito rispondono entro 2 giorni
-
max_tokens and best_of reject a value equal to their configured limitForse già presa @Daksha1611 l’ha presa 5 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
openvinotoolkit/model_server#4666 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di openvinotoolkit/model_server
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
telegramdesktop/tdesktop#31505 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
ll-builder shell completions omit existing lockfile commands and --lockedForse già presa @project-nju-learner l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
OpenAtom-Linyaps/linyaps#2291 ·
I maintainer di solito rispondono entro 1 giorno
-
area: ui bug P3: low value: low
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
patrick-hudson/put.gd-desktop#494 ·
I maintainer di solito rispondono entro 1 giorno