From ae473d8673152f0c209216cd1e928e1d117efbc6 Mon Sep 17 00:00:00 2001 From: adlsdztony Date: Wed, 4 Jun 2025 14:20:02 +0000 Subject: [PATCH] fix: remove pending checks from actions to prevent json serialization issues --- lib_run_single.py | 5 +++++ 1 file changed, 5 insertions(+) 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,