Get typed spans from the encoder
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
調査の方向性
Start with the encoder and detector implementations, the taxonomy head code, and the detector contract and custom taxonomy tests; the issue names no file paths, so locate these from the project structure. First read the detector contract and the existing typed golden fixtures, then trace how TransformerDetector handles taxonomy and usage. Done when typed EncoderDetector calls satisfy the acceptance criteria and the existing tests pass unchanged; the work is blocked by issue #148.
索引モデルが issue の本文から書いたものです。
説明
Parent
#126
Branch
Branch from stateless_core and open the pull request against it, not main. Close this ticket by hand once its pull request merges there: GitHub only closes issues automatically on merges into main.
What to build
An encoder detector that types its spans. The taxonomy typing head becomes a loaded object like the encoder: TaxonomyTyper takes an already loaded encoder and tokenizer, and from_pretrained is where its name becomes a model. With a typer, every span in a Detection carries category and subcategory, and the result's usage names the typer as well as the encoder, so a typed call is metered completely.
The old TransformerDetector(taxonomy_head=...) keeps working and keeps producing today's typed output.
Acceptance criteria
-
TaxonomyTyper(encoder, tokenizer, *, categories=None, subcategories=None, max_length=1024, model_id=None, model_version=None)takes loaded objects and downloads nothing;TaxonomyTyper.from_pretrained(model_id, *, device=None, categories=None, subcategories=None, model_version=None, **loader_kwargs)loads them and logsmodel_loaded. -
EncoderDetector.from_pretrained(..., taxonomy_head=<id or path>, include_taxonomy=...)builds the typer throughTaxonomyTyper.from_pretrained.include_taxonomyacceptsTrue, a list of category names, a flat{name: description}dict and the nested{"categories": ..., "subcategories": ...}dict, with the same meaning as today. - With a typer, every
DetectedSpanfromdetecthascategoryandsubcategory; without one both areNone. For aSourcesInputthe typer sees the sources joined by a newline, and for aPromptInputthe prompt, as today. -
adetecton a typedEncoderDetectorreturns a result equal todetect, with the same typed spans and the same twousageentries. -
usagehas two entries for an encoder with a typer: the encoder as before, and the typer with itsmodel_id,model_versionand the unitspans. When there are no spans the typer's entry reportsspansas 0. - A typer
from_pretrainedfor a local path takes the caller'smodel_version, and records the resolved commit otherwise. -
TransformerDetector(taxonomy_head=...)still types its spans, and the output equals the typed golden fixtures. - The detector contract suite passes for a typed
EncoderDetector. - The existing tests, including the custom taxonomy tests, pass unchanged.
- The changed code follows the Errors and logging section of
CONTRIBUTING.md, and no customer text is logged outsidelettucedetect.content.
Blocked by
#148
User stories covered
20, 40, 50
- 主要言語
- 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 日以内に返信
-
Bugs: One typed detect interface for the detectors package対応中かも @hslev が 1 日前に担当しました。 オープン
KRLabsOrg/LettuceDetect#192 · 担当者 1 名 ·
メンテナーはふだん 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 日以内に返信
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 日以内に返信