Judge score profiler samples reasoning with squared category weights, crowding out uncommon scores
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
調査の方向性
engine/analysis/utils/judge_score_processing.py の sample_scores_and_reasoning と、tests/engine/analysis/utils/test_judge_score_processing.py にある既存のテストを読みます。比例分岐が行にどのように重みを付けるかを確認し、スコアカテゴリに偏りのあるデータを使った回帰テストを追加します。サンプリングされたカテゴリの件数が期待される比率と一致することを検証します。回帰テストが成功し、サンプルに少数のスコアが期待どおりに残ることを確認できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Python
- スター
- 2.4k
- フォーク
- 258
- 平均マージ
- 4日 20分
- マージ済み PR(30日)
- 32
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA-NeMo/DataDesigner のほかの issue
-
Local seed path containing a single quote breaks the DuckDB query対応中かも @xubenqiang が 38 日前に担当しました。 オープンbug triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
NVIDIA-NeMo/DataDesigner#1102 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
enforce \from future import annotations` via ruff FA102 rule`再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンtask
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NVIDIA-NeMo/DataDesigner#760 ·
メンテナーはふだん 1 日以内に返信
-
NVIDIA-NeMo/DataDesigner#1205 ·
メンテナーはふだん 1 日以内に返信
-
NVIDIA-NeMo/DataDesigner#1204 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
NVIDIA-NeMo/DataDesigner#1203 ·
メンテナーはふだん 1 日以内に返信
NVIDIA-NeMo/DataDesigner の issue をすべて見る
似ている issue
-
docs(contributing): the two things that silently block a PR対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンavailable documentation good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 95/100
Nixitov/Riptide-Native#944 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
JTHCode/secretguard#24 ·
メンテナーはふだん 1 日以内に返信
-
area: middleware documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
omarelshamy25x/shamy-hijri#63 ·
メンテナーはふだん 1 日以内に返信