(path: Path)
| 12 | |
| 13 | |
| 14 | def iter_jsonl(path: Path) -> Iterable[Dict[str, Any]]: |
| 15 | with path.open("r", encoding="utf-8-sig") as handle: |
| 16 | for line in handle: |
| 17 | line = line.strip() |
| 18 | if line: |
| 19 | yield json.loads(line) |
| 20 | |
| 21 | |
| 22 | def as_float(value: Any) -> float | None: |