ver Jan31stv6

finished calc human evaluation
updated calc configs with an extra sleep to guarantee the integrity of
downloaded xlsx file
This commit is contained in:
David Chang
2024-01-31 22:55:47 +08:00
parent 3dce3ffe63
commit 4897211a46
28 changed files with 216 additions and 17 deletions

View File

@@ -1 +1 @@
exp_som test

View File

@@ -392,17 +392,13 @@ if __name__ == '__main__':
logger.addHandler(stdout_handler) logger.addHandler(stdout_handler)
logger.addHandler(sdebug_handler) logger.addHandler(sdebug_handler)
path1 = "../../任务数据/LibreOffice Calc/Multiply_Time_Number.xlsx" path1 = "snapshots/test/cache/4e6fcf72-daf3-439f-a232-c434ce416af6/Employee_Age_By_Birthday.xlsx"
path2 = "../../任务数据/LibreOffice Calc/Multiply_Time_Number_gold.xlsx" path2 = "snapshots/test/cache/4e6fcf72-daf3-439f-a232-c434ce416af6/Employee_Age_By_Birthday_gold.xlsx"
rules = [{"type": "check_cell" rules = [ { "type": "sheet_data"
, "sheet_idx": 0 , "sheet_idx0": 0
, "coordinate": "E3" , "sheet_idx1": "EI0"
, "props": {"value": {"method": "approx:0.001"
, "ref": 191.6667
}
}
} }
] ]
print(compare_table(path1, path2 print(compare_table(path1, path2
, rules=rules , rules=rules
) )

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -69,6 +69,12 @@
"/home/user/Represent_in_millions_billions.xlsx" "/home/user/Represent_in_millions_billions.xlsx"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,12 +50,70 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
},
{
"type": "download",
"parameters": {
"files": [
{
"url": "https://drive.usercontent.google.com/download?id=1sRI72UGfHiVBRFuV4uwhr173u3Sf46Y6&export=download&authuser=0&confirm=t&uuid=90da5e2b-39c0-449d-b753-09dfed73b509&at=APZUnTVFInccKo2QB9JNnIidFfG3:1705909465173",
"path": "/home/user/Employee_Age_By_Birthday_gold.xlsx"
}
]
}
},
{
"type": "open",
"parameters": {
"path": "/home/user/Employee_Age_By_Birthday_gold.xlsx"
}
},
{
"type": "sleep",
"parameters": {
"seconds": 2
}
},
{
"type": "activate_window",
"parameters": {
"window_name": "Employee_Age_By_Birthday_gold.xlsx - LibreOffice Calc",
"strict": true
}
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
},
{
"type": "execute",
"parameters": {
"command": [
"python",
"-c",
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
]
}
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",
"expected": { "expected": {
"type": "cloud_file", "type": "vm_file",
"path": "https://drive.usercontent.google.com/download?id=1sRI72UGfHiVBRFuV4uwhr173u3Sf46Y6&export=download&authuser=0&confirm=t&uuid=90da5e2b-39c0-449d-b753-09dfed73b509&at=APZUnTVFInccKo2QB9JNnIidFfG3:1705909465173", "path": "/home/user/Employee_Age_By_Birthday_gold.xlsx",
"dest": "Employee_Age_By_Birthday_gold.xlsx" "dest": "Employee_Age_By_Birthday_gold.xlsx"
}, },
"result": { "result": {

View File

@@ -69,6 +69,12 @@
"/home/user/Padding_Decimals_In_Formular.xlsx" "/home/user/Padding_Decimals_In_Formular.xlsx"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -69,6 +69,12 @@
"/home/user/Keep_Two_decimal_points.xlsx" "/home/user/Keep_Two_decimal_points.xlsx"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -1,7 +1,7 @@
{ {
"id": "a01fbce3-2793-461f-ab86-43680ccbae25", "id": "a01fbce3-2793-461f-ab86-43680ccbae25",
"snapshot": "libreoffice_calc", "snapshot": "libreoffice_calc",
"instruction": "I need to set the decimal separator as a comma (,) for localized data representation and clarity in visualization. Can you assist with this?", "instruction": "I need to set the decimal separator as a comma (,) for localized data representation and clarity in visualization. Can you help me to update all the numbers in the sheet? Also please keep the decimal numbers as-is.",
"source": "https://superuser.com/questions/1250677/how-to-set-decimal-separator-in-libre-office-calc", "source": "https://superuser.com/questions/1250677/how-to-set-decimal-separator-in-libre-office-calc",
"config": [ "config": [
{ {
@@ -69,6 +69,12 @@
"/home/user/Set_Decimal_Separator_Dot.xlsx" "/home/user/Set_Decimal_Separator_Dot.xlsx"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -50,6 +50,12 @@
"import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");" "import pyautogui; pyautogui.hotkey(\"ctrl\", \"s\");"
] ]
} }
},
{
"type": "sleep",
"parameters": {
"seconds": 0.5
}
} }
], ],
"func": "compare_table", "func": "compare_table",

View File

@@ -47,11 +47,12 @@ def human_agent():
Runs the Gym environment with human input. Runs the Gym environment with human input.
""" """
with open("evaluation_examples/examples/libreoffice_calc/01b269ae-2111-4a07-81fd-3fcd711993b0-win.json", "r") as f: with open("evaluation_examples/examples/libreoffice_calc/4f07fbe9-70de-4927-a4d5-bb28bc12c52c.json", "r") as f:
example = json.load(f) example = json.load(f)
example["snapshot"] = "Snapshot 1" example["snapshot"] = "Snapshot 30"
env = DesktopEnv( path_to_vm="~/vmware/Windows 10 x64/Windows 10 x64.vmx" #env = DesktopEnv( path_to_vm="~/vmware/Windows 10 x64/Windows 10 x64.vmx"
env = DesktopEnv( path_to_vm="/mnt/data1/david/os-images/Ubuntu-1218/Ubuntu.vmx"
, action_space="computer_13" , action_space="computer_13"
, task_config=example , task_config=example
) )