diff --git a/evalharness/cli.py b/evalharness/cli.py index 08e0b45..05ff19a 100644 --- a/evalharness/cli.py +++ b/evalharness/cli.py @@ -202,6 +202,13 @@ def _print_run_plan(console, args, model_spec): def _narration(msg: str) -> str: """Icon + path-highlighting for narration lines (visual separation at a glance; paths in cyan).""" + # semantic numbers get bold: samples counts, checkpoint fractions, + # generation counts, few-shot counts (curated, not rich's blanket highlight) + import re as _re0 + + msg = _re0.sub(r'(? None: """ if getattr(adapter, 'name', '') == 'mock': return + _probe_model._t0 = time.monotonic() members = getattr(adapter, 'adapters', [adapter]) if model_spec in _PROBED_SPECS: return @@ -549,8 +550,18 @@ async def _probe_model(adapter, model_spec: str) -> None: ' and --model matches the served model name. Verify manually:\n' f' {curl}') if members and not bad: - msg = f'model endpoint ok ({len(members)} instance(s), {members[0].api_base})' - print(f'· {msg}', flush=True) # probe runs before status_callback exists + import sys as _sys + + dur = time.monotonic() - _probe_model._t0 if hasattr(_probe_model, '_t0') else 0.0 + name = getattr(members[0], 'model', '') or '?' + url = members[0].api_base + txt = (f'· model endpoint ok · model={name} · endpoint={url} · ' + f'instances={len(members)} · probe={dur:.1f}s') + if _sys.stdout.isatty(): # color the machine-relevant facts on terminals + txt = (f'· model endpoint ok · model=\x1b[1m{name}\x1b[0m · ' + f'endpoint=\x1b[36m{url}\x1b[0m · ' + f'instances={len(members)} · probe={dur:.1f}s') + print(txt, flush=True) # probe runs before status_callback exists _PROBED_SPECS.add(model_spec) async def run_eval(