Rerank with an empty documents array or object documents fails with an internal tokenizer error
Maintainer thường phản hồi trong vòng 3 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 24/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C++
- Star
- 947
- Fork
- 280
- Merge trung bình
- 3 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 46
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của openvinotoolkit/model_server
-
Downloading an image from a URL has no timeoutCó thể đã có người làm @Daksha1611 đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
openvinotoolkit/model_server#4669 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
max_tokens and best_of reject a value equal to their configured limitCó thể đã có người làm @Daksha1611 đã nhận 4 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
openvinotoolkit/model_server#4666 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
/v1/tokenize returns a flat list when the text array holds a single stringCó thể đã có người làm @Daksha1611 đã nhận 4 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
openvinotoolkit/model_server#4664 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
String-typed tool call arguments are rewritten when the text is valid JSONCó thể đã có người làm @Daksha1611 đã nhận 4 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
openvinotoolkit/model_server#4662 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
/v3/audio/speech ignores response_format and always returns 32-bit float WAVCó thể đã có người làm @michalkulakowski đã nhận 22 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
openvinotoolkit/model_server#4613 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của openvinotoolkit/model_server
Issue tương tự
-
(S1 - Need confirmation)
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CleverRaven/Cataclysm-DDA#89212 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Status: Needs confirmation Status: Needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ai_p2 comp-dictionary
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ClickHouse/ClickHouse#127261 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NVIDIA-Omniverse/usd-brep#23 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
qbittorrent/qBittorrent#25121 ·
Maintainer thường phản hồi trong vòng 2 ngày