Helper to load an answer from disk if it exists.
(self, task_id: str, output_dir: str)
| 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 | """ |
no test coverage detected