Skip to content

Commit 9ce52aa

Browse files
committed
Fix: Ensure output dir exists
1 parent 662b610 commit 9ce52aa

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

codeclash/tournaments/pvp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def run_agent(self, agent: Player, round_num: int) -> None:
113113
agent.post_run_hook(round=round_num)
114114

115115
def _save(self) -> None:
116+
self.local_output_dir.mkdir(parents=True, exist_ok=True)
116117
(self.local_output_dir / "metadata.json").write_text(json.dumps(self.get_metadata(), indent=2))
117118

118119
def end(self) -> None:

codeclash/tournaments/single_player.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ def set_mirror_state_to_round(self, round_num: int):
128128
self.mirror_agent.reset_and_apply_patch(full_diff)
129129

130130
def _save(self) -> None:
131+
self.local_output_dir.mkdir(parents=True, exist_ok=True)
131132
(self.local_output_dir / "metadata.json").write_text(json.dumps(self.get_metadata(), indent=2))
132133

133134
def end(self):

0 commit comments

Comments
 (0)