From 741e26c3f8c08fc59e3d81bf92bdeb92072368b6 Mon Sep 17 00:00:00 2001 From: Timothyxxx <384084775@qq.com> Date: Wed, 13 Mar 2024 23:35:04 +0800 Subject: [PATCH] Update --- experiment_screenshot.py | 7 +++++++ mm_agents/gpt_4v_agent.py | 1 + 2 files changed, 8 insertions(+) diff --git a/experiment_screenshot.py b/experiment_screenshot.py index 0fb875d..58a2f94 100644 --- a/experiment_screenshot.py +++ b/experiment_screenshot.py @@ -1,3 +1,4 @@ +# todo: unifiy all the experiments python file into one file import datetime import json import logging @@ -114,23 +115,29 @@ def run_one_example(example, agent, max_steps=10, example_trajectory_dir="exp_tr try: func_timeout.func_timeout(120, stop_recording) + # todo: make sure we got the video file, check the bug except func_timeout.exceptions.FunctionTimedOut: logger.info("Recording timed out.") result = env.evaluate() logger.info("Result: %.2f", result) + + # fixme: change to write the result into a separate file with open(trajectory_recording_path, "a") as f: f.write(json.dumps({ "result": result })) f.write("\n") + # todo: append the result to the wandb for visualization + # env.close() logger.info("Environment closed.") def main(example_class, example_id, gpt4_model="gpt-4-vision-preview"): + # fixme: change all the settings like action_space, model, etc. to the argparser action_space = "pyautogui" gemini_model = "gemini-pro-vision" diff --git a/mm_agents/gpt_4v_agent.py b/mm_agents/gpt_4v_agent.py index d2d6a9e..7e9c400 100644 --- a/mm_agents/gpt_4v_agent.py +++ b/mm_agents/gpt_4v_agent.py @@ -30,6 +30,7 @@ from mm_agents.prompts import SYS_PROMPT_IN_SCREENSHOT_OUT_CODE, SYS_PROMPT_IN_S SYS_PROMPT_SEEACT, ACTION_DESCRIPTION_PROMPT_SEEACT, ACTION_GROUNDING_PROMPT_SEEACT import logging +# todo: cross-check with visualwebarena logger = logging.getLogger("desktopenv.agent")