Skip to content

fix(tb4): grade sandbox resource exhaustion as zero - #4733

Merged
cmunley1 merged 2 commits into
mainfrom
flafrance/tb4-sandbox-resource-limit-grades
Oct 19, 2026
Merged

cmunley1 merged 2 commits into
mainfrom
flafrance/tb4-sandbox-resource-limit-grades

Conversation

@lafrancef

@lafrancef lafrancef commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

TB4 currently reports an infrastructure outcome when an executing agent's sandbox dies after exceeding its allocation, so the rollout is omitted from scoring. Record a completed zero grade for provider-confirmed memory or ephemeral-storage limit deaths, preserving diagnostics, cleanup and verification replay. Keep setup, verifier, node-pressure and ambiguous failures as infrastructure outcomes.

The rollout and trial result expose sandbox_resource_limit; verifier_result.source identifies the limit-based grade. A dead agent sandbox skips the separate verifier, with null test counts.

Pin the mini-SWE host dependency to LiteLLM 1.102.1 for Gym's MCP 1 runtime. Newer LiteLLM releases import MCP 2 response types before dispatching model calls, breaking fresh installs.

Follow-up to #3573; no separate issue is needed for this scoped grading correction.

Validation

  • pre-commit run --all-files passes without modifying files.
  • TB4 example-data validation passes.
  • Regression coverage checks execution, quiescing, artifact collection, teardown, cleanup and restart replay. The storage-death regression fails on the base implementation because evaluation_completed remains false.

Rollouts

Bounded real-model smoke with gpt-5.4-mini-2026-03-17:

  • Control: one bash call, artifact collection and a separate verifier, reward 1.0.
  • Limit failure: one bash call writes at most 2 GiB in a 1 GiB sandbox; OpenSandbox confirms storage-limit eviction, yielding completed reward 0.0 without launching a verifier.
  • Native aggregation retains both outcomes: 2/2 scored, mean reward 0.5. Both sessions close, and the sandbox API confirms no owned test sandboxes remain.

Compatibility and benchmark impact

Applies automatically to new TB4 evaluations. Confirmed agent resource-limit deaths now contribute zero to the pass-rate denominator. Existing completed session records replay their saved results unchanged; provider details and the original agent termination remain available.

Checklist

  • I have read the contributing guidelines.
  • The change is focused.
  • Tests added or updated and pass locally.
  • Documentation updated.
  • Pre-commit checks pass locally (pre-commit run --all-files).
  • New source files include the required Apache-2.0 SPDX header.
  • All commits have DCO sign-off.

Record completed zero grades for confirmed agent sandbox memory and storage
limit deaths after execution starts, retaining provider diagnostics and cleanup.
Keep setup, verifier, node-pressure and ambiguous failures as infrastructure outcomes.

Signed-off-by: Frederic Lafrance <[email protected]>
@lafrancef lafrancef added bug Something isn't working area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers labels Oct 19, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 19, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@lafrancef

Copy link
Copy Markdown
Contributor Author

/ok to test 0431194

Prevent fresh mini-SWE host environments from resolving LiteLLM releases
that import MCP 2-only response types while Gym requires MCP 1.

Signed-off-by: Frederic Lafrance <[email protected]>
@lafrancef

Copy link
Copy Markdown
Contributor Author

/ok to test bb1e900

@cmunley1
cmunley1 added this pull request to the merge queue Oct 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/39287806283

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/39289015033

Merged via the queue into main with commit f10d52f Oct 19, 2026
48 of 53 checks passed
@cmunley1
cmunley1 deleted the flafrance/tb4-sandbox-resource-limit-grades branch October 19, 2026 17:12

This branch was previously deployed

1 inactive deployment
public — bb1e900b Deployed Oct 19, 2026 by copy-pr-bot[bot] via release / finalize / notify #5743
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants