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

Function load_jsonl

experiments/baselines/discourse_aware/runner.py:164–176  ·  view source on GitHub ↗
(path: Path)

Source from the content-addressed store, hash-verified

162
163
164def load_jsonl(path: Path) -> List[Dict[str, Any]]:
165 rows: List[Dict[str, Any]] = []
166 if not path.exists():
167 return rows
168 with path.open("r", encoding="utf-8") as handle:
169 for line in handle:
170 line = line.strip()
171 if not line:
172 continue
173 payload = json.loads(line)
174 if isinstance(payload, dict):
175 rows.append(payload)
176 return rows
177
178
179def 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