diff --git a/evalharness/cli.py b/evalharness/cli.py index 6874585..448dee0 100644 --- a/evalharness/cli.py +++ b/evalharness/cli.py @@ -262,12 +262,19 @@ def _print_result_panel(console, rep, wall_s: float = 0.0): body = Table(show_header=False, box=None, padding=(0, 2)) body.add_column('k', style='dim', no_wrap=True) body.add_column('v', overflow='fold') + def score_bar(v, width=22): + # rich-Bar-style glyphs with half-cell precision: ━━━╸╌╌ + filled = max(0.0, min(1.0, v)) * width + full = int(filled) + half = '╸' if filled - full >= 0.5 else '' + return '━' * full + half + '╌' * (width - full - len(half)) + for m, v in metrics: if m == 'extraction_failure_rate': continue - bar = Text('█' * int(round(v * 24)) + '·' * (24 - int(round(v * 24)))) - bar.stylize(color(v)) - body.add_row(m, Text.assemble(f'{v * 100:6.1f}% ', bar)) + body.add_row(m, Text.assemble( + (f'{v * 100:6.1f}% ', f'bold {color(v)}'), + (score_bar(v), color(v)))) stats = [] stats.append(f'n={rep.num_samples}') if wall_s >= 1: @@ -343,12 +350,19 @@ def _print_result_panel(console, rep, wall_s: float = 0.0): body = Table(show_header=False, box=None, padding=(0, 2)) body.add_column('k', style='dim', no_wrap=True) body.add_column('v', overflow='fold') + def score_bar(v, width=22): + # rich-Bar-style glyphs with half-cell precision: ━━━╸╌╌ + filled = max(0.0, min(1.0, v)) * width + full = int(filled) + half = '╸' if filled - full >= 0.5 else '' + return '━' * full + half + '╌' * (width - full - len(half)) + for m, v in metrics: if m == 'extraction_failure_rate': continue - bar = Text('█' * int(round(v * 24)) + '·' * (24 - int(round(v * 24)))) - bar.stylize(color(v)) - body.add_row(m, Text.assemble(f'{v * 100:6.1f}% ', bar)) + body.add_row(m, Text.assemble( + (f'{v * 100:6.1f}% ', f'bold {color(v)}'), + (score_bar(v), color(v)))) stats = [] stats.append(f'n={rep.num_samples}') if wall_s >= 1: