Repository navigation
feat(web-agent): stop Nano rollouts without claiming N/A - #6325
JeffPengCoder merged 4 commits into
Conversation
Extract the shared opt-in Nano step-budget behavior from VisualWebArena PR NVIDIA-NeMo#2918 for independent Gym maintainer review. The option defaults off. On the last two policy requests it disables thinking while retaining the remaining chat-template fields and the original model history. The penultimate observation requests terminate(status="failure", answer=""). An empty answer reports no task solution; it must not fabricate the N/A answer that an unachievable VisualWebArena reference accepts as correct. The Qwen protocol and normal terminal answers keep their existing behavior. The dependent benchmark PR owns the native N/A evaluator regression. Validation against main f9d7d3b: NEMO_GYM_EXTRA_ROOTS=$PWD .venv/bin/python -m pytest responses_api_agents/web_agent/tests -q --no-cov -o log_cli=false --tb=short 119 passed, zero skipped. The dedicated budget matrix covers enabled/off, max_steps 1/2/3/5, retained history and template fields, terminal evaluation before close and unchanged Qwen behavior. PRE_COMMIT_HOME=/tmp/vwa-pr2918-query-precommit-20261117 PATH=/tmp/vwa-pr2918-checkin-uv-cache/archive-v0/iB5P_KDaZXSbMV8R/uv-0.13.4.data/scripts:$PATH .venv/bin/pre-commit run --all-files All hooks passed; no unrelated changes. git diff --check passed. Real model/browser validation is pending and the extracted PR remains draft. Review: NVIDIA-NeMo#2918 (review) Signed-off-by: Jeff Peng <[email protected]>
Add an agent-loop regression using the native WebArena N/A predicate already present on main. A policy obeying the actual budget prompt returns an empty answer and scores0; a voluntary N/A before the budget warning retains score1. Neither path needs a judge. This has no dependency on VisualWebArena code or PR NVIDIA-NeMo#2918 and belongs to independent PR NVIDIA-NeMo#6325. The user explicitly selected three separate PRs, each targeting main. Validation: NEMO_GYM_EXTRA_ROOTS=$PWD .venv/bin/python -m pytest responses_api_agents/web_agent/tests -q --no-cov -o log_cli=false --tb=short 121 passed, zero skipped. All-files pre-commit passed. Prior real model smoke at identical agent source bytes: empty budget answer, native VWA N/A score0, normal protected mutation score1,3 real GPT-4.1 policy calls, 0 judge calls. This is synthetic browser qualification, not benchmark score. The earlier 119-test record predates these two native predicate cases. The native evaluator test now lives here, superseding the earlier proposed ownership in the VWA child PR. No stacked dependency is required. Signed-off-by: Jeff Peng <[email protected]>
Follow the user's explicit decision: NVIDIA-NeMo#2918, NVIDIA-NeMo#6325 and NVIDIA-NeMo#6326 each target main. Remove the Nano step-budget agent and automatic X display allocator from VWA's ancestry and diff. The VWA config uses main's existing agent and 100-step budget and no longer enables an unmerged option. Move the native N/A agent-loop regression to independent NVIDIA-NeMo#6325, using the WebArena predicate already on main. NVIDIA-NeMo#6326 owns display allocation only. Neither independent PR is a prerequisite for the VWA integration. All other VWA correctness repairs remain: reset must observe ongoing then ready; ordinary waves reset under exclusive ownership before collection; shared-lease conversion rechecks its ownership receipt; native literal must_include semantics and the full-context fuzzy branch are explicit. Final independent VWA validation:2185 passed, zero skipped,5 warnings. The raw JUnit tests counter is2209; pytest's own summary is retained verbatim. All-files pre-commit passed. Resource/evaluator source and its12 new literal/ fuzzy cases are unchanged from the recorded1248-pass resource run plus the same-source two-case successful retry after Chromium startup timeouts. New real-model smoke on this main-only runtime: protected-profile state changed555-0111 -> +82 555-0111, score1 in2 policy turns. A one-action hard budget also achieved that actual DOM mutation and legitimately scored1; its final answer was None and the native N/A answer predicate scored0. The budget does not invent an unachievable answer or erase earned DOM credit. Exactly3 real GPT-4.1 policy calls,0 judge calls. The control HTTP service returned stale ready -> Reset ongoing -> Ready for duty for both epochs. These are synthetic headless browser fixtures, not a new benchmark score. Exact test command from this checkout: env -u NEMO_GYM_EXTRA_ROOTS .venv/bin/python -m pytest tests/unit_tests/web tests/unit_tests/test_public_api.py tests/unit_tests/test_public_api_facades.py tests/unit_tests/test_import_linter_coverage.py tests/unit_tests/data/test_task_data.py tests/unit_tests/tooling/test_migrate_imports.py tests/unit_tests/test_fern_docs_links.py benchmarks/visualwebarena/tests benchmarks/webarena/tests responses_api_agents/web_agent/tests environment_servers/legacy_agent/tests -q --no-cov -o log_cli=false --tb=short --junitxml=/Users/jepeng/workspace/rl/my-rl/webarena/visualwebarena/runs/2026-11-18-pr2918-review-followup/vwa-independent-core.xml The previous combined-source qualification is retained in earlier commit metadata; the full new outcomes and configurations follow, superseding its proposed stacked dependency. The next checkpoint benchmark will deliberately combine the three separately pinned PRs in an evaluation-only checkout, as requested by the user, while every review PR continues targeting main. { "scope": "Synthetic browser/controller fixture; real model and native WebAgent/verifier. Collector subprocess transport alone replaced. No production reset or canonical 908 measurement.", "policy_model": "us/azure/openai/gpt-4.1", "model_endpoint": "https://inference-api.nvidia.com/v1", "browser_preflight": { "output": "/Users/jepeng/workspace/rl/my-rl/webarena/visualwebarena/runs/2026-11-18-pr2918-review-followup/model-smoke-independent/coordinator-preflight/rollouts.jsonl", "model_cases": [] }, "coordinated_model": { "output": "/Users/jepeng/workspace/rl/my-rl/webarena/visualwebarena/runs/2026-11-18-pr2918-review-followup/model-smoke-independent/coordinator-model/rollouts.jsonl", "model_cases": [ { "scenario": "protected-profile", "before": "555-0111", "after": "+82 555-0111", "reward": 1, "actual_reward": 1.0, "mask_sample": false, "failure_kind": null, "policy_calls": 2, "judge_calls": 0, "model_turns": 2, "environment_steps": 2 } ] }, "budget_model": { "scenario": "hard-budget-limit", "before": "555-0111", "after": "+82 555-0111", "reward": 1, "actual_reward": 1.0, "mask_sample": false, "failure_kind": null, "policy_calls": 1, "judge_calls": 0, "model_turns": 1, "environment_steps": 1 }, "controller_events": [ { "path": "/reset", "lease": { "run_id": "e2a8612daea34ac18c5f1ee646bf0385", "epoch": 2, "phase": "resetting", "reset_verified": false } }, { "path": "/status", "body": "Ready for duty!" }, { "path": "/status", "body": "Reset ongoing" }, { "path": "/status", "body": "Ready for duty!" }, { "path": "/reset", "lease": { "run_id": "1002579cd734421f8bc5cd4b1299e3c6", "epoch": 2, "phase": "resetting", "reset_verified": false } }, { "path": "/status", "body": "Ready for duty!" }, { "path": "/status", "body": "Reset ongoing" }, { "path": "/status", "body": "Ready for duty!" } ], "policy_calls": 3, "judge_calls": 0 } Complete protected-profile configuration: scope: closed-world protected-state / step-budget smoke; canonical intent retained, fixture URL/evaluator substituted; not canonical task accuracy endpoint: https://inference-api.nvidia.com/v1 model: us/azure/openai/gpt-4.1 tokenizer: provider managed chat_template: provider managed policy_protocol: nano_omni_toolcall tool_parser: parse_nano_omni_tool_calls reasoning_parser: null judge: called: false reason: native exact_match target sampling: temperature: 0 max_output_tokens: 1024 top_p: not sent seed: not sent stop: not sent agent: host: localhost port: 8001 num_workers: null uvicorn_reuse_port: null entrypoint: app.py domain: null name: web_agent session_close_timeout_seconds: 60.0 session_close_retry_window_seconds: 300.0 skip_verification: false skip_verification_reward: 0.0 tool_servers: [] token_id_capture: false tool_accesses: [] resources_server: type: resources_servers name: browser environment_server: null model_server: type: responses_api_models name: policy policy_protocol: nano_omni_toolcall max_steps: 5 max_parse_retries: 0 nano_omni_max_tool_calls: 8 nano_omni_max_computer_actions: 20 nano_omni_max_scroll_amount: 50 nano_omni_retry_invalid_tool_calls: true nano_omni_parse_retry_feedback: false nano_omni_parse_retry_temperature: null nano_omni_parse_retry_delay_secs: 0.0 repeated_action_warning_threshold: 0 repeated_action_window: 5 max_consecutive_execution_failures: 3 model_turn_max_retries: 0 model_retry_delay_secs: 1.0 max_image_history: 3 qwen_fold_size: 10 qwen_history_n: 100 qwen_coordinate_type: relative qwen_thinking: true judge_max_screenshots: 3 task_image_root: null max_task_image_bytes: 26214400 visual_observation_text: full_axtree redact_old_visual_observations: false resources_request_timeout_secs: 180.0 seed_request_timeout_secs: 1800.0 seed_retry_initial_delay_secs: 2.0 seed_retry_max_delay_secs: 30.0 model_request_timeout_secs: 600.0 judge_request_timeout_secs: 300.0 close_request_timeout_secs: 30.0 run_timeout_secs: 1800.0 task: benchmark: visualwebarena task_id: '345' intent: Prepend the country code of South Korea to the phone number of my account profile. start_urls: - http://127.0.0.1:60684/item sites: - shopping input_images: [] runtime_profile: visual_browser observation_profile: screenshot action_profile: computer_use verifier_profile: visualwebarena_classic auth_profile: null seed: 0 task_kwargs: collision_plan: snapshot_adapters: program_html: targets: - key: f91b3a122bf3d4fe target: url: http://127.0.0.1:60684/item locator: document.querySelector('#status').textContent required_contents: exact_match: +82 555-0111 target_overrides: {} shared_state: run_id: 1002579cd734421f8bc5cd4b1299e3c6 epoch: 2 original_metadata: id: semantic-protected-profile-0 ques: Prepend the country code of South Korea to the phone number of my account profile. web: - http://127.0.0.1:60684/item eval: eval_types: - program_html program_html: - url: http://127.0.0.1:60684/item locator: document.querySelector('#status').textContent required_contents: exact_match: +82 555-0111 resource_verifier_config: host: localhost port: 8010 num_workers: 1 uvicorn_reuse_port: null entrypoint: app.py domain: agent name: webarena expose_tools_over_mcp: false session_close_retry_window_seconds: 300.0 max_sessions: 1 artifact_dir: cache/webarena-browser/artifacts inline_screenshots: true max_evidence_screenshots: 200 session_ttl_seconds: 3600 reaper_interval_seconds: 60 browser_session_provider: local_process: {} browser_session_options: {} browser_lease_ttl_seconds: 900 browser_acquire_timeout_seconds: 300.0 browser_release_timeout_seconds: 60.0 browser_heartbeat_interval_seconds: 60.0 browser_heartbeat_timeout_seconds: 30.0 browser_heartbeat_failure_limit: 3 require_auth: false auth_token_env: VISUAL_BROWSER_RESOURCES_TOKEN site_pool_mode: unmanaged max_sessions_per_site: 4 allowed_benchmarks: - webarena - visualwebarena browser_auto_install: true headless: false viewport_width: 1920 viewport_height: 1080 action_delay_seconds: 2.0 default_timeout_ms: 45000 terminate_on_action_error: true max_tool_calls: 8 max_computer_actions: 20 max_scroll_amount: 50 scroll_timeout_seconds: 30.0 action_limits: max_wait_seconds: 30.0 max_step_wait_seconds: null record_video: false browser_channel: null task_image_root: null max_task_image_bytes: 26214400 visualwebarena_require_clean_state: true visualwebarena_state_root: /Users/jepeng/workspace/rl/my-rl/webarena/visualwebarena/runs/2026-11-18-pr2918-review-followup/model-smoke-independent/fixture-state browser: headless: true viewport: - 640 - 480 device_scale_factor: 1 history_bridge: explicit Azure tool acknowledgements; no argument rewriting transport: existing remote credential used in place Complete hard-budget-limit configuration: scope: closed-world protected-state / step-budget smoke; canonical intent retained, fixture URL/evaluator substituted; not canonical task accuracy endpoint: https://inference-api.nvidia.com/v1 model: us/azure/openai/gpt-4.1 tokenizer: provider managed chat_template: provider managed policy_protocol: nano_omni_toolcall tool_parser: parse_nano_omni_tool_calls reasoning_parser: null judge: called: false reason: native exact_match target sampling: temperature: 0 max_output_tokens: 1024 top_p: not sent seed: not sent stop: not sent agent: host: localhost port: 8001 num_workers: null uvicorn_reuse_port: null entrypoint: app.py domain: null name: web_agent session_close_timeout_seconds: 60.0 session_close_retry_window_seconds: 300.0 skip_verification: false skip_verification_reward: 0.0 tool_servers: [] token_id_capture: false tool_accesses: [] resources_server: type: resources_servers name: browser environment_server: null model_server: type: responses_api_models name: policy policy_protocol: nano_omni_toolcall max_steps: 1 max_parse_retries: 0 nano_omni_max_tool_calls: 8 nano_omni_max_computer_actions: 20 nano_omni_max_scroll_amount: 50 nano_omni_retry_invalid_tool_calls: true nano_omni_parse_retry_feedback: false nano_omni_parse_retry_temperature: null nano_omni_parse_retry_delay_secs: 0.0 repeated_action_warning_threshold: 0 repeated_action_window: 5 max_consecutive_execution_failures: 3 model_turn_max_retries: 0 model_retry_delay_secs: 1.0 max_image_history: 3 qwen_fold_size: 10 qwen_history_n: 100 qwen_coordinate_type: relative qwen_thinking: true judge_max_screenshots: 3 task_image_root: null max_task_image_bytes: 26214400 visual_observation_text: full_axtree redact_old_visual_observations: false resources_request_timeout_secs: 180.0 seed_request_timeout_secs: 1800.0 seed_retry_initial_delay_secs: 2.0 seed_retry_max_delay_secs: 30.0 model_request_timeout_secs: 600.0 judge_request_timeout_secs: 300.0 close_request_timeout_secs: 30.0 run_timeout_secs: 1800.0 task: benchmark: visualwebarena task_id: budget-probe intent: Prepend the country code of South Korea to the phone number of my account profile. start_urls: - http://127.0.0.1:60741/item sites: - shopping input_images: [] runtime_profile: visual_browser observation_profile: screenshot action_profile: computer_use verifier_profile: visualwebarena_classic auth_profile: null seed: 0 task_kwargs: collision_plan: snapshot_adapters: program_html: targets: - key: 8296d9e8e5de5518 target: url: http://127.0.0.1:60741/item locator: document.querySelector('#status').textContent required_contents: exact_match: +82 555-0111 target_overrides: {} original_metadata: id: semantic-hard-budget-limit-0 ques: Prepend the country code of South Korea to the phone number of my account profile. web: - http://127.0.0.1:60741/item eval: eval_types: - program_html program_html: - url: http://127.0.0.1:60741/item locator: document.querySelector('#status').textContent required_contents: exact_match: +82 555-0111 resource_verifier_config: host: localhost port: 8010 num_workers: 1 uvicorn_reuse_port: null entrypoint: app.py domain: agent name: webarena expose_tools_over_mcp: false session_close_retry_window_seconds: 300.0 max_sessions: 1 artifact_dir: cache/webarena-browser/artifacts inline_screenshots: true max_evidence_screenshots: 200 session_ttl_seconds: 3600 reaper_interval_seconds: 60 browser_session_provider: local_process: {} browser_session_options: {} browser_lease_ttl_seconds: 900 browser_acquire_timeout_seconds: 300.0 browser_release_timeout_seconds: 60.0 browser_heartbeat_interval_seconds: 60.0 browser_heartbeat_timeout_seconds: 30.0 browser_heartbeat_failure_limit: 3 require_auth: false auth_token_env: VISUAL_BROWSER_RESOURCES_TOKEN site_pool_mode: unmanaged max_sessions_per_site: 4 allowed_benchmarks: - webarena - visualwebarena browser_auto_install: true headless: false viewport_width: 1920 viewport_height: 1080 action_delay_seconds: 2.0 default_timeout_ms: 45000 terminate_on_action_error: true max_tool_calls: 8 max_computer_actions: 20 max_scroll_amount: 50 scroll_timeout_seconds: 30.0 action_limits: max_wait_seconds: 30.0 max_step_wait_seconds: null record_video: false browser_channel: null task_image_root: null max_task_image_bytes: 26214400 visualwebarena_require_clean_state: true visualwebarena_state_root: /Users/jepeng/workspace/rl/my-rl/webarena/visualwebarena/runs/2026-11-18-pr2918-review-followup/model-smoke-independent/fixture-state browser: headless: true viewport: - 640 - 480 device_scale_factor: 1 history_bridge: explicit Azure tool acknowledgements; no argument rewriting transport: existing remote credential used in place Signed-off-by: Jeff Peng <[email protected]>
The real32-instance CPU gate found HTTP500 during seed: the Arena backend factory always constructed a local PyAutoGUI driver, which correctly rejected transport=browser_instance. Use the existing public RemoteWebBackend for that transport and name this same Arena factory as the worker-side composition. The instance then creates the normal local driver and evaluator in the process owning its DISPLAY. Preserve the local lease PID/DISPLAY/transport checks. This uses an API already on main, so NVIDIA-NeMo#2918 remains independent of NVIDIA-NeMo#6325 and NVIDIA-NeMo#6326. The global per-site locks remain in the one resource-server process. Site login, page actions and native VWA evaluation stay in the leased worker; there is no CDP-input fallback and no process-wide DISPLAY mutation. The new factory regression fails twice before the fix and passes after it; the local composition control passes before and after. Focused tests: .venv/bin/python -m pytest resources_servers/webarena_browser/tests/test_pooled_backend.py resources_servers/webarena_browser/tests/test_contract.py tests/unit_tests/web/test_browser_session.py tests/unit_tests/web/test_visual_browser.py -q --no-cov -o log_cli=false --tb=short 82 passed,1 existing optional-environment skip. All-files pre-commit passed following Ruff formatting of the new test. The earlier32-worker readiness was only pool/HTTP readiness, not successful task setup; its failed native seed gate remains archived. GPU allocation and formal benchmark have not started for this correction. Real pooled browser/model qualification will be recorded in the PR once completed; this commit does not claim it already ran. Signed-off-by: Jeff Peng <[email protected]>
laszkiewiczp
left a comment
There was a problem hiding this comment.
Review of #6325 at 71e163e: no blocker or major.
The option is off by default, so other web_agent users keep today's behaviour. With it on, a Nano rollout is told at its second-to-last step to end with status="failure", answer="", and thinking is off for the last two requests. An empty answer cannot match an N/A reference, and test_step_budget_scoring.py covers both sides: a budget stop scores 0, and a voluntary N/A still scores 1.
One point for the docs, not a code defect: with the option on, the model gets one or two fewer useful steps, and no thinking on the last two. That is a different protocol from the reference harness, which runs all steps and then stops early. Please say this where the option is documented, and say which benchmarks may enable it. A score measured with the option is only comparable to scores measured with it.
Checked: test_step_budget.py and test_step_budget_scoring.py at 71e163e, 11 passed.
|
/ok to test 71e163e |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP WITH CARE
I found one RISK: enabling the budget option rejects empty template metadata that the existing model consumer accepts, turning the rollout into a masked infrastructure failure. I also suggest documenting the option's evaluation-protocol change as a NOTE.
I reviewed all four changed files and traced request metadata, observation history, termination and native N/A grading. This was a source-only review. I did not execute tests or independently reproduce the reported model/browser smoke.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
Treat absent or empty chat template metadata the same way as the vLLM chat consumer before disabling thinking in the last two step slots. Keep other metadata and reject malformed or non-object JSON. Document the opt-in rollout protocol and show the default off setting in the exemplar. Compare scores collected with matching budget settings. Validation: four empty-metadata cases fail before this patch. All 139 WebAgent tests pass after it. All applicable pre-commit hooks pass. The synthetic GPT-4.1 and Chromium rollout accepted empty metadata, reached native evaluation, and retained a valid zero on the N/A predicate. Signed-off-by: Jeff Peng <[email protected]>
laszkiewiczp
left a comment
There was a problem hiding this comment.
Re-review of #6325 at 542b832 (since my review at 71e163e). No major findings. An empty chat_template_kwargs now behaves as an empty object instead of failing json.loads before the first policy call; malformed or non-object JSON still fails validation, with a regression test. The README documents that the option is off by default, applies only to nano_omni_toolcall and changes the protocol, and the example config sets it to false explicitly.
|
/ok to test 542b832 |
|
/ok to test ce792dc |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/44532294822 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/44532952606 |
The optional Nano step-budget prompt must not fabricate the N/A answer that native unachievable-task grading accepts. Request terminate(status="failure",answer="") instead, disable thinking only for the final two policy requests, and preserve other template fields and history. The feature defaults off and leaves Qwen behavior unchanged.
This is independent PR #6325, targeting main; it has no dependency on #2918 or #6326. It is extracted in response to #2918 (review). No separate issue is needed.
Validation:121 standalone agent tests and all-files hooks passed. The agent-loop regression invokes the native WebArena N/A predicate already on main: an empty budget answer scores0 and a voluntary N/A before the warning scores1, without a judge call. A real GPT-4.1/Chromium smoke on identical agent source bytes also returned the empty budget answer; native VWA N/A grading scored0. The normal mutation control scored1. This is synthetic qualification, not canonical benchmark accuracy. The earlier119-test record predates the two new native-predicate cases.
Head:
71e163e8d8a9ca485cd329853629d449a1d1d75d.Complete opt-in agent qualification configuration and outcomes
This earlier qualification used the VWA fixture evaluator at combined source bb5f9d9; it is evidence of the identical agent behavior, not a dependency of this PR. Its raw source identity and request/response evidence remain in the run record.