Repository navigation
test: unit tests for osworld preprocessing/action set, setup_benchmark, abstract_env - #51
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
…p_benchmark, abstract_env Co-Authored-By: Daniella Grimberg <daniella@cognition.ai>
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test-only PR. It adds 4 new hermetic test files for the benchmark plumbing that runs without VMs or desktops. No changes to
src/or existing tests.agentlab.benchmarks.osworld_axtree_preprocessingagentlab.benchmarks.osworldagentlab.benchmarks.setup_benchmarkagentlab.benchmarks.abstract_env194 tests (193 pass, 1 strict xfail):
test_osworld_axtree_preprocessing.py(83),test_osworld_unit.py(67),test_setup_benchmark.py(29),test_abstract_env.py(15). Each file runs in about 1s. The tests pass serially, with-n 4, and underpytest-randomlyseeds 1–3.How the tests stay hermetic:
osworld:monkeypatch.setattr(osworld, "DesktopEnv", MagicMock())works whendesktop_envis absent (the module sets it toNone). That lets the tests run the realOsworldGym.__init__/reset/step/close, the obs conversion and the action conversion.time.sleepis patched.OsworldBenchmarkreads task JSON files written totmp_path.ubuntuandwindowsnamespaces.draw_bounding_boxesgets PNG bytes of a small gradient image (or a solid-colour image for the "single colour region" skip path).trim_accessibility_tree: a faketiktokenmodule goes intosys.modules, so there's no BPE download.setup_benchmark:os.system/_ensure_repoare patched, so nothing is cloned.MINIWOB_URLis registered with monkeypatch beforesetup_miniwobwritesos.environdirectly, so the variable doesn't leak between tests.Uncovered lines:
osworld.py31-32: thefrom desktop_env ...imports, which only run when desktop_env is installed.osworld_axtree_preprocessing.py197:bottom_right < coordscan't happen, because the positive-size check just before it already rejects those nodes.Bugs found (xfail strict)
tag_screenshot(..., platform="windows")doesn't passplatformon todraw_bounding_boxes. Windows trees are then read with the ubuntu component namespace and nothing gets tagged (test_windows_platform_tags_nodes).Other things the tests pin (current behavior, not marked as bugs)
convert_agentlab_action_to_computer_13("not a call")returns{"action_type": "NONE", "parameters": {}}instead of rejecting the action.AbstractBenchmark.get_versionis annotated-> intbut returns"1".Run
Devin-Org: engineering
Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/0272da97199448aba69dac1e9fa07eca
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/0272da97199448aba69dac1e9fa07eca?variant=devin
Requested by: @danigrim
Devin Review