fix: remove pending checks from actions to prevent json serialization issues
This commit is contained in:
@@ -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"),
|
with open(os.path.join(example_result_dir, f"step_{step_idx + 1}_{action_timestamp}.png"),
|
||||||
"wb") as _f:
|
"wb") as _f:
|
||||||
_f.write(obs['screenshot'])
|
_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:
|
with open(os.path.join(example_result_dir, "traj.jsonl"), "a") as f:
|
||||||
f.write(json.dumps({
|
f.write(json.dumps({
|
||||||
"step_num": step_idx + 1,
|
"step_num": step_idx + 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user