Repository navigation
feat(saas-bench): add browser-use and OpenCode evaluation - #5969
Conversation
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
…onfiguration Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
Merge current upstream main and regenerate the SaaS Bench component lock for OpenAI SDK 2.45.0. This resolves the stale dependency graph reported by lock-freshness and uv lock --check without changing the SaaS harness or vendored benchmark runtime. Signed-off-by: Pritam Biswas <[email protected]>
Import exported failure kinds and config parser through Gym public APIs. Patch get_global_config_dict in its defining module so SaaS model tests do not leave a shadowing attribute on the lazy config facade and break later core tests. Signed-off-by: Pritam Biswas <[email protected]>
AdamRajfer
left a comment
There was a problem hiding this comment.
🤖 Adam’s AI assistant
I reviewed this for Adam, and only for failure handling. I didn't look at the verifiers' task logic or the data.
Blocking:
- A judge fault scores the model 0. If the judge still returns 429/5xx after the retry in
verifier_transport.py, the verifiers record a failed check. The error text ("Max retries exceeded … too many 503 error responses") doesn't match_INFRA, sounavailablestays false. A 200 with nochoicesbehaves the same way. Judge errors should mask and retry the row, not score it. failure_outcome_actionandfailure_outcome_attributionaren't declared anywhere. Please declare them asterminal_bench_2_1anddeepswedo, and map malformed output, output caps, context limits and timeouts to the model kinds (counted as 0) instead ofagent_run_error.- Some model-side endings are masked and rerun as infra: an OpenCode context overflow it can't recover from, and a browser-use timeout or agent exception. These are model results and should be graded.
Minor:
- The OpenCode timeout is graded without a failure kind; it should be
agent_timeout. - The description and some file headers point at internal resources, and this repo is public.
Persist judge transport/schema faults independently of verifier exception text for requests and urllib callers. Apply shared typed retry/evaluation versus counted-zero/model outcomes. Grade unrecovered context limits, output caps, actor errors and timeouts while app state is alive. Retain measured checks, cancellation cleanup and source provenance, without changing task verifier criteria. Signed-off-by: Pritam Biswas <[email protected]>
Use immutable public import snapshot links in source headers and the README. Retain original source hashes, revision attestations, author notices and licenses in provenance.json. Verified that every Python AST is unchanged by this metadata-only cleanup and all public snapshot targets exist. Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
Write agent_timeout in the worker result as well as the Gym response, and preserve it from the explicit timeout flag when execution-health metadata is absent. Test the real timed-out CLI path and the serialized response's counted-zero/model policy. Signed-off-by: Pritam Biswas <[email protected]>
Merge b2a2791 to clear advisory lock drift introduced while review fixes were validated. All 292 managed locks, 1572 targeted regressions and full pre-commit checks pass after this sync. Signed-off-by: Pritam Biswas <[email protected]>
|
@AdamRajfer Thanks for the failure-handling review. The fixes for all three blocking points and both minor points have been pushed (current head
Validation: 1,572 regression tests, all 292 managed lock checks, and four SaaS Factory composition tests passed. Both live hosted-model harness smokes completed with unmasked grading (OpenCode 0.143; browser-use 1.0). The live smokes used functional-fix commit Ready for another look at the failure-handling changes. |
AdamRajfer
left a comment
There was a problem hiding this comment.
🤖 Adam’s AI assistant
I reviewed this for Adam, again only for failure handling.
Thanks, judge faults and the model kinds look right now. Two things went the other way:
- browser-use: the blanket
except Exception(browser_worker.py:132), together with run_task's own catch-all, turns a Chrome CDP startup failure or a screenshot error intoagent_invalid_output= 0. Only actor endings the model caused should count. Browser and runtime setup errors should stay evaluation faults and be retried. - OpenCode: a timeout with no events (worker.py:392) is now scored as
agent_timeout. With no model turn at all, that's most likely a hung endpoint, not a model result. Please keep it retried.
Minor: provenance.json, NOTICE, the README and the description still reference gitlab-master and /lustre paths.
Signed-off-by: Pritam Biswas <[email protected]>
Signed-off-by: Pritam Biswas <[email protected]>
|
/ok to test 828a008 |
|
We no longer need main's order in |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/43789993849 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/43792472283 |
Signed-off-by: Pritam Biswas <[email protected]>
|
/ok to test 57efb27 |
Signed-off-by: Pritam Biswas <[email protected]>
|
/ok to test a84b4c5 |
Signed-off-by: Pritam Biswas <[email protected]>
|
/ok to test 4ba3008 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/43894123274 |
Adds SaaS Bench evaluation through browser-use 0.13.7 or OpenCode harness 2.1.1 (CLI 1.17.11), with Gym entry points for both and matching Eval Factory recipes.
Source and compatibility
The public source is UniPat-AI/SaaS-Bench, commit
48c22deb18b98c0ed78f81e7f3be82bc162de2c8, before v1.1. Its runtime is Apache-2.0; task data, inputs and graders are CC-BY-4.0. Upstreamsaas_bench/**,docker/**and the retained task verifiers map to the same relative paths underresponses_api_agents/saas_bench_agent/benchmark/. Every imported file names its source/revision/license. NVIDIA-authored extensions are distinguished from upstream imports; copyright modifications blocks, ATTRIBUTIONS, NOTICE and VENDORING describe the changes.95 unmodified public graders are external data, pinned byte-for-byte alongside metadata/media in the 323-file manifest. 11 modified graders remain in Gym: the original seven grading/schema adaptations plus four Drupal Unicode reader fixes added since the review's older head. Source bindings now cover 51 shipped files (23 upstream imports and 28 NVIDIA-authored extensions). The fork is not presented as upstream provenance.
The modified tasks can score differently from public upstream. In particular, business_052 requires exactly 24 percent discount instead of upstream's approximate 10.04-or-24 check; its check 15 also requires exact line items and total tolerance 0.01 instead of at least three lines and tolerance 1.0. The Pretix template enables manual payment for new events, which can make go-live checks easier. software_008 and software_025 change Baserow authorization from Token to JWT. All eleven changes are individually disclosed in headers and VENDORING; public-reference score equivalence is not claimed.
Task data and app/browser images are deployment inputs. The README documents portable mounts, image/helper requirements and the public pinned data checkout. Model/judge credentials are runtime references. No separate private benchmark-code checkout is required.
Review corrections
inconclusive_verification_retries(default1, range0–3). Attempt receipts and wall times are retained. Exhausted judge/verifier faults are masked with terminal fail/evaluation attribution: there is no promise of detached re-judging after app cleanup.Environment Server and harness scope
Both benchmark configs use Gym's shipped
legacy_agentEnvironment Server. It forwards/runand aggregation tosaas_bench_agent; the native agent/worker owns application setup, harness execution, final-state verification, failure policy and cleanup. OpenCode harness 2.1.1 / CLI 1.17.11 and browser-use 0.13.7 both remain supported. Existing flat prepared rows, repeat identity and both Factory entrypoint names are retained.Following the latest review, this revision removes
environment_servers/saas_bench_environmentand the SaaS agent-session registration. The new custom Environment Server still relied on an agent-supplied grade, so it did not make harnesses interchangeable. The browser outer-deadline fix and the OpenCode recovery/no-generation rule inresponse.pyare preserved unchanged.A separate follow-up will move apps, browser state/tools, action budgets, verification and metrics to a Resources Server under
single_agent_turn_legacy, with stockopencode_agentover MCP and a browser-use session adapter retaining the baseline protocol. This PR supports evaluation with two harnesses; it does not qualify multi-harness RL training or stock-harness score parity. Existing frozen evaluation/training campaigns retain their original pins and results.Validation
Current Gym head:
4ba300842360955ba9951b2764459d3d4724cbf1, including main25c5d318c4f638ac6d608771ec59eeaa82cfc137.Rollouts
Fresh Factory/Gym hosted-model smoke completed successfully at Gym
2bca62095dee190d3551fd66510e3796188e7e1dusing the restoredlegacy_agentrelay. One media_027 task per harness ran sequentially on one CPU node with a five-step budget. Both returned valid, unmasked native partial grades; each verifier ran nine checks with no judge failures. The allocation completed with exit code 0.These bounded smokes validate execution and live final-state grading, not full-task completion or public-reference score equivalence. Operational receipts, cluster job IDs and internal deployment details remain outside the public Gym checkout. Existing frozen campaigns are unchanged.
Merge-queue test reliability
The merge-queue repair addresses three shared fixture assumptions:
All production timeout and cleanup policies are unchanged.