From 8bac3483b643a0b1bc5e863aa3347dd2738dd52e Mon Sep 17 00:00:00 2001 From: sora <2075279110@qq.com> Date: Fri, 11 Sep 2026 04:35:27 +0000 Subject: [PATCH] Fixes: theme markup closing tags ([bold green]...[/bold green]); evaluate() runs off the event loop (sympy equivalence on hard math froze the progress clock for the whole bench) Co-Authored-By: Claude --- evalharness/model/runner.py | 6 +++++- evalharness/themes/default.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/evalharness/model/runner.py b/evalharness/model/runner.py index 37d5d70..36b9e4d 100644 --- a/evalharness/model/runner.py +++ b/evalharness/model/runner.py @@ -745,7 +745,11 @@ async def run_eval( if status_callback: status_callback('Scoring predictions against the benchmark recipe') - report = evaluate( + # scoring off the event loop: math_equal/sympy equivalence can chew a + # single hard problem for minutes (es's checker famously hangs on one) -- + # running it inline froze the progress bar's clock for the whole bench + report = await asyncio.to_thread( + evaluate, samples, preds, recipe, model=model_spec, judge=judge, diff --git a/evalharness/themes/default.py b/evalharness/themes/default.py index 068bff3..aeed383 100644 --- a/evalharness/themes/default.py +++ b/evalharness/themes/default.py @@ -32,7 +32,7 @@ def narrate(msg: str) -> str: m = re.search(r'[:ยท] ([a-zA-Z_@]+ [0-9.]+%)(?=\s|$)', msg) if m: - head = f'{icon}{msg[:m.start()]}: [bold {FACT_COLOR}]{m.group(1)}[/{FACT_COLOR}]' + head = f'{icon}{msg[:m.start()]}: [bold {FACT_COLOR}]{m.group(1)}[/bold {FACT_COLOR}]' return head + fact(msg[m.end():]) for sep in ('-> ', 'to '): head, _, tail = msg.rpartition(sep)