Type spans in EncoderDetector.detect and meter the typer
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 54/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- backend-api-design, machine-learning
Direzione di ricerca
Start with EncoderDetector._detect, EncoderDetector.adetect, EncoderDetector.from_pretrained, and TransformerDetector; the issue also points to taxonomy_head.py:96 and transformer.py:383. Run the listed pytest command first, then trace how spans and usage are built and inspect the typed golden fixtures from #128. Done when typed and untyped outputs, both usage entries, and the stated test suites match the acceptance criteria.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Parent: #153 · Epic: #126 · Blocked by: #154, #150
Branch from stateless_core; open the PR against it.
Problem
A typed call is not metered completely and typed spans don't exist in Detection: the typer's work is invisible in usage, and category/subcategory appear only in the old dicts.
Current behavior
- Typing happens in the old
predictpath viaTaxonomyTyper.type_spans(taxonomy_head.py:96) after_build_spans_from_tokens(transformer.py:383); context is the sources joined by newline (or the prompt). Detectionhas no typer usage entry.
Steps
- In
EncoderDetector._detect, when a typer is set, call it for the spans and fillDetectedSpan.categoryandsubcategory; without a typer both areNone. Context: sources joined by"\n"forSourcesInput, the prompt forPromptInput. - Add a second
Usagefor the typer: itsmodel_id,model_version, unitspans(0 when there are no spans). adetecton a typedEncoderDetectorneeds no override: it runsdetect, including the typer call, in one worker thread, so the typed result is the same as the sync one.EncoderDetector.from_pretrained(taxonomy_head=..., include_taxonomy=...)builds the typer throughTaxonomyTyper.from_pretrained, all fourinclude_taxonomyforms.TransformerDetector(taxonomy_head=...)still types spans; output equals the typed golden fixtures from #128.
Acceptance criteria
- With a stub typer every span has
categoryandsubcategory; without one bothNone. -
await adetect(...)on a typedEncoderDetectorequalsdetect: samecategory/subcategoryon every span and the same twousageentries; the loop stays free while it waits. - Two
usageentries with a typer, one without; typer entry reportsspans= 0 when there are none. - Typed golden fixtures and
tests/test_custom_taxonomy_pytest.pypass unchanged. - Contract suite passes for a typed
EncoderDetector; follows CONTRIBUTING "Errors and logging".
Start here
uv run --extra dev pytest tests/test_custom_taxonomy_pytest.py tests/test_golden_transformer_pytest.py -q
- Lingua principale
- Python
- Stelle
- 615
- Fork
- 60
- Merge medio
- 1g 8h
- PR unite (30g)
- 10
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di KRLabsOrg/LettuceDetect
-
Stop-hook --min-confidence drops every --llm-model span (missing confidence treated as 0.0), reporting hallucinated answers as cleanForse già presa @Clannad47 l’ha presa 18 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
KRLabsOrg/LettuceDetect#117 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
KRLabsOrg/LettuceDetect#108 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 Mezza giornata Idoneità per principianti 70/100
KRLabsOrg/LettuceDetect#104 ·
I maintainer di solito rispondono entro 1 giorno
-
ready-for-agent
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
KRLabsOrg/LettuceDetect#181 ·
I maintainer di solito rispondono entro 1 giorno
-
ready-for-agent
Difficoltà 5/5 Più di una settimana Idoneità per principianti 22/100
KRLabsOrg/LettuceDetect#180 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di KRLabsOrg/LettuceDetect
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
NVIDIA/auto-ontology#463 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
NousResearch/hermes-agent#151165 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
code-health
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
tinaudio/synth-setter#3750 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] vllm-sr config migrate drops providers.models[].deploymentForse già presa @Bevisy l’ha presa oggi. Apertaneeds-acceptance wg/developer-experience-ecosystem
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
vllm-project/semantic-router#5996 ·
I maintainer di solito rispondono entro 2 giorni