diff --git a/lib_run_single.py b/lib_run_single.py index f66945a..fd69583 100644 --- a/lib_run_single.py +++ b/lib_run_single.py @@ -96,6 +96,11 @@ def run_single_example_openaicua(agent, env, example, max_steps, instruction, ar with open(os.path.join(example_result_dir, f"step_{step_idx + 1}_{action_timestamp}.png"), "wb") as _f: _f.write(obs['screenshot']) + + # Remove pending checks if they exist which will cause issues with json serialization + if action.get('pending_checks', None): + del action['pending_checks'] + with open(os.path.join(example_result_dir, "traj.jsonl"), "a") as f: f.write(json.dumps({ "step_num": step_idx + 1,