(path: Path, benchmark_index: dict[str, dict[str, Any]])
| 121 | |
| 122 | |
| 123 | def _iter_jsonl_results(path: Path, benchmark_index: dict[str, dict[str, Any]]) -> Iterator[NormalizedResult]: |
| 124 | with path.open("r", encoding="utf-8") as stream: |
| 125 | for line in stream: |
| 126 | line = line.strip() |
| 127 | if not line: |
| 128 | continue |
| 129 | try: |
| 130 | payload = json.loads(line) |
| 131 | except json.JSONDecodeError: |
| 132 | continue |
| 133 | if not isinstance(payload, dict): |
| 134 | continue |
| 135 | yield from _normalize_payload(payload, path, benchmark_index) |
| 136 | |
| 137 | |
| 138 | def _normalize_payload( |
no test coverage detected