Initialize evaluation protocols and examples; Implement one kind of eval; Update requirements
This commit is contained in:
47
main.py
47
main.py
@@ -15,8 +15,10 @@ def human_agent():
|
||||
path_to_vm=r"""C:\Users\tianbaox\Documents\Virtual Machines\Win10\Win10.vmx""",
|
||||
# path_to_vm="/home/yuri/vmware/Ubuntu 64-bit/Ubuntu 64-bit.vmx",
|
||||
action_space="computer_13",
|
||||
snapshot_path="base_setup2",
|
||||
# config=example["config"],
|
||||
snapshot_path="base_setup3",
|
||||
instruction=example["instruction"],
|
||||
config=example["config"],
|
||||
evaluator=example["evaluator"]
|
||||
)
|
||||
|
||||
# reset the environment to certain snapshot
|
||||
@@ -31,43 +33,7 @@ def human_agent():
|
||||
"y": 1057
|
||||
}
|
||||
},
|
||||
{"action_type": "CLICK", "parameters": {"button": "right", "num_clicks": 1}},
|
||||
{
|
||||
"action_type": "MOVE_TO",
|
||||
"parameters": {
|
||||
"x": 754,
|
||||
"y": 1057
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_type": "MOVE_TO",
|
||||
"parameters": {
|
||||
"x": 754,
|
||||
"y": 1057
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_type": "MOVE_TO",
|
||||
"parameters": {
|
||||
"x": 754,
|
||||
"y": 1057
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_type": "MOVE_TO",
|
||||
"parameters": {
|
||||
"x": 754,
|
||||
"y": 1057
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_type": "MOVE_TO",
|
||||
"parameters": {
|
||||
"x": 754,
|
||||
"y": 1057
|
||||
}
|
||||
}
|
||||
|
||||
{"action_type": "CLICK", "parameters": {"button": "right", "num_clicks": 1}}
|
||||
]
|
||||
|
||||
for i in range(len(trajectory)):
|
||||
@@ -90,6 +56,9 @@ def human_agent():
|
||||
print("The episode is done.")
|
||||
break
|
||||
|
||||
result = env.evaluate()
|
||||
print("Result:", result)
|
||||
|
||||
env.close()
|
||||
print("Environment closed.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user