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

Function load_jsonl

experiments/baselines/nl_profile/runner.py:69–81  ·  view source on GitHub ↗
(path: Path)

Source from the content-addressed store, hash-verified

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