Download evaluation/progress.py from davidwdw/b1k_model: direct link, hf CLI and curl.
- Browser
- Download file 840 Bytes
-
https://huggingface.co/davidwdw/b1k_model/resolve/main/evaluation/progress.py
- Command line
-
hf download hf://davidwdw/b1k_model/evaluation/progress.py
-
curl -L -o progress.py https://huggingface.co/davidwdw/b1k_model/resolve/main/evaluation/progress.py
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']) | |