MCPcopy Create free account
hub / github.com/CoopReason/TESSY / append_jsonl

Function append_jsonl

Boundary_Predictor/annotator.py:39–42  ·  view source on GitHub ↗
(path: str, data: dict)

Source from the content-addressed store, hash-verified

37 f.write(json.dumps(sample, ensure_ascii=False) + "\n")
38
39def append_jsonl(path: str, data: dict) -> None:
40 os.makedirs(os.path.dirname(path), exist_ok=True) # Automatically create directory
41 with open(path, "a", encoding="utf-8") as f:
42 f.write(json.dumps(data, ensure_ascii=False) + "\n")
43
44def load_processed_ids(path_save: str) -> set:
45 if not os.path.exists(path_save):

Callers 1

generate_responseFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected