Skip to content

Commit b33f0b1

Browse files
committed
Fix: Set output folder for batch mode
1 parent bb1fdeb commit b33f0b1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

main.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from codeclash import CONFIG_DIR
99
from codeclash.constants import LOCAL_LOG_DIR
1010
from codeclash.tournaments.pvp import PvpTournament
11+
from codeclash.utils.aws import is_running_in_aws_batch
1112
from codeclash.utils.yaml_utils import resolve_includes
1213

1314

@@ -34,7 +35,10 @@ def main(
3435
suffix_part = f".{suffix}" if suffix else ""
3536
folder_name = f"PvpTournament.{config['game']['name']}.r{rounds}.s{sims}.p{p_num}.{p_list}{suffix_part}.{timestamp}"
3637
if output_dir is None:
37-
full_output_dir = LOCAL_LOG_DIR / getpass.getuser() / folder_name
38+
if is_running_in_aws_batch():
39+
full_output_dir = LOCAL_LOG_DIR / "batch" / folder_name
40+
else:
41+
full_output_dir = LOCAL_LOG_DIR / getpass.getuser() / folder_name
3842
else:
3943
full_output_dir = output_dir / folder_name
4044

0 commit comments

Comments
 (0)