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

Function load_jsonl

experiments/baselines/scinup_strict/runner.py:42–54  ·  view source on GitHub ↗
(path: Path)

Source from the content-addressed store, hash-verified

40
41
42def load_jsonl(path: Path) -> List[Dict[str, Any]]:
43 rows: List[Dict[str, Any]] = []
44 if not path.exists():
45 return rows
46 with path.open("r", encoding="utf-8") as handle:
47 for line in handle:
48 line = line.strip()
49 if not line:
50 continue
51 payload = json.loads(line)
52 if isinstance(payload, dict):
53 rows.append(payload)
54 return rows
55
56
57def write_jsonl(path: Path, rows: Iterable[Dict[str, Any]]) -> None:

Callers 2

run_baselineFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected