From 88d5639a2a23e688c74b389e560fe836ea7c78ca Mon Sep 17 00:00:00 2001 From: yuanmengqi Date: Sun, 20 Jul 2025 07:55:53 +0000 Subject: [PATCH] Compatible with agents that cannot use runtime log --- lib_run_single.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib_run_single.py b/lib_run_single.py index dda5407..4fca8c1 100644 --- a/lib_run_single.py +++ b/lib_run_single.py @@ -10,8 +10,13 @@ logger = logging.getLogger("desktopenv.experiment") def run_single_example(agent, env, example, max_steps, instruction, args, example_result_dir, scores): runtime_logger = setup_logger(example, example_result_dir) - agent.reset(runtime_logger) + try: + agent.reset(runtime_logger) + except Exception as e: + agent.reset() + env.reset(task_config=example) + time.sleep(60) # Wait for the environment to be ready obs = env._get_obs() # Get the initial observation done = False