MCPcopy Create free account
hub / github.com/microsoft/fara / load_answer_from_disk

Method load_answer_from_disk

webeval/src/webeval/basesystem.py:25–34  ·  view source on GitHub ↗

Helper to load an answer from disk if it exists.

(self, task_id: str, output_dir: str)

Source from the content-addressed store, hash-verified

23 raise NotImplementedError("Implement your system's logic here.")
24
25 def load_answer_from_disk(self, task_id: str, output_dir: str) -> Any:
26 """
27 Helper to load an answer from disk if it exists.
28 """
29 answer_path = os.path.join(output_dir, f"{task_id}_answer.json")
30 if not os.path.exists(answer_path):
31 return None
32 with open(answer_path, "r", encoding="utf-8") as f:
33 data = json.load(f)
34 return data
35
36 def hash(self) -> str:
37 """

Callers 2

run_single_taskFunction · 0.45
evaluate_single_exampleFunction · 0.45

Calls 2

joinMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected