b1k_model / evaluation /progress.py
davidwdw's picture
Upload B1K model checkpoints, training recipes, and evaluation artifacts (part 8)
c556874 verified
Raw History Blame Contribute Delete
840 Bytes
import json,time
from pathlib import Path
root=Path(__file__).resolve().parent
s=json.loads((root/'status.json').read_text());print('STATE',s['state'],'active',s.get('active_variant'),'updated',s['updated'])
for variant in ['human','codegen_success','mix_h50_c50']:
p=root/'results'/variant
rows=[json.loads(f.read_text()) for f in sorted((p/'json').glob('*.json'))]
print(variant, f'{len(rows)}/20', 'success',sum(r['success'] for r in rows), 'latest',[(r['instance_id'],r['success'],r['steps']) for r in rows][-3:])
if variant==s.get('active_variant') and (p/'policy-events.jsonl').exists():
lines=(p/'policy-events.jsonl').read_text().splitlines()
if lines:
e=json.loads(lines[-1]);print('latest_event',e,'seconds_ago',round(time.time()-e['time'],1))
if 'error' in s:print('ERROR',s['error'])