Rerank with an empty documents array or object documents fails with an internal tokenizer error
メンテナーはふだん 3 日以内に返信
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- C++
- スター
- 947
- フォーク
- 280
- 平均マージ
- 3日 14時間
- マージ済み PR(30日)
- 46
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openvinotoolkit/model_server のほかの issue
-
Downloading an image from a URL has no timeout対応中かも @Daksha1611 が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
openvinotoolkit/model_server#4669 ·
メンテナーはふだん 3 日以内に返信
-
max_tokens and best_of reject a value equal to their configured limit対応中かも @Daksha1611 が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
openvinotoolkit/model_server#4666 ·
メンテナーはふだん 3 日以内に返信
-
/v1/tokenize returns a flat list when the text array holds a single string対応中かも @Daksha1611 が 4 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
openvinotoolkit/model_server#4664 ·
メンテナーはふだん 3 日以内に返信
-
String-typed tool call arguments are rewritten when the text is valid JSON対応中かも @Daksha1611 が 4 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
openvinotoolkit/model_server#4662 ·
メンテナーはふだん 3 日以内に返信
-
/v3/audio/speech ignores response_format and always returns 32-bit float WAV対応中かも @michalkulakowski が 22 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
openvinotoolkit/model_server#4613 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
openvinotoolkit/model_server の issue をすべて見る
似ている issue
-
cudf-polars feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 2 日以内に返信
-
(S1 - Need confirmation)
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CleverRaven/Cataclysm-DDA#89212 ·
メンテナーはふだん 1 日以内に返信
-
Status: Needs confirmation Status: Needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
a byte order mark at the start of a migration makes dbmate miss the up block対応中かも @Dem1241 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 2 日以内に返信
-
ai_p2 comp-dictionary
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ClickHouse/ClickHouse#127261 ·
メンテナーはふだん 1 日以内に返信