(label_rows: Sequence[Dict[str, Any]])
| 480 | |
| 481 | |
| 482 | def build_label_map(label_rows: Sequence[Dict[str, Any]]) -> Dict[Tuple[str, str], Dict[str, Any]]: |
| 483 | labels: Dict[Tuple[str, str], Dict[str, Any]] = {} |
| 484 | for row in label_rows: |
| 485 | labels[label_key(row)] = { |
| 486 | "selected": bool(row.get("selected")), |
| 487 | "oracle_score": row.get("oracle_score", 0.0), |
| 488 | "oracle_label": row.get("oracle_label", "irrelevant"), |
| 489 | } |
| 490 | return labels |
| 491 | |
| 492 | |
| 493 | def load_clean_benchmark_inputs(input_dir: Path) -> Tuple[List[Dict[str, Any]], List[Dict[str, Any]]]: |
no test coverage detected