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

Function load_jsonl

experiments/baselines/scholar_inbox/runner.py:73–85  ·  view source on GitHub ↗
(path: Path)

Source from the content-addressed store, hash-verified

71
72
73def load_jsonl(path: Path) -> List[Dict[str, Any]]:
74 rows: List[Dict[str, Any]] = []
75 if not path.exists():
76 return rows
77 with path.open("r", encoding="utf-8") as handle:
78 for line in handle:
79 line = line.strip()
80 if not line:
81 continue
82 payload = json.loads(line)
83 if isinstance(payload, dict):
84 rows.append(payload)
85 return rows
86
87
88def 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