Bugs: One typed detect interface for the detectors package
Los mantenedores suelen responder en 1 día
@hslev ya está trabajando en esto.
Desde el 10/11/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 615
- Forks
- 60
- Merge medio
- 2 d 18 h
- PR fusionados (30 d)
- 12
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de KRLabsOrg/LettuceDetect
-
enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
KRLabsOrg/LettuceDetect#108 ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 Medio día Aptitud para principiantes 70/100
KRLabsOrg/LettuceDetect#104 ·
Los mantenedores suelen responder en 1 día
-
ready-for-agent
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
KRLabsOrg/LettuceDetect#181 ·
Los mantenedores suelen responder en 1 día
-
ready-for-agent
Dificultad 5/5 Más de una semana Aptitud para principiantes 22/100
KRLabsOrg/LettuceDetect#180 ·
Los mantenedores suelen responder en 1 día
-
ready-for-agent
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
KRLabsOrg/LettuceDetect#179 ·
Los mantenedores suelen responder en 1 día
Todos los issues de KRLabsOrg/LettuceDetect
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
FAIRmat-NFDI/pynxtools#861 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
NVIDIA/nsight-python#88 ·
Los mantenedores suelen responder en 1 día
-
Criteria can pass when the deliverable is missingPosiblemente ocupada @clementtisseau la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
harveyai/harvey-labs#217 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
priority/medium roadmap/v1.1.1 stakeholder/rapr type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
databrickslabs/ontos#1420 ·
Los mantenedores suelen responder en 3 días