Let `/bulk-lookup` callers tell "not searched" apart from "no matches"
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- api, backend-api-design
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
/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.
- Ngôn ngữ chính
- Python
- Star
- 5
- Fork
- 4
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không 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 NCATSTranslator/NameResolution
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 43/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 66/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Tất cả issue của NCATSTranslator/NameResolution
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
huggingface/kernels#1006 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
precond_kda (new op, #1552) backward kernels hit CUDA illegal memory access on Blackwell under triton 3.3.1, pass under triton 3.7.1Có thể đã có người làm @YYuJLiu đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
fla-org/flash-linear-attention#1749 ·
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 78/100
bridgecrewio/checkov#7804 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area:filesystem bug need-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
triage/confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
agentscope-ai/agentscope#4068 ·
Maintainer thường phản hồi trong vòng 2 ngày