MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / load_jsonl

Function load_jsonl

experiments/benchmark/export_clean_baseline_benchmark.py:119–129  ·  view source on GitHub ↗
(path: Path)

Source from the content-addressed store, hash-verified

117
118
119def load_jsonl(path: Path) -> List[Dict[str, Any]]:
120 rows: List[Dict[str, Any]] = []
121 with path.open("r", encoding="utf-8") as handle:
122 for line in handle:
123 line = line.strip()
124 if not line:
125 continue
126 payload = json.loads(line)
127 if isinstance(payload, dict):
128 rows.append(payload)
129 return rows
130
131
132def write_jsonl(path: Path, rows: Iterable[Dict[str, Any]]) -> None:

Callers 1

export_clean_benchmarkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected