Narration lines all plain white (color scheme toggle kept in _phase_color for quick restore)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
5734f7fbe6
commit
5b595f3a10
@ -199,10 +199,11 @@ def _print_run_plan(console, args, model_spec):
|
|||||||
|
|
||||||
|
|
||||||
def _phase_color(message: str) -> str:
|
def _phase_color(message: str) -> str:
|
||||||
"""Start/finish color code: events that START or are IN progress are
|
"""Narration line color. Currently PLAIN WHITE for everything (user
|
||||||
yellow; events that COMPLETE are green. One glance = what stage,
|
preference); flip the returns to 'yellow'/'green' to restore the
|
||||||
did it finish."""
|
start/finish coloring scheme."""
|
||||||
m = message.lower()
|
return ''
|
||||||
|
m = message.lower() # unreachable, kept for quick restore
|
||||||
if any(k in m for k in ('complete', 'ready', 'downloaded', 'parsed',
|
if any(k in m for k in ('complete', 'ready', 'downloaded', 'parsed',
|
||||||
'restored', 'ok (')):
|
'restored', 'ok (')):
|
||||||
return 'green'
|
return 'green'
|
||||||
@ -215,7 +216,10 @@ def _print_phase(console, index, total, name, message):
|
|||||||
text = f'{prefix}{name}: {message}'
|
text = f'{prefix}{name}: {message}'
|
||||||
color = _phase_color(message)
|
color = _phase_color(message)
|
||||||
if console is not None:
|
if console is not None:
|
||||||
|
if color:
|
||||||
console.print(f'[{color}]{text}[/{color}]', highlight=False)
|
console.print(f'[{color}]{text}[/{color}]', highlight=False)
|
||||||
|
else:
|
||||||
|
console.print(text, highlight=False)
|
||||||
else:
|
else:
|
||||||
print(text, flush=True)
|
print(text, flush=True)
|
||||||
|
|
||||||
@ -493,7 +497,8 @@ def _cmd_eval_run(args) -> int:
|
|||||||
def _emit(msg, _i=i, _n=name):
|
def _emit(msg, _i=i, _n=name):
|
||||||
if _shared_reporter is not None:
|
if _shared_reporter is not None:
|
||||||
_col = _phase_color(msg)
|
_col = _phase_color(msg)
|
||||||
_shared_reporter.log(f'[{_col}][{_i + 1}/{total_runs}] {_n}: {msg}[/{_col}]')
|
_line = f'[{_i + 1}/{total_runs}] {_n}: {msg}'
|
||||||
|
_shared_reporter.log(f'[{_col}]{_line}[/{_col}]' if _col else _line)
|
||||||
else:
|
else:
|
||||||
_print_phase(console, _i + 1, total_runs, _n, msg)
|
_print_phase(console, _i + 1, total_runs, _n, msg)
|
||||||
|
|
||||||
@ -531,7 +536,8 @@ def _cmd_eval_run(args) -> int:
|
|||||||
_tag = f'[{_idx}/{total_runs}] ' if total_runs > 1 else ''
|
_tag = f'[{_idx}/{total_runs}] ' if total_runs > 1 else ''
|
||||||
if _reporter is not None:
|
if _reporter is not None:
|
||||||
_col = _phase_color(msg)
|
_col = _phase_color(msg)
|
||||||
_reporter.log(f'[{_col}]{_tag}{_name}: {msg}[/{_col}]')
|
_line = f'{_tag}{_name}: {msg}'
|
||||||
|
_reporter.log(f'[{_col}]{_line}[/{_col}]' if _col else _line)
|
||||||
if 'scoring' in msg:
|
if 'scoring' in msg:
|
||||||
_reporter.set_phase('scoring')
|
_reporter.set_phase('scoring')
|
||||||
elif 'generating model responses' in msg:
|
elif 'generating model responses' in msg:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user