Bugs: One typed detect interface for the detectors package
Maintainer thường phản hồi trong vòng 1 ngày
@hslev đang làm issue này rồi.
Từ ngày 10/11/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
A bug issue created from @adaamko's comment
EncoderDetector(model, tokenizer, typer):typeris positional.EncoderDetector(model, tok, EncoderConfig(max_length=512))constructs fine with the config taken as the typer andmax_lengthleft at 4096. It fails only at the first span, withAttributeError: 'EncoderConfig' object has no attribute 'type_spans'(encoder.py:240-249). Making everything aftertokenizerkeyword-only fixes it.- A
TransformerDetectorsubclass that overridespredictis bypassed bydetect(). With a subclass whosepredictpost-filters spans,predict()returns['short']anddetect()returns['word', 'short']. Nothing visible breaks today, but oncepredict_prompt_batchandHallucinationDetectorroute throughdetect, such subclasses silently change behaviour.BaseDetectoralready bridges detect-less subclasses throughpredict; the same bridge could apply whenpredictorpredict_promptis overridden. make_cache_key(kind=...)rejects every kind exceptjudge,nativeandverify(response_cache.py:29-30). It is public, but the fact-checker (#169) and third-party detectors can't use it with their own kind.Detection.tokensincludes the trailing[SEP]as a flagged token. For a 30-character answer the last entry isTokenScore(token='[SEP]', start=30, end=30, score=0.99, flagged=True)(encoder.py:521-522). The deprecatedpredictpath has to keep this for the golden fixtures, but the new output should drop zero-width tokens.TokenScorealso acceptsend < start, whileSpanrejects it.detect()with a dict request raisesAttributeError('dict' object has no attribute 'answer') instead ofInvalidInputError.- A detect-only detector inherits a
predict()whose default fails. The defaultoutput_format="tokens"raisestokens_not_supportedfor any detector without token support. - Two doc mismatches. CONTRIBUTING points to
tests/test_deprecation.py, but the file istests/test_deprecation_pytest.py. TheEncoderConfig.batch_sizedocstring describes padded batches, whichdetectdoesn't do until #175.
- Ngôn ngữ chính
- Python
- Star
- 615
- Fork
- 60
- Merge trung bình
- 2 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 12
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 KRLabsOrg/LettuceDetect
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
KRLabsOrg/LettuceDetect#108 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 70/100
KRLabsOrg/LettuceDetect#104 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ready-for-agent
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
KRLabsOrg/LettuceDetect#181 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ready-for-agent
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 22/100
KRLabsOrg/LettuceDetect#180 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ready-for-agent
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
KRLabsOrg/LettuceDetect#179 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của KRLabsOrg/LettuceDetect
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
FAIRmat-NFDI/pynxtools#861 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
NVIDIA/nsight-python#88 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Criteria can pass when the deliverable is missingCó thể đã có người làm @clementtisseau đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
harveyai/harvey-labs#217 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
priority/medium roadmap/v1.1.1 stakeholder/rapr type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
databrickslabs/ontos#1420 ·
Maintainer thường phản hồi trong vòng 3 ngày