Skip to content

Commit 5c75f78

Browse files
committed
Temporarily scale up aws instances
1 parent 31fa8c2 commit 5c75f78

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

aws/setup/batch/environment.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"type": "EC2",
1414
"allocationStrategy": "BEST_FIT_PROGRESSIVE",
1515
"minvCpus": 0,
16-
"maxvCpus": 200,
17-
"desiredvCpus": 0,
16+
"maxvCpus": 1000,
17+
"desiredvCpus": 400,
1818
"instanceTypes": [
19-
"m5.xlarge"
19+
"m5.4xlarge"
2020
],
2121
"subnets": [
2222
"subnet-02f03254ff2613e05",

aws/setup/batch/job_definition.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
"ulimits": [],
1818
"resourceRequirements": [
1919
{
20-
"value": "4",
20+
"value": "16",
2121
"type": "VCPU"
2222
},
2323
{
24-
"value": "14000",
24+
"value": "60000",
2525
"type": "MEMORY"
2626
}
2727
],

codeclash/games/robotrumble/robotrumble.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
from collections import Counter
55
from concurrent.futures import ThreadPoolExecutor, as_completed
66

7-
from tqdm.auto import tqdm
8-
97
from codeclash.agents.player import Player
108
from codeclash.constants import RESULT_TIE
119
from codeclash.games.game import CodeGame, RoundStats
@@ -64,16 +62,19 @@ def execute_round(self, agents: list[Player]):
6462
cmd = f"{self.run_cmd_round} {shlex.join(args)}"
6563
self.logger.info(f"Running game: {cmd}")
6664

67-
with ThreadPoolExecutor(5) as executor:
65+
with ThreadPoolExecutor(8) as executor:
6866
# Submit all simulations to the thread pool
6967
futures = [
7068
executor.submit(self._run_single_simulation, agents, idx, cmd)
7169
for idx in range(self.game_config.get("sims_per_round", 100))
7270
]
7371

7472
# Collect results as they complete
75-
for future in tqdm(as_completed(futures), total=len(futures)):
73+
i_completed = 0
74+
for future in as_completed(futures):
7675
future.result()
76+
i_completed += 1
77+
self.logger.info(f"Completed {i_completed} of {len(futures)} simulations")
7778

7879
def _get_winner_txt(self, output_file: str, agents: list[Player]) -> str:
7980
try:

0 commit comments

Comments
 (0)