Merge branch 'main' of github.com:xlang-ai/OSWorld

This commit is contained in:
yuanmengqi
2025-07-18 14:17:37 +00:00
21 changed files with 36 additions and 26 deletions

View File

@@ -459,7 +459,11 @@ def load_xlsx_styles(xlsx_file: Workbook, sheet_name: str, book_name: str, **opt
for r in fmt.rules:
active_cells: List[Cell] = []
if r.type == "expression":
condition: Callable[[str], bool] = formula_parser.ast("=" + r.formula[0])[1].compile()
try:
condition: Callable[[str], bool] = formula_parser.ast("=" + r.formula[0])[1].compile()
except:
logger.exception("Formula parsing error: %s. Skipping.", repr(r.formula[0]))
continue
logger.debug("Expression condition: %s", r.formula[0])
arguments: List[Any] = []
@@ -493,9 +497,15 @@ def load_xlsx_styles(xlsx_file: Workbook, sheet_name: str, book_name: str, **opt
if nb_contiguous_nothings>50:
break
continue
elif condition(cell_value, *arguments):
logger.debug("Active Cell %s(%s) for %s", repr(cell), str(cell_value), r.formula[0])
active_cells.append(cell)
else:
try:
satisfies_condition: bool = condition(cell_value, *arguments)
except:
logger.exception("Error in formula calculation with cell value %d", repr(cell_value))
satisfies_condition = False
if satisfies_condition:
logger.debug("Active Cell %s(%s) for %s", repr(cell), repr(cell_value), r.formula[0])
active_cells.append(cell)
else:
raise NotImplementedError("Not Implemented Condition Type: {:}".format(r.type))

View File

@@ -82,4 +82,4 @@
"proxy": false,
"fixed_ip": false,
"possibility_of_env_change": "low"
}
}

View File

@@ -91,4 +91,4 @@
"proxy": false,
"fixed_ip": false,
"possibility_of_env_change": "low"
}
}

View File

@@ -87,4 +87,4 @@
"proxy": false,
"fixed_ip": false,
"possibility_of_env_change": "low"
}
}

View File

@@ -82,4 +82,4 @@
"proxy": false,
"fixed_ip": false,
"possibility_of_env_change": "low"
}
}

View File

@@ -109,4 +109,4 @@
"proxy": false,
"fixed_ip": false,
"possibility_of_env_change": "low"
}
}

View File

@@ -95,4 +95,4 @@
"proxy": false,
"fixed_ip": false,
"possibility_of_env_change": "low"
}
}

View File

@@ -176,4 +176,4 @@
"proxy": false,
"fixed_ip": false,
"possibility_of_env_change": "low"
}
}

View File

@@ -82,4 +82,4 @@
"proxy": false,
"fixed_ip": false,
"possibility_of_env_change": "low"
}
}

View File

@@ -32,4 +32,4 @@
"proxy": false,
"fixed_ip": false,
"possibility_of_env_change": "low"
}
}

View File

@@ -91,4 +91,4 @@
"proxy": false,
"fixed_ip": false,
"possibility_of_env_change": "low"
}
}

View File

@@ -88,4 +88,4 @@
"proxy": false,
"fixed_ip": false,
"possibility_of_env_change": "low"
}
}

View File

@@ -61,4 +61,4 @@
"proxy": false,
"fixed_ip": false,
"possibility_of_env_change": "low"
}
}

View File

@@ -82,4 +82,4 @@
"proxy": false,
"fixed_ip": false,
"possibility_of_env_change": "low"
}
}

View File

@@ -109,4 +109,4 @@
"proxy": false,
"fixed_ip": false,
"possibility_of_env_change": "low"
}
}

View File

@@ -82,4 +82,4 @@
"proxy": false,
"fixed_ip": false,
"possibility_of_env_change": "low"
}
}

View File

@@ -1,7 +1,7 @@
{
"id": "0a211154-fda0-48d0-9274-eaac4ce5486d",
"snapshot": "libreoffice_impress",
"instruction": "Set the background color of slides with a real person picture as yellow and set the title of slide 2 as \"Let's start\".",
"instruction": "Set the background color to yellow for any slide that contains one or more images of real people, and set the title of slide 2 as \"Let's start\".",
"source": "https://arxiv.org/pdf/2311.01767.pdf",
"config": [
{

View File

@@ -83,4 +83,4 @@
"proxy": false,
"fixed_ip": false,
"possibility_of_env_change": "low"
}
}

View File

@@ -112,4 +112,4 @@
"proxy": false,
"fixed_ip": false,
"possibility_of_env_change": "low"
}
}

View File

@@ -168,4 +168,4 @@
"proxy": false,
"fixed_ip": false,
"possibility_of_env_change": "low"
}
}

View File

@@ -73,7 +73,7 @@
<div class="video-player">
<video id="task-recording" controls playsinline webkit-playsinline
preload="metadata" width="100%" controlslist="nodownload">
<source src="/task/{{ task_type }}/{{ task_id }}/recording" type="video/mp4">
<source src="/task/{{ task_type }}/{{ task_id }}/recording?action_space={{ action_space }}&observation_type={{ observation_type }}&model_name={{ model_name }}" type="video/mp4">
Your browser does not support the video tag.
</video>
<div id="video-status" class="video-status">Loading video...</div>
@@ -103,7 +103,7 @@
{% endif %}</pre>
{% if step.screenshot_file %}
<div>
<img src="/task/{{ task_type }}/{{ task_id }}/screenshot/{{ step.screenshot_file }}"
<img src="/task/{{ task_type }}/{{ task_id }}/screenshot/{{ step.screenshot_file }}?action_space={{ action_space }}&observation_type={{ observation_type }}&model_name={{ model_name }}"
alt="Step {{ step.step_num }} Screenshot" class="step-image">
</div>
{% endif %}
@@ -155,7 +155,7 @@
}, 2000);
// Directly check video source availability with fetch API
fetch('/task/{{ task_type }}/{{ task_id }}/recording', {method: 'HEAD'})
fetch('/task/{{ task_type }}/{{ task_id }}/recording?action_space={{ action_space }}&observation_type={{ observation_type }}&model_name={{ model_name }}', {method: 'HEAD'})
.then(function(response) {
if (response.ok && videoStatus.textContent === 'Loading video...') {
// If HEAD request succeeds but video events haven't fired