Error panel centered; comma-joined benchmark names get an immediate fix hint

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
sora 2026-09-10 10:43:41 +00:00
parent a3269252fd
commit c54207a180

View File

@ -439,6 +439,14 @@ def _cmd_eval_run(args) -> int:
from evalharness.data import get_dataset from evalharness.data import get_dataset
from evalharness.viz import render from evalharness.viz import render
comma = [d for d in getattr(args, 'datasets', []) if ',' in d]
if comma:
tip = ', '.join(comma)
fixed = ' '.join(tip.split(','))
raise SystemExit(
f'error: benchmark names must be SPACE-separated.\n'
f' got: evalharness eval run {tip}\n'
f' expected: evalharness eval run {fixed}')
overrides = _overrides(args) overrides = _overrides(args)
out_dir = args.out_dir out_dir = args.out_dir
if out_dir: if out_dir:
@ -574,7 +582,7 @@ def _cmd_eval_run(args) -> int:
console.print(Panel( console.print(Panel(
f'{type(e).__name__}: {e}', f'{type(e).__name__}: {e}',
title=f'[bold red]✗ {name} FAILED[/bold red]', title=f'[bold red]✗ {name} FAILED[/bold red]',
border_style='red', expand=False)) border_style='red', expand=False), justify='center')
_print_benchmark_result(console, i + 1, total_runs, name, _print_benchmark_result(console, i + 1, total_runs, name,
'failed', _time.time() - t0) 'failed', _time.time() - t0)