"""Validate the result inventory and recompute deterministic aggregate scores.""" import collections import json import math def read(path): return json.loads(path.read_text()) def aggregate(benchmark, rows): verdicts = [r['julgamento']['veredito'] for r in rows] scores = [r['score'] for r in rows] if benchmark == 'arena-hard-v2': import numpy as np labels = {'A>B': [1], 'A>>B': [1]*3, 'A=B': [.5], 'AA': [0], 'B>>A': [0]*3, 'B=A': [.5], 'B