Bugs: One typed detect interface for the detectors package
メンテナーはふだん 1 日以内に返信
@hslev がすでに取り組んでいます。
2026年11月10日 から。
評価
この issue はまだ評価されていません。
説明
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.
- 主要言語
- Python
- スター
- 615
- フォーク
- 60
- 平均マージ
- 2日 18時間
- マージ済み PR(30日)
- 12
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
KRLabsOrg/LettuceDetect のほかの issue
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
KRLabsOrg/LettuceDetect#108 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 半日 初心者へのやさしさ 70/100
KRLabsOrg/LettuceDetect#104 ·
メンテナーはふだん 1 日以内に返信
-
ready-for-agent
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
KRLabsOrg/LettuceDetect#181 ·
メンテナーはふだん 1 日以内に返信
-
ready-for-agent
難易度 5/5 1週間以上 初心者へのやさしさ 22/100
KRLabsOrg/LettuceDetect#180 ·
メンテナーはふだん 1 日以内に返信
-
ready-for-agent
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
KRLabsOrg/LettuceDetect#179 ·
メンテナーはふだん 1 日以内に返信
KRLabsOrg/LettuceDetect の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
FAIRmat-NFDI/pynxtools#861 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
NVIDIA/nsight-python#88 ·
メンテナーはふだん 1 日以内に返信
-
Criteria can pass when the deliverable is missing対応中かも @clementtisseau が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
harveyai/harvey-labs#217 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
priority/medium roadmap/v1.1.1 stakeholder/rapr type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
databrickslabs/ontos#1420 ·
メンテナーはふだん 3 日以内に返信