refactor: replace hardcoded AMI ID with dynamic retrieval from IMAGE_ID_MAP in AWS DesktopEnv initialization

This commit is contained in:
yuanmengqi
2025-06-07 21:17:18 +00:00
parent 8853671220
commit eaf7b9e48f
2 changed files with 8 additions and 4 deletions

View File

@@ -223,13 +223,15 @@ def test(args: argparse.Namespace, test_all_meta: dict) -> None:
)
agents.append(agent)
from desktop_env.providers.aws.manager import IMAGE_ID_MAP
REGION = "us-east-1"
env = DesktopEnv(
path_to_vm=args.path_to_vm,
action_space=agent.action_space,
provider_name="aws",
region="us-east-1",
snapshot_name="ami-05e7d7bd279ea4f14",
region=REGION,
snapshot_name=IMAGE_ID_MAP[REGION],
screen_size=(args.screen_width, args.screen_height),
headless=args.headless,