MCPcopy Create free account
hub / github.com/PRIME-RL/PRIME / stream_jsonl_all

Function stream_jsonl_all

eval/utils/evaluation_leetcode.py:172–183  ·  view source on GitHub ↗
(filename: str)

Source from the content-addressed store, hash-verified

170
171
172def stream_jsonl_all(filename: str) -> Iterable[Dict]:
173 results = []
174 if filename.endswith(".gz"):
175 fp = gzip.open(open(filename, "rb"), "rt")
176 else:
177 fp = open(filename, "r")
178 for line in fp:
179 if any(not x.isspace() for x in line):
180 results.append(json.loads(line))
181 fp.close()
182
183 return results
184
185
186def evaluate_functional_correctness(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected