MCPcopy Create free account
hub / github.com/MARIO-Math-Reasoning/Super_MARIO / load_qaf

Function load_qaf

react_demo.py:13–27  ·  view source on GitHub ↗
(filename: str)

Source from the content-addressed store, hash-verified

11
12
13def load_qaf(filename: str) -> List[Dict[str, Any]]:
14 if filename.endswith(".json"):
15 with open(filename, "r") as f:
16 data = json.load(f)
17 if "example" in data:
18 data = data["example"]
19 elif filename.endswith(".jsonl"):
20 data = []
21 with open(filename, "r") as f:
22 lines = f.readlines()
23 for line in lines:
24 data.append(json.loads(line))
25 else:
26 raise ValueError(f"Unrecognized file format: {filename}")
27 return data
28
29
30def parse_args():

Callers 2

solver_demo.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected