Output polish: 1-based phase indices everywhere, drop [1/1] prefix on single-bench runs, slim progress bar (drop Waiting/Last columns)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
2dfb60cdf2
commit
b6c473ac26
@ -191,7 +191,9 @@ def _print_run_plan(console, args, model_spec):
|
|||||||
|
|
||||||
|
|
||||||
def _print_phase(console, index, total, name, message):
|
def _print_phase(console, index, total, name, message):
|
||||||
text = f'[{index}/{total}] {name}: {message}'
|
# single-benchmark runs: the [1/1] tag is noise, drop it
|
||||||
|
prefix = f'[{index}/{total}] ' if total > 1 else ''
|
||||||
|
text = f'{prefix}{name}: {message}'
|
||||||
if console is not None:
|
if console is not None:
|
||||||
console.print(f'[cyan]{text}[/cyan]')
|
console.print(f'[cyan]{text}[/cyan]')
|
||||||
else:
|
else:
|
||||||
@ -302,11 +304,12 @@ def _cmd_eval_run(args) -> int:
|
|||||||
# writer during the live bar interleave incorrectly
|
# writer during the live bar interleave incorrectly
|
||||||
progress_reporter = RichTerminalProgress(console=console)
|
progress_reporter = RichTerminalProgress(console=console)
|
||||||
|
|
||||||
def status_callback(msg, _idx=i, _name=name,
|
def status_callback(msg, _idx=i + 1, _name=name,
|
||||||
_reporter=progress_reporter,
|
_reporter=progress_reporter,
|
||||||
_console=console):
|
_console=console):
|
||||||
if _reporter is not None:
|
if _reporter is not None:
|
||||||
_reporter.log(f'[{_idx}/{total_runs}] {_name}: {msg}')
|
tag = f'[{_idx}/{total_runs}] ' if total_runs > 1 else ''
|
||||||
|
_reporter.log(f'{tag}{_name}: {msg}')
|
||||||
else:
|
else:
|
||||||
_print_phase(_console, _idx, total_runs, _name, msg)
|
_print_phase(_console, _idx, total_runs, _name, msg)
|
||||||
report = asyncio.run(run_eval(
|
report = asyncio.run(run_eval(
|
||||||
|
|||||||
@ -26,10 +26,8 @@ class RichTerminalProgress:
|
|||||||
BarColumn(complete_style="green", finished_style="bold green"),
|
BarColumn(complete_style="green", finished_style="bold green"),
|
||||||
TaskProgressColumn(),
|
TaskProgressColumn(),
|
||||||
TextColumn("• Completed {task.completed}/{task.total}"),
|
TextColumn("• Completed {task.completed}/{task.total}"),
|
||||||
TextColumn("• In flight {task.fields[inflight]}"),
|
TextColumn("• in-flight {task.fields[inflight]}"),
|
||||||
TextColumn("• Waiting {task.fields[waiting]}"),
|
TextColumn("• {task.fields[rate]}/s"),
|
||||||
TextColumn("• Last {task.fields[last_result]}"),
|
|
||||||
TextColumn("• {task.fields[rate]} sample/s"),
|
|
||||||
TextColumn("•"),
|
TextColumn("•"),
|
||||||
TimeElapsedColumn(),
|
TimeElapsedColumn(),
|
||||||
TextColumn("•"),
|
TextColumn("•"),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user