Repository navigation
Conversation
…OpenSandbox BioML-bench (MIT) gives an agent a biomedical ML task and grades its predictions with the task's own grader. Tasks run in upstream's public task image on OpenSandbox; answers stay out of the agent's sandbox and are graded in a separate one. Signed-off-by: Wojciech Prazuch <[email protected]>
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP WITH CARE
Found two runtime correctness/operability risks, one required-validation gap, and two documentation/provenance notes.
RISK — Record model-backed rollout and reward-profile evidence
The supplied validation reports unit tests and lint, but no real model rollouts or aggregate reward figures. The oracle lifecycle check only copies a sample submission; it does not exercise Terminus-2 inference and model-produced submissions through the new integration. Trusted AGENTS.md requires representative real model smoke rollouts, and the pinned rubric additionally requires baseline reward figures for a new evaluation benchmark. This is an evidence gap, not a demonstrated scoring failure.
Correction and acceptance: Run representative model-backed trials through the shipped profile, covering the ProteinGym, OpenProblems, and Polaris/TDC preparation paths. Record the model/version, exact command/configuration, task and rollout counts, mean reward/any-medal rate, valid-submission rate, and grader/infrastructure failure counts. Include inspected agent trajectories, submissions, and verifier reports. Identify any shortened smoke budget separately from full-budget baseline results. Preserve the pinned image/data/task contract, four-repeat default, invalid-submission versus infrastructure-failure distinction, and oracle check; the oracle remains useful additional coverage, not a substitute for model evidence.
Completed static inspection of all 11 changed files and their directly affected preparation, request, sandbox, and reward paths. No tests or rollouts were executed. Upstream image contents and the external Harbor implementation were unavailable locally; no additional findings assume their undocumented behavior.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
| "mkdir -p /home/submission /home/logs && chown nonroot:nonroot /home/submission /home/logs /logs/agent", | ||
| "permission setup", | ||
| ) | ||
| await self._run_as_root( |
There was a problem hiding this comment.
RISK — Preserve the validation server after setup returns
Failure: This launch uses _run_as_root → ordinary Harbor environment exec, which never selects preserve_background_services=True. The existing OpenSandbox survival regression covers this pattern: readiness succeeds inside the launch command, but ordinary command cleanup removes the server and the next command gets connection refused. nohup does not select the provider's service-preserving execution path. Thus successful BioML startup can leave every agent without its advertised submission-checking tool.
Correction: Use service-preserving execution only for this launch, retaining ordinary execution for other setup and Harbor commands. A suggested replacement for _run_as_root is:
async def _run_as_root(
self, command: str, what: str, *, preserve_background_services: bool = False
) -> None:
error_type = None
if preserve_background_services:
wrapped = f"{self._exec_shell} {shlex.quote(command)}" if self._exec_shell else command
result = await self._require_sandbox().exec(
wrapped,
timeout_s=self._setup_timeout_sec,
user="root",
preserve_background_services=True,
)
error_type = result.error_type
else:
result = await self.exec(command, timeout_sec=self._setup_timeout_sec, user="root")
if error_type is not None or result.return_code != 0:
output = (result.stderr or "") + (result.stdout or "")
raise RuntimeError(
f"BioML-bench {what} failed (error={error_type}, exit={result.return_code}): {output[-4000:]}"
)Then add preserve_background_services=True only to the existing "validation server start" call. The sandbox API preserves user overrides and falls back to ordinary exec for providers without this capability. Verify this suggestion before adopting it.
Preservation: Keep the redirected output and readiness loop, root setup, OpenProblems-only AWS installation, private-data removal, and existing failed/cancelled-setup teardown. Check both raw error_type and exit status on the new branch; do not turn provider failures into successful startup.
Acceptance — proposed, not executed: After real start() returns, issue a separate command that GETs /health and POSTs the public sample to /validate; expect HTTP 200 and Submission is valid. Repeat after another ordinary agent command. Extend the environment tests with service-branch timeout/transport-error and cancellation cases: setup must fail and close the sandbox, while the existing preparation and permission assertions remain true.
| if not submission.is_file(): | ||
| return False, f"Submission invalid! Submission file {submission} does not exist." | ||
| suffix = submission.suffix.lower() | ||
| if suffix == ".h5ad": |
There was a problem hiding this comment.
RISK — H5AD uploads bypass the advertised submission-schema checks
Failure: Given the public CSV sample id,y\n0,0\n1,0\n, upload a readable H5AD containing an empty AnnData matrix. This branch returns Submission is valid. without comparing prediction count, identifiers, or missing values. The branch is selected solely by the upload filename, whereas CSV uploads undergo the checks below. This lets the agent-facing checker certify files that violate its documented format contract. This finding does not assume how the external grader ultimately handles that file.
Correction: Make validate() check H5AD contents against the task's public submission schema before returning success, or reject H5AD specifically for tasks whose grader accepts only CSV. Restore the invariant that changing the upload extension cannot bypass schema validation. The external graders are not mounted, so the mapping between CSV prediction columns/IDs and AnnData axes needs confirmation before choosing an exact patch; blanket H5AD rejection could break supported submissions.
Preservation: Retain valid CSV submissions, including reordered rows, and rejection of wrong columns, row counts, IDs, missing values, and malformed CSV. For tasks supporting H5AD, retain correctly shaped files with the required identifiers rather than rejecting the whole format.
Acceptance — proposed, not executed: Add a /validate regression with the two-row CSV sample and an empty readable H5AD; expect an invalid-submission response, never Submission is valid. Retain the valid/reordered and invalid CSV assertions in the existing checker test. For each retained H5AD format, add a minimal valid fixture that succeeds and wrong-shape/wrong-ID fixtures that fail against the confirmed public schema.
| Agents have internet access, as upstream. Several source datasets are public, so a determined agent | ||
| could find test labels; BioML-bench relies on its instructions forbidding this. | ||
|
|
||
| ## Run |
There was a problem hiding this comment.
NOTE — Suggestion: expose the benchmark in the published user docs
The new benchmark's setup and measurement contract exist only in this repository README; no Fern documentation is added. The pinned rubric requires published user documentation for notable benchmarks, and trusted AGENTS.md identifies its location.
Add a short BioML-bench page alongside the existing evaluation tutorials. Include the prepare/run commands, OpenSandbox credentials, 20-task CPU scope, resource/time cost, four repeats, any-medal reward interpretation, and separate-verifier/data-pin deviations. Preserve this README's detailed measurement contract and link to it rather than duplicating implementation details.
Acceptance — static check: The page is reachable through the folder-based Fern navigation; its commands select biomlbench/harbor_opensandbox, and its budget, repeats, and scoring statements match the shipped configuration.
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # ADDITIONAL_NOTES below adapts agents/aide/additional_notes.txt from |
There was a problem hiding this comment.
NOTE — Suggestion: complete the adapted-text provenance record
This header identifies the adapted AIDE notes, exact revision, and MIT notice, but the supplied PR description does not identify that adaptation or revision, and the vendored-components record has no corresponding entry. Trusted AGENTS.md requires provenance in both the PR description and adapted file; CONTRIBUTING.md also requires the attribution record.
Add an attribution entry and PR-description sentence identifying upstream AIDE notes at the pinned revision, MIT, and the ADDITIONAL_NOTES adaptation in this preparation module. Record that the two step-budget lines were removed and placeholders filled. Preserve the existing upstream copyright/license text; no runtime change is needed.
Acceptance — static check: Header, attribution entry, and PR description identify the same source URL, full revision, license, affected Gym file, and adaptation.
What
Adds the CPU tasks of BioML-bench v0.1a: an agent gets a biomedical ML task, builds a model, and submits predictions. The task's own grader scores them.
Why
It tests end-to-end ML work on real biology data (proteins, single-cell, drug discovery and more), not just question answering.
How
benchmarks/biomlbench/prepare.pywrites one Harbor task per BioML-bench task. Each runs in upstream's public task image, pinned by digest.harbor_agent_generalon OpenSandbox (harbor_opensandbox.yaml).Data and licence
science-machine/biomlbench v0.1a and its public
millerh1/biomlbench-envimage, MIT.Testing
The new prepare tests (22) pass. The
harbor_agent_generalsuite passes in its own venv (104 passed).ruffandpre-commitpass.