Merge branch 'main' into zdy

This commit is contained in:
David Chang
2023-12-25 20:29:20 +08:00
80 changed files with 835 additions and 90 deletions

View File

@@ -0,0 +1 @@

View File

@@ -8,6 +8,7 @@ import os.path
from typing import Dict, List from typing import Dict, List
from typing import Any from typing import Any
class SetupController: class SetupController:
def __init__( self def __init__( self
, http_server: str , http_server: str
@@ -41,10 +42,10 @@ class SetupController:
assert hasattr(self, setup_function) assert hasattr(self, setup_function)
getattr(self, setup_function)(**parameters) getattr(self, setup_function)(**parameters)
#self._download_setup(config) # self._download_setup(config)
#self._change_wallpaper(config) # self._change_wallpaper(config)
# self._tidy_desktop(config) todo: implement this # self._tidy_desktop(config) todo: implement this
#self._open_setup(config) # self._open_setup(config)
# can add other setup steps # can add other setup steps
def _download_setup(self, files: List[Dict[str, str]]): def _download_setup(self, files: List[Dict[str, str]]):
@@ -57,11 +58,11 @@ class SetupController:
} }
""" """
#if not config: # if not config:
#return # return
#if not 'download' in config: # if not 'download' in config:
#return # return
#for url, path in config['download']: # for url, path in config['download']:
for f in files: for f in files:
url: str = f["url"] url: str = f["url"]
path: str = f["path"] path: str = f["path"]
@@ -119,12 +120,12 @@ class SetupController:
print("An error occurred while trying to send the request:", e) print("An error occurred while trying to send the request:", e)
def _change_wallpaper_setup(self, path: str): def _change_wallpaper_setup(self, path: str):
#if not config: # if not config:
#return # return
#if not 'wallpaper' in config: # if not 'wallpaper' in config:
#return # return
#path = config['wallpaper'] # path = config['wallpaper']
if not path: if not path:
raise Exception(f"Setup Wallpaper - Invalid path ({path}).") raise Exception(f"Setup Wallpaper - Invalid path ({path}).")
@@ -147,11 +148,11 @@ class SetupController:
raise NotImplementedError raise NotImplementedError
def _open_setup(self, path: str): def _open_setup(self, path: str):
#if not config: # if not config:
#return # return
#if not 'open' in config: # if not 'open' in config:
#return # return
#for path in config['open']: # for path in config['open']:
if not path: if not path:
raise Exception(f"Setup Open - Invalid path ({path}).") raise Exception(f"Setup Open - Invalid path ({path}).")

View File

@@ -3,23 +3,24 @@ from __future__ import annotations
import os import os
import subprocess import subprocess
import time import time
#import uuid # import uuid
#import platform # import platform
from typing import List, Dict from typing import List, Dict
from typing import Callable, Any, Optional from typing import Callable, Any, Optional
import tempfile import tempfile
import gymnasium as gym import gymnasium as gym
#import requests # import requests
from desktop_env.controllers.python import PythonController from desktop_env.controllers.python import PythonController
from desktop_env.controllers.setup import SetupController from desktop_env.controllers.setup import SetupController
#from desktop_env.evaluators import eval_funcs # from desktop_env.evaluators import eval_funcs
from desktop_env.evaluators import metrics, getters from desktop_env.evaluators import metrics, getters
Metric = Callable[[Any, Any], float] Metric = Callable[[Any, Any], float]
Getter = Callable[[gym.Env, Dict[str, Any]], Any] Getter = Callable[[gym.Env, Dict[str, Any]], Any]
def _execute_command(command: List[str]) -> None: def _execute_command(command: List[str]) -> None:
if command[:4] == ["vmrun", "-T", "ws", "start"]: if command[:4] == ["vmrun", "-T", "ws", "start"]:
p = subprocess.Popen(command) p = subprocess.Popen(command)
@@ -104,7 +105,7 @@ class DesktopEnv(gym.Env):
output = subprocess.check_output("vmrun -T ws list", shell=True, stderr=subprocess.STDOUT) output = subprocess.check_output("vmrun -T ws list", shell=True, stderr=subprocess.STDOUT)
output = output.decode() output = output.decode()
output: List[str] = output.splitlines() output: List[str] = output.splitlines()
#if self.path_to_vm.lstrip("~/") in output: # if self.path_to_vm.lstrip("~/") in output:
if self.path_to_vm in output: if self.path_to_vm in output:
print("VM is running.") print("VM is running.")
break break
@@ -132,9 +133,9 @@ class DesktopEnv(gym.Env):
_execute_command(["vmrun", "-T", "ws" "snapshot", self.path_to_vm, self.snapshot_path]) _execute_command(["vmrun", "-T", "ws" "snapshot", self.path_to_vm, self.snapshot_path])
def _get_screenshot(self): def _get_screenshot(self):
#random_uuid = str(uuid.uuid4()) # random_uuid = str(uuid.uuid4())
#os.makedirs(os.path.join("tmp", random_uuid), exist_ok=True) # os.makedirs(os.path.join("tmp", random_uuid), exist_ok=True)
#image_path = os.path.join("tmp", random_uuid, "screenshot.png") # image_path = os.path.join("tmp", random_uuid, "screenshot.png")
image_path: str = os.path.join(self.tmp_dir, "screenshots", "{:d}.png".format(self._step_no)) image_path: str = os.path.join(self.tmp_dir, "screenshots", "{:d}.png".format(self._step_no))
# Get the screenshot and save to the image_path # Get the screenshot and save to the image_path
@@ -173,9 +174,10 @@ class DesktopEnv(gym.Env):
self.action_history.clear() self.action_history.clear()
print("Setup new temp dir...") print("Setup new temp dir...")
self.tmp_dir = tempfile.mkdtemp( prefix="{:d}.{:}.".format(self._traj_no, self.task_id) self.tmp_dir = tempfile.mkdtemp(
, dir=self.tmp_dir_base prefix="{:d}.{:}.".format(self._traj_no, self.task_id),
) dir=self.tmp_dir_base
)
os.makedirs(os.path.join(self.tmp_dir, "screenshots")) os.makedirs(os.path.join(self.tmp_dir, "screenshots"))
print("Reverting to snapshot to {}...".format(self.snapshot_path)) print("Reverting to snapshot to {}...".format(self.snapshot_path))
@@ -224,14 +226,14 @@ class DesktopEnv(gym.Env):
""" """
# todo: make this more flexible by refactoring # todo: make this more flexible by refactoring
#eval_func = eval_funcs[self.evaluator["func"]] # eval_func = eval_funcs[self.evaluator["func"]]
#eval_func_vars = {} # eval_func_vars = {}
# #
#for var_name, file_info in self.evaluator["paths"].items(): # for var_name, file_info in self.evaluator["paths"].items():
#path = copy_file_to_local(file_info) # path = copy_file_to_local(file_info)
#eval_func_vars[var_name] = path # eval_func_vars[var_name] = path
# #
#return eval_func(**eval_func_vars) # return eval_func(**eval_func_vars)
result = self.result_getter(self, self.evaluator["result"]) result = self.result_getter(self, self.evaluator["result"])
expected = self.expected_getter(self, self.evaluator["expected"]) expected = self.expected_getter(self, self.evaluator["expected"])

View File

@@ -4,9 +4,9 @@ import platform
import subprocess import subprocess
import requests import requests
#import Xlib.display # import Xlib.display
import pyautogui import pyautogui
#from PIL import ImageGrab, Image # from PIL import ImageGrab, Image
from PIL import Image from PIL import Image
from flask import Flask, request, jsonify, send_file from flask import Flask, request, jsonify, send_file
@@ -47,7 +47,6 @@ def capture_screen_with_cursor():
# Ensure the screenshots directory exists # Ensure the screenshots directory exists
os.makedirs(os.path.dirname(file_path), exist_ok=True) os.makedirs(os.path.dirname(file_path), exist_ok=True)
# fixme: This is a temporary fix for the cursor not being captured on Windows and Linux # fixme: This is a temporary fix for the cursor not being captured on Windows and Linux
if user_platform == "Windows" or user_platform == "Linux": if user_platform == "Windows" or user_platform == "Linux":
def _download_image(url, path): def _download_image(url, path):
@@ -191,10 +190,10 @@ def open_file():
return f"File not found: {path}", 404 return f"File not found: {path}", 404
try: try:
if platform.system()=="Windows": if platform.system() == "Windows":
os.startfile(path) os.startfile(path)
else: else:
open_cmd: str = "open" if platform.system()=="Darwin" else "xdg-open" open_cmd: str = "open" if platform.system() == "Darwin" else "xdg-open"
subprocess.Popen([open_cmd, str(path)]) subprocess.Popen([open_cmd, str(path)])
return "File opened successfully" return "File opened successfully"
except Exception as e: except Exception as e:

View File

@@ -0,0 +1,12 @@
{
"id": "06fe7178-4491-4589-810f-2e2bc9502122",
"snapshot": "chrome",
"instruction": "Could you help me open the previously closed tab?",
"source": "https://www.wikihow.com/Switch-Tabs-in-Chrome",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"chrome"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "12086550-11c0-466b-b367-1d9e75b3910e",
"snapshot": "chrome",
"instruction": "Help me find the hidden password of xx website.",
"source": "https://www.quora.com/What-are-the-cool-tricks-to-use-Google-Chrome",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"chrome"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "7b6c7e24-c58a-49fc-a5bb-d57b80e5b4c3",
"snapshot": "chrome",
"instruction": "Could you help me delete cookies from openai website?",
"source": "https://support.google.com/chrome/answer/95647?hl=en&ref_topic=7438325&sjid=16867045591165135686-AP#zippy=%2Cdelete-cookies-from-a-site",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"chrome"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "b188fe10-ae67-4db8-a154-26a0b8ff8f1e",
"snapshot": "chrome",
"instruction": "Help me add \"bookmark this page\" button to Chrome.",
"source": "https://superuser.com/questions/1115565/how-to-add-bookmark-this-page-button-to-chrome",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"chrome"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "bb5e4c0d-f964-439c-97b6-bdb9747de3f4",
"snapshot": "chrome",
"instruction": "Could you help me set my default search engine to be Chrome?",
"source": "https://support.google.com/chrome/answer/95426?sjid=16867045591165135686-AP",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"chrome"
],
"evaluator": "evaluation_dir"
}

View File

@@ -1,42 +0,0 @@
{
"id": "f9584479-3d0d-4c79-affa-9ad7afdd8850",
"snapshot": "libreoffice_calc",
"instruction": "Fill the missing row and column which show the total value",
"source": "https://youtube.com/shorts/feldd-Pn48c?si=9xJiem2uAHm6Jshb",
"config": [
{
"type": "download",
"parameters": {
"files": [
{
"url": "http://101.43.24.67/s/DbaHsQpPA7dxrA8/download/Quarterly_Product_Sales_by_Zone.xlsx",
"path": "/home/david/Quarterly_Product_Sales_by_Zone.xlsx"
}
]
}
},
{
"type": "open",
"parameters": {
"path": "/home/david/Quarterly_Product_Sales_by_Zone.xlsx"
}
}
],
"trajectory": "trajectories/f9584479-3d0d-4c79-affa-9ad7afdd8850",
"related_apps": [
"libreoffice calc"
],
"evaluator": {
"func": "compare_table",
"expected": {
"type": "cloud_file",
"path": "http://101.43.24.67/s/BAfFwa3689XTYoo/download/Quarterly_Product_Sales_by_Zone_gold.xlsx",
"dest": "Quarterly_Product_Sales_by_Zone_gold.xlsx"
},
"result": {
"type": "vm_file",
"path": "/home/david/Quarterly_Product_Sales_by_Zone.xlsx",
"dest": "Quarterly_Product_Sales_by_Zone.xlsx"
}
}
}

View File

@@ -0,0 +1,42 @@
{
"id": "f9584479-3d0d-4c79-affa-9ad7afdd8850",
"snapshot": "libreoffice_calc",
"instruction": "Fill the missing row and column which show the total value",
"source": "https://youtube.com/shorts/feldd-Pn48c?si=9xJiem2uAHm6Jshb",
"config": [
{
"type": "download",
"parameters": {
"files": [
{
"url": "http://101.43.24.67/s/DbaHsQpPA7dxrA8/download/Quarterly_Product_Sales_by_Zone.xlsx",
"path": "/home/david/Quarterly_Product_Sales_by_Zone.xlsx"
}
]
}
},
{
"type": "open",
"parameters": {
"path": "/home/david/Quarterly_Product_Sales_by_Zone.xlsx"
}
}
],
"trajectory": "trajectories/f9584479-3d0d-4c79-affa-9ad7afdd8850",
"related_apps": [
"libreoffice calc"
],
"evaluator": {
"func": "compare_table",
"expected": {
"type": "cloud_file",
"path": "http://101.43.24.67/s/BAfFwa3689XTYoo/download/Quarterly_Product_Sales_by_Zone_gold.xlsx",
"dest": "Quarterly_Product_Sales_by_Zone_gold.xlsx"
},
"result": {
"type": "vm_file",
"path": "/home/david/Quarterly_Product_Sales_by_Zone.xlsx",
"dest": "Quarterly_Product_Sales_by_Zone.xlsx"
}
}
}

View File

@@ -0,0 +1,12 @@
{
"id": "071d4ace-091a-4ec3-886e-f4be55ae375d",
"snapshot": "libreoffice_impress",
"instruction": "Please hide slide numbers and slide footer on first and second slide",
"source": "https://superuser.com/questions/706860/hide-slide-numbers-and-slide-footer-on-first-and-second-slide-in-libreoffice-imp?rq=1",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
""
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "0f84bef9-9790-432e-92b7-eece357603fb",
"snapshot": "libreoffice_impress",
"instruction": "Could you help me disable the presenter screen mode in my slids?",
"source": "https://stackoverflow.com/questions/29036788/how-to-disable-libreoffice-impress-to-use-multiple-display",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
""
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "21760ecb-8f62-40d2-8d85-0cee5725cb72",
"snapshot": "libreoffice_impress",
"instruction": "Could you help me add silde transition \"dissolve\" to my first page?",
"source": "https://www.libreofficehelp.com/add-animations-transitions-libreoffice-impress-slides/",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
""
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "35761501-3a99-48d1-8ec6-cea8242349b6",
"snapshot": "libreoffice_impress",
"instruction": "Help me compress the image I selected.",
"source": "https://www.quora.com/How-do-I-compress-a-selection-of-images-in-LibreOffice-Impress",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
""
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "3b27600c-3668-4abd-8f84-7bcdebbccbdb",
"snapshot": "libreoffice_impress",
"instruction": "Could you help me change the background color to blue 2 and apply it to all my slides.",
"source": "https://www.libreofficehelp.com/change-slide-background-impress/#All_Slides",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
""
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "3cc4f35d-fa2e-4555-afb9-741b7c062a74",
"snapshot": "libreoffice_impress",
"instruction": "Could you help me create a master slide and rename it \"master\"?",
"source": "https://documentation.libreoffice.org/assets/Uploads/Documentation/en/IG7.6/IG76-ImpressGuide.pdf",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
""
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "455d3c66-7dc6-4537-a39a-36d3e9119df7",
"snapshot": "libreoffice_impress",
"instruction": "Could you help me export impress file to image jpg file?",
"source": "https://stackoverflow.com/questions/75626383/how-export-libreoffice-impress-to-image",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
""
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "550ce7e7-747b-495f-b122-acdc4d0b8e54",
"snapshot": "libreoffice_impress",
"instruction": "Could you help me add a strike-through on this text",
"source": "https://superuser.com/questions/1211035/libreoffice-impress-animations-how-to-strikethrough-on-click?rq=1",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
""
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "5d901039-a89c-4bfb-967b-bf66f4df075e",
"snapshot": "libreoffice_impress",
"instruction": "Help me stretch the image to fill the entire page, keeping its proportion and centering the image",
"source": "https://superuser.com/questions/986776/how-can-i-stretch-an-image-in-a-libreoffice-impress-presentation-to-fill-the-pag",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
""
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "9ec204e4-f0a3-42f8-8458-b772a6797cab",
"snapshot": "libreoffice_impress",
"instruction": "Could you help me copy and paste the first 3 slides?",
"source": "https://www.tiktok.com/@lil.d1rt_/video/7247574148887629083",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
""
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "a097acff-6266-4291-9fbd-137af7ecd439",
"snapshot": "libreoffice_impress",
"instruction": "Could you help me save my slides to SAVE_PATH?",
"source": "https://www.youtube.com/watch?v=DDmEvjs4iBw",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
""
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "ac9bb6cb-1888-43ab-81e4-a98a547918cd",
"snapshot": "libreoffice_impress",
"instruction": "Please help me change the color of the slide number to blue",
"source": "https://superuser.com/questions/1674211/how-to-change-colour-of-slide-number-in-libre-office",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
""
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "af23762e-2bfd-4a1d-aada-20fa8de9ce07",
"snapshot": "libreoffice_impress",
"instruction": "Please make a summary slide of the whole presentation for me",
"source": "https://superuser.com/questions/1059080/how-to-make-a-summary-slide-in-impress-listing-the-titles-of-all-slides-autom",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
""
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "c59742c0-4323-4b9d-8a02-723c251deaa0",
"snapshot": "libreoffice_impress",
"instruction": "Could you help me add video into the presentation file?",
"source": "https://www.reddit.com/r/libreoffice/comments/17lcdrp/audio_not_supported_in_libreoffice_impress/",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
""
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "ce88f674-ab7a-43da-9201-468d38539e4a",
"snapshot": "libreoffice_impress",
"instruction": "Could you help me change my slides to portrait (from landscape)?",
"source": "https://justclickhere.co.uk/resources/change-slides-in-impress-to-portrait/",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
""
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "ef9d12bd-bcee-4ba0-a40e-918400f43ddf",
"snapshot": "libreoffice_impress",
"instruction": "Could you help me open the side panel on the left?",
"source": "https://www.reddit.com/r/libreoffice/comments/18elh3y/i_closed_the_slide_pannel_on_the_left_and_idk_how/",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
""
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "f0a334af-f91b-4c03-b578-aac9bec2b543",
"snapshot": "libreoffice_impress",
"instruction": "Help me insert the video at VIDEO_PATH in the current slide.",
"source": "https://www.libreofficehelp.com/insert-video-impress-presentation/#Inserting_a_Video_in_Impress",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
""
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "0810415c-bde4-4443-9047-d5f70165a697",
"snapshot": "libreoffice_writer",
"instruction": "Make the line spacing of first two paragraph into double line spacing",
"source": "https://www.youtube.com/watch?v=Q_AaL6ljudU",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"libreoffice_writer"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "0b17a146-2934-46c7-8727-73ff6b6483e8",
"snapshot": "libreoffice_writer",
"instruction": "Enter subscript",
"source": "https://ask.libreoffice.org/t/how-to-enter-superscript-and-subscript-in-libreoffice-base-forms-reports/23413",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"libreoffice_writer"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "0e47de2a-32e0-456c-a366-8c607ef7a9d2",
"snapshot": "libreoffice_writer",
"instruction": "Add page number for every page at the bottom left",
"source": "https://ask.libreoffice.org/t/how-to-start-page-numbering-on-a-certain-page/39931/4",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"libreoffice_writer"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "0e763496-b6bb-4508-a427-fad0b6c3e195",
"snapshot": "libreoffice_writer",
"instruction": "Change the font to \"Times New Roman\" throughout the text.",
"source": "https://ask.libreoffice.org/t/how-do-i-change-the-font-for-the-whole-document-in-writer/9220",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"libreoffice_writer"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "3ef2b351-8a84-4ff2-8724-d86eae9b842e",
"snapshot": "libreoffice_writer",
"instruction": "center-justify the first line",
"source": "https://askubuntu.com/questions/1066351/how-do-you-center-align-in-libreoffice#:~:text=Ctrl%20%2B%20e%20will%20Center%20align%20the%20cursor%20for%20you.",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"libreoffice_writer"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "45d61a06-6545-4422-97b7-bc76cfa964c1",
"snapshot": "libreoffice_writer",
"instruction": "Replace all newlines with paragraph marks in LibreOffice Write",
"source": "https://stackoverflow.com/questions/71685737/how-to-replace-all-newlines-with-paragraph-marks-in-libreoffice-write",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"libreoffice_writer"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "4bcb1253-a636-4df4-8cb0-a35c04dfef31",
"snapshot": "libreoffice_writer",
"instruction": "Export the current document into PDF, keep the file name",
"source": "https://www.libreofficehelp.com/save-export-writer-documents-in-pdf-epub-format/",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"libreoffice_writer"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "663876c7-3471-43db-ba51-f410b13d9d7d",
"snapshot": "libreoffice_writer",
"instruction": "Insert the equation \"(a + b)^2 = a^2 + 2 a b + b^2\"",
"source": "https://askubuntu.com/questions/319593/how-to-type-science-equations-in-libre-office",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"libreoffice_writer"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "66399b0d-8fda-4618-95c4-bfc6191617e9",
"snapshot": "libreoffice_writer",
"instruction": "Insert a 7*5 empty table",
"source": "https://www.youtube.com/watch?v=l25Evu4ohKg",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"libreoffice_writer"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "6ada715d-3aae-4a32-a6a7-429b2e43fb93",
"snapshot": "libreoffice_writer",
"instruction": "Insert the image which is in IMAGE_PATH where my cursor is",
"source": "https://www.quora.com/How-do-you-insert-images-into-a-LibreOffice-Writer-document",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"libreoffice_writer"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "936321ce-5236-426a-9a20-e0e3c5dc536f",
"snapshot": "libreoffice_writer",
"instruction": "Convert the content seperated by commas to a table",
"source": "https://www.youtube.com/watch?v=l25Evu4ohKg",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"libreoffice_writer"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "adf5e2c3-64c7-4644-b7b6-d2f0167927e7",
"snapshot": "libreoffice_writer",
"instruction": "Helping me adding CITATION_TEXT to my reference list, and add a cross reference after the word \"WHERE_WE_ADD_REFERENCE\"",
"source": "https://seekstar.github.io/2022/04/11/libreoffice%E5%BC%95%E7%94%A8%E6%96%87%E7%8C%AE/",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"libreoffice_writer"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "e528b65e-1107-4b8c-8988-490e4fece599",
"snapshot": "libreoffice_writer",
"instruction": "Capitalize the first letter of all words.",
"source": "https://www.youtube.com/watch?v=l25Evu4ohKg",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"libreoffice_writer"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "ecc2413d-8a48-416e-a3a2-d30106ca36cb",
"snapshot": "libreoffice_writer",
"instruction": "Insert a blank page here",
"source": "https://www.quora.com/How-can-I-insert-a-blank-page-on-libreoffice",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"libreoffice_writer"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "f178a4a9-d090-4b56-bc4c-4b72a61a035d",
"snapshot": "libreoffice_writer",
"instruction": "Make Times New Roman the default Font",
"source": "https://ask.libreoffice.org/t/how-do-i-make-times-new-roman-the-default-font-in-lo/64604",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"libreoffice_writer"
],
"evaluator": "evaluation_dir"
}

View File

@@ -3,11 +3,11 @@
"snapshot": "libreoffice_calc", "snapshot": "libreoffice_calc",
"instruction": "", "instruction": "",
"source": "", "source": "",
"config": { "config": [],
},
"trajectory": "trajectories/", "trajectory": "trajectories/",
"related_apps": [ "related_apps": [
"libreoffice calc" "app1",
"app2"
], ],
"evaluator": "evaluation_dir" "evaluator": "evaluation_dir"
} }

View File

@@ -0,0 +1,12 @@
{
"id": "06fe7178-4491-4589-810f-2e2bc9502122",
"snapshot": "thunderbird",
"instruction": "Could you help me back up all the email files in my profile to PROFILE_DIR?",
"source": "https://www.quora.com/How-do-I-backup-email-files-in-Mozilla-Thunderbird",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"thunderbird"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "12086550-11c0-466b-b367-1d9e75b3910e",
"snapshot": "thunderbird",
"instruction": "Could you help me open up the Thunderbird profile manager utility?",
"source": "https://www.quora.com/How-do-I-open-a-Thunderbird-profile-manager-utility",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"thunderbird"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "7b6c7e24-c58a-49fc-a5bb-d57b80e5b4c3",
"snapshot": "thunderbird",
"instruction": "Help me access my gmail account with address \"xx@gmail.com\" and password \"xxx\"",
"source": "https://www.wikihow.com/Access-Gmail-With-Mozilla-Thunderbird",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"thunderbird"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "b188fe10-ae67-4db8-a154-26a0b8ff8f1e",
"snapshot": "thunderbird",
"instruction": "Help me restore the zebra stripes background in message list panel.",
"source": "https://www.reddit.com/r/Thunderbird/comments/17vv2os/restore_readability_in_message_list_pane/",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"thunderbird"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "bb5e4c0d-f964-439c-97b6-bdb9747de3f4",
"snapshot": "thunderbird",
"instruction": "Help remove the account \"xx@xx\"",
"source": "https://www.wikihow.com/Remove-an-Email-Account-from-Thunderbird",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"thunderbird"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "59f21cfb-0120-4326-b255-a5b827b38967",
"snapshot": "base_setup",
"instruction": "Could you help me play the file at FILE_PATH?",
"source": "https://docs.videolan.me/vlc-user/desktop/3.0/en/basic/media.html#playing-a-file",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vlc"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "8ba5ae7a-5ae5-4eab-9fcc-5dd4fe3abf89",
"snapshot": "base_setup",
"instruction": "Help me modify the folder used to store my recordings to LOCAL_PATH.",
"source": "https://docs.videolan.me/vlc-user/desktop/3.0/en/basic/recording/playing.html#choose-your-recordings-folder",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vlc"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "8d9fd4e2-6fdb-46b0-b9b9-02f06495c62f",
"snapshot": "base_setup",
"instruction": "Make the video window whole-screen",
"source": "https://www.youtube.com/watch?v=XHprwDJ0-fU&t=436s",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vlc"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "8f080098-ddb1-424c-b438-4e96e5e4786e",
"snapshot": "base_setup",
"instruction": "Could you help me extract MP3 Audio to AUDIO_PATH from Video at VIDEO_PATH using VLC Media Player?",
"source": "https://medium.com/@jetscribe_ai/how-to-extract-mp3-audio-from-videos-using-vlc-media-player-beeef644ebfb",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vlc"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "a1c3ab35-02de-4999-a7ed-2fd12c972c6e",
"snapshot": "base_setup",
"instruction": "Could you help me compress the video to DIR_PATH?",
"source": "https://www.quora.com/How-do-I-compress-a-video-with-VLC",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vlc"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "aa4b5023-aef6-4ed9-bdc9-705f59ab9ad6",
"snapshot": "base_setup",
"instruction": "This video is upside down, help me rotate it",
"source": "https://www.dedoimedo.com/computers/vlc-rotate-videos.html",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vlc"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "bba3381f-b5eb-4439-bd9e-80c22218d5a7",
"snapshot": "base_setup",
"instruction": "Could you help me play the online video at URL?(network stream)",
"source": "https://www.quora.com/How-do-I-play-online-videos-using-the-VLC-media-player",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vlc"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "d70666e4-7348-42c7-a06a-664094c5df3c",
"snapshot": "base_setup",
"instruction": "Add logo watermark to the top right corner (20px, 1800px) of the video, the logo file is in SAVE_PATH",
"source": "https://www.youtube.com/watch?v=XHprwDJ0-fU&t=436s",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vlc"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "efcf0d81-0835-4880-b2fd-d866e8bc2294",
"snapshot": "base_setup",
"instruction": "Set this frame of the current video as my wallpaper",
"source": "https://www.youtube.com/watch?v=XHprwDJ0-fU&t=436s",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vlc"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "fba2c100-79e8-42df-ae74-b592418d54f4",
"snapshot": "base_setup",
"instruction": "Screenshot the current frame of the video",
"source": "https://www.youtube.com/watch?v=XHprwDJ0-fU&t=436s",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vlc"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "0ed39f63-6049-43d4-ba4d-5fa2fe04a951",
"snapshot": "vscode",
"instruction": "Could you help me find and replace \"TEXT\" with \"TEST“ in this file?",
"source": "https://www.quora.com/How-do-you-find-and-replace-text-in-Visual-Studio-Code",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vscode"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "3486f395-ad68-459c-8c39-ea07de934dd4",
"snapshot": "vscode",
"instruction": "Find me the keyboard shortcut of toggling integrated terminal. ",
"source": "https://www.youtube.com/watch?v=VqCgcpAypFQ",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vscode"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "515630d2-9b30-430c-b06a-e86b0143f7fb",
"snapshot": "vscode",
"instruction": "Help me enable automatically run code in VS code",
"source": "https://www.quora.com/How-do-I-automatically-run-code-in-Visual-Studio-Code",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vscode"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "53ad5833-3455-407b-bbc6-45b4c79ab8fb",
"snapshot": "vscode",
"instruction": "Could you help me open the project at PATH?",
"source": "https://www.youtube.com/watch?v=VqCgcpAypFQ",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vscode"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "59ed65c7-e9a6-43db-833f-76d6730c0004",
"snapshot": "vscode",
"instruction": "Could you help me start debugging with the breakpoint at line 15?",
"source": "https://www.youtube.com/watch?v=7qZBwhSlfOo",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vscode"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "6f7546b0-52f3-4938-9213-52f35454d314",
"snapshot": "vscode",
"instruction": "Help me ask chatGPT to generate html and css code for a scroll bar?",
"source": "https://www.tiktok.com/@akramovdev/video/7243349980897922306",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vscode"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "90f6eeeb-f3c2-4c98-873c-e77d78a45578",
"snapshot": "vscode",
"instruction": "Help me sync extensions and settings across all profiles.",
"source": "https://stackoverflow.com/questions/75866801/how-do-i-sync-extensions-and-their-settings-between-vs-code-profiles",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vscode"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "982d12a5-beab-424f-8d38-d2a48429e511",
"snapshot": "vscode",
"instruction": "Could you help me change the color theme to Solarized Dark?",
"source": "https://www.youtube.com/watch?v=ORrELERGIHs",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vscode"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "b421106e-b282-4c41-af72-37c95493f95f",
"snapshot": "vscode",
"instruction": "Help me modify settings to launch VScode with new.txt file",
"source": "https://stackoverflow.com/questions/74153883/launch-vscode-with-new-txt-file",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vscode"
],
"evaluator": "evaluation_dir"
}

View File

@@ -0,0 +1,12 @@
{
"id": "eabc805a-bfcf-4460-b250-ac92135819f6",
"snapshot": "vscode",
"instruction": "Help me install the extension Python.",
"source": "https://www.youtube.com/watch?v=VqCgcpAypFQ",
"config": [],
"trajectory": "trajectories/",
"related_apps": [
"vscode"
],
"evaluator": "evaluation_dir"
}

View File

@@ -7,12 +7,10 @@ def human_agent():
Runs the Gym environment with human input. Runs the Gym environment with human input.
""" """
with open("evaluation_examples/examples/f9584479-3d0d-4c79-affa-9ad7afdd8850.json", "r") as f: with open("evaluation_examples/examples/libreoffice_calc/f9584479-3d0d-4c79-affa-9ad7afdd8850.json", "r") as f:
example = json.load(f) example = json.load(f)
example["snapshot"] = "Snapshot 10" example["snapshot"] = "Snapshot 10"
#env = DesktopEnv( path_to_vm="/home/yuri/vmware/Windows 10 x64/Windows 10 x64.vmx"
# path_to_vm="/home/yuri/vmware/Ubuntu 64-bit/Ubuntu 64-bit.vmx",
env = DesktopEnv( path_to_vm="/home/david/vmware/KUbuntu 64-bit/KUbuntu 64-bit.vmx" env = DesktopEnv( path_to_vm="/home/david/vmware/KUbuntu 64-bit/KUbuntu 64-bit.vmx"
, action_space="computer_13" , action_space="computer_13"
, task_config=example , task_config=example