Skip to content

Commit 4decd59

Browse files
committed
Merge branch 'debug/huoshan_zirui' into debug/vllm_logp_lpx
2 parents efff826 + 6bf0240 commit 4decd59

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+22728
-19
lines changed

rollouter/agent_coordinator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@ async def start_rollout(self, task_loader, runner_cfg, model_pool, storage, mysq
268268
break
269269

270270
# 0.定期清理孤立的环境
271-
logger.info("准备调用 _cleanup_orphaned_environments 方法")
272-
await self._cleanup_orphaned_environments(runner_cfg)
273-
logger.info("_cleanup_orphaned_environments 方法调用完成")
271+
# logger.info("准备调用 _cleanup_orphaned_environments 方法")
272+
# await self._cleanup_orphaned_environments(runner_cfg)
273+
# logger.info("_cleanup_orphaned_environments 方法调用完成")
274274

275275
# 1. 填充任务队列(最多填充MAX_TASK_QUEUE_SIZE次)
276276
if (self.task_queue.empty() and

rollouter/configs/config.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
remote_docker_server:
2+
ip: "10.1.110.48" # change this to your own ip .
3+
port: 50003
4+
path_to_vm: "/home/shichenrui/TongGUI/ubuntu_env/desktop_env/Ubuntu.qcow2"
5+
6+
# Token-based quota configuration
7+
tokens:
8+
alpha: 24
9+
enqi: 4
10+
11+
# Authentication settings for the remote docker server API
12+
auth:
13+
require_token: true
14+
header_name: "Authorization"
15+
bearer_prefix: "Bearer "
16+

rollouter/desktop_env/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

rollouter/desktop_env/actions.py

Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
X_MAX = 1920 # TODO: get the screen resolution
2+
Y_MAX = 1080
3+
4+
KEYBOARD_KEYS = ['\t', '\n', '\r', ' ', '!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', 'accept', 'add', 'alt', 'altleft', 'altright', 'apps', 'backspace', 'browserback', 'browserfavorites', 'browserforward', 'browserhome', 'browserrefresh', 'browsersearch', 'browserstop', 'capslock', 'clear', 'convert', 'ctrl', 'ctrlleft', 'ctrlright', 'decimal', 'del', 'delete', 'divide', 'down', 'end', 'enter', 'esc', 'escape', 'execute', 'f1', 'f10', 'f11', 'f12', 'f13', 'f14', 'f15', 'f16', 'f17', 'f18', 'f19', 'f2', 'f20', 'f21', 'f22', 'f23', 'f24', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'final', 'fn', 'hanguel', 'hangul', 'hanja', 'help', 'home', 'insert', 'junja', 'kana', 'kanji', 'launchapp1', 'launchapp2', 'launchmail', 'launchmediaselect', 'left', 'modechange', 'multiply', 'nexttrack', 'nonconvert', 'num0', 'num1', 'num2', 'num3', 'num4', 'num5', 'num6', 'num7', 'num8', 'num9', 'numlock', 'pagedown', 'pageup', 'pause', 'pgdn', 'pgup', 'playpause', 'prevtrack', 'print', 'printscreen', 'prntscrn', 'prtsc', 'prtscr', 'return', 'right', 'scrolllock', 'select', 'separator', 'shift', 'shiftleft', 'shiftright', 'sleep', 'stop', 'subtract', 'tab', 'up', 'volumedown', 'volumemute', 'volumeup', 'win', 'winleft', 'winright', 'yen', 'command', 'option', 'optionleft', 'optionright']
5+
6+
ACTION_SPACE = [
7+
{
8+
"action_type": "MOVE_TO",
9+
"note": "move the cursor to the specified position",
10+
"parameters": {
11+
"x": {
12+
"type": float,
13+
"range": [0, X_MAX],
14+
"optional": False,
15+
},
16+
"y": {
17+
"type": float,
18+
"range": [0, Y_MAX],
19+
"optional": False,
20+
}
21+
}
22+
},
23+
{
24+
"action_type": "CLICK",
25+
"note": "click the left button if the button not specified, otherwise click the specified button; click at the current position if x and y are not specified, otherwise click at the specified position",
26+
"parameters": {
27+
"button": {
28+
"type": str,
29+
"range": ["left", "right", "middle"],
30+
"optional": True,
31+
},
32+
"x": {
33+
"type": float,
34+
"range": [0, X_MAX],
35+
"optional": True,
36+
},
37+
"y": {
38+
"type": float,
39+
"range": [0, Y_MAX],
40+
"optional": True,
41+
},
42+
"num_clicks": {
43+
"type": int,
44+
"range": [1, 2, 3],
45+
"optional": True,
46+
},
47+
}
48+
},
49+
{
50+
"action_type": "MOUSE_DOWN",
51+
"note": "press the left button if the button not specified, otherwise press the specified button",
52+
"parameters": {
53+
"button": {
54+
"type": str,
55+
"range": ["left", "right", "middle"],
56+
"optional": True,
57+
}
58+
}
59+
},
60+
{
61+
"action_type": "MOUSE_UP",
62+
"note": "release the left button if the button not specified, otherwise release the specified button",
63+
"parameters": {
64+
"button": {
65+
"type": str,
66+
"range": ["left", "right", "middle"],
67+
"optional": True,
68+
}
69+
}
70+
},
71+
{
72+
"action_type": "RIGHT_CLICK",
73+
"note": "right click at the current position if x and y are not specified, otherwise right click at the specified position",
74+
"parameters": {
75+
"x": {
76+
"type": float,
77+
"range": [0, X_MAX],
78+
"optional": True,
79+
},
80+
"y": {
81+
"type": float,
82+
"range": [0, Y_MAX],
83+
"optional": True,
84+
}
85+
}
86+
},
87+
{
88+
"action_type": "DOUBLE_CLICK",
89+
"note": "double click at the current position if x and y are not specified, otherwise double click at the specified position",
90+
"parameters": {
91+
"x": {
92+
"type": float,
93+
"range": [0, X_MAX],
94+
"optional": True,
95+
},
96+
"y": {
97+
"type": float,
98+
"range": [0, Y_MAX],
99+
"optional": True,
100+
}
101+
}
102+
},
103+
{
104+
"action_type": "DRAG_TO",
105+
"note": "drag the cursor to the specified position with the left button pressed",
106+
"parameters": {
107+
"x": {
108+
"type": float,
109+
"range": [0, X_MAX],
110+
"optional": False,
111+
},
112+
"y": {
113+
"type": float,
114+
"range": [0, Y_MAX],
115+
"optional": False,
116+
}
117+
}
118+
},
119+
{
120+
"action_type": "SCROLL",
121+
"note": "scroll the mouse wheel up or down",
122+
"parameters": {
123+
"dx": {
124+
"type": int,
125+
"range": None,
126+
"optional": False,
127+
},
128+
"dy": {
129+
"type": int,
130+
"range": None,
131+
"optional": False,
132+
}
133+
}
134+
},
135+
{
136+
"action_type": "TYPING",
137+
"note": "type the specified text",
138+
"parameters": {
139+
"text": {
140+
"type": str,
141+
"range": None,
142+
"optional": False,
143+
}
144+
}
145+
},
146+
{
147+
"action_type": "PRESS",
148+
"note": "press the specified key and release it",
149+
"parameters": {
150+
"key": {
151+
"type": str,
152+
"range": KEYBOARD_KEYS,
153+
"optional": False,
154+
}
155+
}
156+
},
157+
{
158+
"action_type": "KEY_DOWN",
159+
"note": "press the specified key",
160+
"parameters": {
161+
"key": {
162+
"type": str,
163+
"range": KEYBOARD_KEYS,
164+
"optional": False,
165+
}
166+
}
167+
},
168+
{
169+
"action_type": "KEY_UP",
170+
"note": "release the specified key",
171+
"parameters": {
172+
"key": {
173+
"type": str,
174+
"range": KEYBOARD_KEYS,
175+
"optional": False,
176+
}
177+
}
178+
},
179+
{
180+
"action_type": "HOTKEY",
181+
"note": "press the specified key combination",
182+
"parameters": {
183+
"keys": {
184+
"type": list,
185+
"range": [KEYBOARD_KEYS],
186+
"optional": False,
187+
}
188+
}
189+
},
190+
############################################################################################################
191+
{
192+
"action_type": "WAIT",
193+
"note": "wait until the next action",
194+
},
195+
{
196+
"action_type": "FAIL",
197+
"note": "decide the task can not be performed",
198+
},
199+
{
200+
"action_type": "DONE",
201+
"note": "decide the task is done",
202+
}
203+
]

rollouter/desktop_env/controllers/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)