Method
save_explorer
(
self,
current_step: int,
taskset_states: List[Dict],
)
Source from the content-addressed store, hash-verified
| 47 | ) |
| 48 | |
| 49 | def save_explorer( |
| 50 | self, |
| 51 | current_step: int, |
| 52 | taskset_states: List[Dict], |
| 53 | ) -> None: |
| 54 | with open(self.explorer_state_path, "w", encoding="utf-8") as f: |
| 55 | json.dump( |
| 56 | { |
| 57 | "latest_iteration": current_step, |
| 58 | "taskset_states": taskset_states, |
| 59 | }, |
| 60 | f, |
| 61 | indent=2, |
| 62 | ) |
| 63 | |
| 64 | def load_explorer(self) -> dict: |
| 65 | if os.path.exists(self.explorer_state_path): |
Tested by
no test coverage detected