Skip to content

Commit 49fac6c

Browse files
committed
use subset of simple tasks during debug run
1 parent ddf1d00 commit 49fac6c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

experiments/run_osworld.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import json
12
import logging
23
import os
34

@@ -9,6 +10,12 @@
910
logging.basicConfig(level=logging.INFO, force=True, format=fmt, handlers=[logging.StreamHandler()])
1011

1112

13+
def get_task_ids() -> set[str]:
14+
with open("experiments/osworld_debug_task_ids.json", "r") as f:
15+
task_ids = json.load(f)
16+
return set([task["id"] for task in task_ids])
17+
18+
1219
def main():
1320
n_jobs = 1
1421
os.environ["AGENTLAB_DEBUG"] = "1"
@@ -21,7 +28,8 @@ def main():
2128
)
2229

2330
if os.environ.get("AGENTLAB_DEBUG"):
24-
study.exp_args_list = study.exp_args_list[-9:-7]
31+
task_ids = get_task_ids()
32+
study.exp_args_list = [exp_args for exp_args in study.exp_args_list if exp_args.env_args.task["id"] in task_ids]
2533
print(f"Debug on {len(study.exp_args_list)} experiments")
2634
study.run(n_jobs=2, n_relaunch=1, parallel_backend="ray")
2735
else:

0 commit comments

Comments
 (0)