Modify: wait for initial env to be ready (#139)
This commit is contained in:
@@ -2,7 +2,7 @@ import datetime
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
|
||||
import time
|
||||
from wrapt_timeout_decorator import *
|
||||
|
||||
logger = logging.getLogger("desktopenv.experiment")
|
||||
@@ -11,7 +11,9 @@ 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)
|
||||
obs = env.reset(task_config=example)
|
||||
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
|
||||
step_idx = 0
|
||||
env.controller.start_recording()
|
||||
|
||||
Reference in New Issue
Block a user