ModelOption: design a comprehensive validation strategy

Abierto
#1,148 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
15/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Tranquilo
Stack tecnológico
python
Área
backend

Línea de trabajo

The issue asks for a single validation strategy for ModelOption sentinels such as STOP_SEQUENCES, TEMPERATURE and MAX_NEW_TOKENS, so the work is design before code. Read the discussion in #1112, where a per-option validate_stop_sequences helper was prototyped and removed, to see why. Done means an agreed approach for validating all options consistently, not a single fix.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area/backends enhancement needs-design p2

Context

Mellea's ModelOption sentinels (e.g. STOP_SEQUENCES, TEMPERATURE, MAX_NEW_TOKENS) are passed through to backends with no type or value validation. Today, an invalid value typically surfaces as a confusing backend-specific error (or silently misbehaves) far from the user's call site.

This came up concretely in #1112: STOP_SEQUENCES requires list[str] for uniform behavior across backends — a bare str works on OpenAI/LiteLLM but breaks HuggingFace's stop_strings. A per-option validate_stop_sequences helper was prototyped there but pulled out, since validating one option in isolation creates inconsistency with the rest.

What we want

We need a single, consistent strategy for validating ModelOption values.

Lenguaje dominante
Python
Estrellas
1.8k
Forks
161
Merge medio
4 d 3 h
PR fusionados (30 d)
45

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de generative-computing/mellea

Todos los issues de generative-computing/mellea

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.