Compatible with agents that cannot use runtime log
This commit is contained in:
@@ -10,8 +10,13 @@ logger = logging.getLogger("desktopenv.experiment")
|
|||||||
|
|
||||||
def run_single_example(agent, env, example, max_steps, instruction, args, example_result_dir, scores):
|
def run_single_example(agent, env, example, max_steps, instruction, args, example_result_dir, scores):
|
||||||
runtime_logger = setup_logger(example, example_result_dir)
|
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)
|
env.reset(task_config=example)
|
||||||
|
|
||||||
time.sleep(60) # Wait for the environment to be ready
|
time.sleep(60) # Wait for the environment to be ready
|
||||||
obs = env._get_obs() # Get the initial observation
|
obs = env._get_obs() # Get the initial observation
|
||||||
done = False
|
done = False
|
||||||
|
|||||||
Reference in New Issue
Block a user