quiet pmass-low warning: one summary per batch

Was emitting `logger.warning("pmass=0.XX<0.9 — top-5: ...")` per-row, which
spammed the log heavily during heavy-steering eval (many rows go OOD at once).
Now collects all low-pmass rows in the batch and emits one summary line with
the worst-case top-5, e.g.:

    pmass<0.9 on 7/16 rows in this batch; worst=0.412 top-5: '1'=0.40, ...

Same diagnostic signal, ~16× fewer log lines per batch.
This commit is contained in:
wassname committed 2026-05-03 06:50:19 +08:00
1 parent e996d57051
commit addf47c5a0
5 files changed
+130 -17

No files matched your search

+4 -3
View File
@@ -22,11 +22,12 @@ from .core import (
score_prompts,
analyse,
)
from .data import load_vignettes
from .data import load_vignettes, load_all_vignettes, CONFIGS
from .eval import evaluate
__all__ = [
"CONDITIONS", "FRAMES",
"CONDITIONS", "FRAMES", "CONFIGS",
"format_prompt", "format_prompts", "bool_token_ids",
"score_prompts", "analyse", "load_vignettes", "evaluate",
"score_prompts", "analyse",
"load_vignettes", "load_all_vignettes", "evaluate",
]