prophet-v3 / code /della /page_preds.py
drkylj's picture
Add predictor results (Opus/Sonnet/Haiku 5.5, effort high): forecasts, scores, audits, analyses; launch and audit code
2e7f744 verified
Raw History Blame Contribute Delete
861 Bytes
"""Forecasts of every predictor except Opus 5.5 high (already in curves_all.json) for the artifact page:
results/v3/page_preds.json = {tag: {task_id: {target: score}}}. Only trials with a readable, non-empty agent log
(auditable) are kept. Usage: python -I v3/della/page_preds.py sonnet55-high haiku55-high ..."""
import json, os, sys
R = '/scratch/gpfs/TRIDAO/ly3223/oraclebench/'
out = {}
for tag in sys.argv[1:]:
m = {}
for l in open(R + f'results/v3/{tag}.preds.jsonl'):
r = json.loads(l); log = r['trial'] + '/agent/claude-code.txt'
if os.path.exists(log) and os.path.getsize(log) > 0:
m[r['task_id']] = {p['target']: p['score'] for p in r['predictions'] if isinstance(p.get('score'), (int, float))}
out[tag] = m; print(tag, len(m))
json.dump(out, open(R + 'results/v3/page_preds.json', 'w'), separators=(',', ':'))