ver Jan29th

updated the position of SoM marks
This commit is contained in:
David Chang
2024-01-29 21:49:53 +08:00
parent e37f0037c4
commit d8a497a417
4 changed files with 23 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
import ctypes
#import ctypes
import datetime
import json
import logging
@@ -43,9 +43,11 @@ logger.addHandler(sdebug_handler)
logger = logging.getLogger("desktopenv.experiment")
PATH_TO_VM = r"C:\Users\tianbaox\Documents\Virtual Machines\Ubuntu\Ubuntu.vmx"
#PATH_TO_VM = r"C:\Users\tianbaox\Documents\Virtual Machines\Ubuntu\Ubuntu.vmx"
PATH_TO_VM = "../../../../大文件/镜像/Ubuntu-1218/Ubuntu/Ubuntu.vmx"
def run_one_example(example, agent, max_steps=10, example_trajectory_dir="exp_trajectory", recording=True):
trajectory_recording_path = os.path.join(example_trajectory_dir, "trajectory.json")
env = DesktopEnv(
@@ -125,14 +127,16 @@ def run_one_example(example, agent, max_steps=10, example_trajectory_dir="exp_tr
def main(example_class, example_id):
action_space = "pyautogui"
gpt4_model = "gpt-4-vision-preview"
gemini_model = "gemini-pro-vision"
#gemini_model = "gemini-pro-vision"
with open(f"evaluation_examples/examples/{example_class}/{example_id}.json", "r", encoding="utf-8") as f:
example = json.load(f)
example["snapshot"] = "exp_v1"
#example["snapshot"] = "exp_v1"
# example["snapshot"] = "exp_setup4"
example["snapshot"] = "Snapshot 30"
api_key = os.environ.get("OPENAI_API_KEY")
agent = GPT4v_Agent(api_key=api_key, model=gpt4_model, instruction=example['instruction'],
agent = GPT4v_Agent(api_key=api_key, model=gpt4_model, max_tokens=1000, instruction=example['instruction'],
action_space=action_space, exp="som")
# api_key = os.environ.get("GENAI_API_KEY")
@@ -149,7 +153,7 @@ def main(example_class, example_id):
if __name__ == '__main__':
xx_list = [
]
xx_list = [ "01b269ae-2111-4a07-81fd-3fcd711993b0"
]
for example_id in xx_list:
main("xx", example_id)
main("libreoffice_calc", example_id)