| 113 | |
| 114 | |
| 115 | def read_rows() -> list[dict[str, object]]: |
| 116 | rows: list[dict[str, object]] = [] |
| 117 | with SOURCE.open("r", encoding="utf-8-sig", newline="") as fh: |
| 118 | reader = csv.DictReader(fh) |
| 119 | for row in reader: |
| 120 | model_key = row["model_key"] |
| 121 | rows.append( |
| 122 | { |
| 123 | "model_key": model_key, |
| 124 | "model": DISPLAY_NAMES.get(model_key, row["model_name"]), |
| 125 | "group": "Closed" if row["group"].startswith("Closed") else "Open", |
| 126 | "auto": float(row["ModelAutoScore"]), |
| 127 | "human": float(row["ModelHumanScore"]), |
| 128 | } |
| 129 | ) |
| 130 | return rows |
| 131 | |
| 132 | |
| 133 | def pearson(xs: list[float], ys: list[float]) -> float: |