Judge score profiler samples reasoning with squared category weights, crowding out uncommon scores
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 76/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- machine-learning
Línea de trabajo
Lee sample_scores_and_reasoning en engine/analysis/utils/judge_score_processing.py y las pruebas existentes en tests/engine/analysis/utils/test_judge_score_processing.py. Comprueba cómo la rama proporcional pondera las filas y, después, añade una prueba de regresión con categorías de puntuación desequilibradas. Verifica que los recuentos de categorías muestreadas coincidan con las proporciones esperadas. La tarea estará terminada cuando pase la prueba de regresión y la muestra conserve las puntuaciones poco comunes como se espera.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Priority Level
Low (Cosmetic / Minor)
Describe the bug
sample_scores_and_reasoning in engine/analysis/utils/judge_score_processing.py picks the judge reasoning examples that JudgeScoreProfiler sends to the summarization model and stores in JudgeScoreSummary.score_samples. The code comment says it samples "proportionally to maintain original category ratios", but each row is weighted by the count of its own score category:
weights = df_samples["score"].map(score_category_counts)
samples = df_samples.sample(n=num_samples, weights=weights, random_state=random_seed)
A category with c rows then gets total weight c * c, so the sampled share of each score is proportional to the square of its frequency. Uncommon scores (usually the low ones, which carry the "areas for improvement" reasoning) are crowded out of the sample, and the summary prompt mostly sees reasoning for the majority score.
Steps/Code to reproduce bug
from collections import Counter
from data_designer.engine.analysis.utils.judge_score_processing import sample_scores_and_reasoning
scores = [5] * 90 + [1] * 10
reasoning = [f"r{i}" for i in range(100)]
total = Counter()
for seed in range(200):
sample = sample_scores_and_reasoning(scores, reasoning, num_samples=20, random_seed=seed)
total.update(s.score for s in sample)
n = sum(total.values())
print({k: round(v / n, 3) for k, v in total.items()})
# main (861a082): {5: 0.988, 1: 0.013}
Score 1 is 10% of the records but only 1.3% of the sampled reasoning; most 20-row samples contain no score-1 reasoning at all.
Expected behavior
The sample keeps the score proportions of the data, as the comment describes: about 18 rows with score 5 and 2 with score 1 in the example above.
Prior Investigation
Read sample_scores_and_reasoning and its tests (tests/engine/analysis/utils/test_judge_score_processing.py); the existing tests only check sample sizes and the one-per-category branch, not the proportional branch. Searched open and closed issues and PRs for sample_scores_and_reasoning, judge_score_processing and judge score sampling; found nothing related.
Proposed fix: replace the per-row weights with a proportional allocation per score category (largest-remainder rounding to hit num_samples exactly), then sample that many rows from each category. Plain unweighted df.sample would also be unbiased; the per-category allocation additionally keeps the counts exact so a 10% score is not dropped by chance. I have the fix and a regression test ready and can open a PR once this is triaged.
Checklist
- I reproduced this issue or provided a minimal example
- I searched the docs/issues myself
- Lenguaje dominante
- Python
- Estrellas
- 2.4k
- Forks
- 258
- Merge medio
- 4 d 20 min
- PR fusionados (30 d)
- 32
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 NVIDIA-NeMo/DataDesigner
-
Local seed path containing a single quote breaks the DuckDB queryPosiblemente ocupada @xubenqiang la tomó hace 38 días. Abiertobug triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
NVIDIA-NeMo/DataDesigner#1102 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
enforce \from future import annotations` via ruff FA102 rule`Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertotask
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NVIDIA-NeMo/DataDesigner#760 ·
Los mantenedores suelen responder en 1 día
-
NVIDIA-NeMo/DataDesigner#1205 ·
Los mantenedores suelen responder en 1 día
-
NVIDIA-NeMo/DataDesigner#1204 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 76/100
NVIDIA-NeMo/DataDesigner#1203 ·
Los mantenedores suelen responder en 1 día
Todos los issues de NVIDIA-NeMo/DataDesigner
Issues similares
-
docs(contributing): the two things that silently block a PRPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoavailable documentation good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 95/100
Nixitov/Riptide-Native#944 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
JTHCode/secretguard#24 ·
Los mantenedores suelen responder en 1 día
-
area: middleware documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
omarelshamy25x/shamy-hijri#63 ·
Los mantenedores suelen responder en 1 día