From 0ca8aedefe8a89b2197a57ddc09e463bb9f40a9c Mon Sep 17 00:00:00 2001 From: sora <2075279110@qq.com> Date: Fri, 11 Sep 2026 03:16:08 +0000 Subject: [PATCH] Scoring line: colon restored, full sentence (score over N samples), score keeps solid green with yellow phrase tail; path coloring covers 'to /abs' endings Co-Authored-By: Claude --- evalharness/cli.py | 21 ++++++++++++++------- evalharness/model/runner.py | 5 +++-- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/evalharness/cli.py b/evalharness/cli.py index e948708..3458cf9 100644 --- a/evalharness/cli.py +++ b/evalharness/cli.py @@ -228,10 +228,16 @@ def _narration(msg: str) -> str: # gets bold green -- it is what the eye should find first import re as _re1 - m = _re1.search(r'[:·] ([a-zA-Z_@]+ [0-9.]+%)$', msg) + m = _re1.search(r'[:·] ([a-zA-Z_@]+ [0-9.]+%)(?=\s|$)', msg) if m: - return (f'{icon}{msg[:m.start()]}' - f'[bold green]{m.group(1)}[/bold green]') + head = f'{icon}{msg[:m.start()]}: [bold green]{m.group(1)}[/bold green]' + tail = msg[m.end():] + if tail: + import re as _re2 + + tail = _re2.sub(r'(? str: msg = _re0.sub(r'(?' - if '-> ' in msg: - head, _, tail = msg.partition('-> ') - return f'{icon}{head}-> [cyan]{tail}[/cyan]' + # highlight any trailing path after '->' or 'to' (only absolute paths) + for sep in ('-> ', 'to '): + head, _, tail = msg.rpartition(sep) + if head and tail.startswith('/'): + return f'{icon}{head}{sep}[cyan]{tail}[/cyan]' return f'{icon}{msg}' diff --git a/evalharness/model/runner.py b/evalharness/model/runner.py index f24c25b..71ec39a 100644 --- a/evalharness/model/runner.py +++ b/evalharness/model/runner.py @@ -746,8 +746,9 @@ async def run_eval( if status_callback: _m = next(((k, v) for k, v in report.metrics.items() if k != 'extraction_failure_rate'), None) - status_callback(f'Scoring complete: {_m[0]} {_m[1] * 100:.1f}%' - if _m else 'scoring complete') + status_callback(f'Scoring complete: {_m[0]} {_m[1] * 100:.1f}% ' + f'over {report.num_samples} samples' + if _m else 'Scoring complete') # performance profile: pool success rate + latency/ttft percentiles try: from .aggregator import get_aggregator