Skip to content

feat(babyvision_opencode): prepare BabyVision from the public Hugging Face release - #5915

Closed
DanialTaheri wants to merge 29 commits into
NVIDIA-NeMo:yifuw/babyvision-opencode-sessions-mainfrom
DanialTaheri:babyvision-public-data
Closed

DanialTaheri wants to merge 29 commits into
NVIDIA-NeMo:yifuw/babyvision-opencode-sessions-mainfrom
DanialTaheri:babyvision-public-data

Conversation

@DanialTaheri

Copy link
Copy Markdown
Contributor

What this is

A fix for the review comment on resources_servers/visual_coding_opencode/README.md:75-78 in #5839: neither accepted BabyVision TSV has a public download. This PR targets #5839's branch (yifuw/babyvision-opencode-sessions-main).

prepare.py now downloads BabyVision from UnipatAI/BabyVision (MIT license) at revision 849cbeea2b1d00ad334e9e1e2b49a1960c9ff3f3. That is the revision the README already cites for the example rows. It reads one file, data/train-00000-of-00001.parquet, and checks its SHA-256. BABYVISION_PARQUET reads a local copy of that file on a host without internet access. The two TSVs, LMUData, BABYVISION_TSV and KNOWN_MD5 are gone.

Same data as before

  • The release has the same 388 tasks as the TSVs, in the same order. Every task's question, answer, category, subcategory and answer type match, once a choice question lists its options as (A) … after Choices: and its answer is the option's letter.
  • The release stores 211 PNGs, 171 JPEGs and 6 WebPs. The PNG copy of the TSV (md5 4216333e…) holds the same pixels, as RGB PNGs. prepare.py decodes each image and saves it as an RGB PNG. The alpha channels in the release are fully opaque, so no pixel changes.
  • As a result, the prepared JSONL of both benchmarks is byte-identical to what the 4216333e… TSV produced (babyvision_opencode md5 9d666cd2…, question-only md5 7df8e3b6…). That holds with Pillow 12.3.0 (uv.lock) and with 13.0.0. Scores measured on that copy stay comparable. The other copy (b3a93182…) re-encoded 175 images as JPEG, so its prompts differed slightly.

Changes

  • benchmarks/babyvision_opencode/prepare.py:
    • pins REPO_ID, REVISION and PARQUET_SHA256;
    • downloads the file with hf_hub_download;
    • convert() reads release records.
  • Both benchmarks' configs and manifests set prepare_dependencies: [pillow], as agentic_mme does, because a dev install of Gym has no Pillow.
  • tests/unit_tests/benchmarks/test_babyvision_opencode_prepare.py runs on a two-row parquet fixture. It covers:
    • the choice format and the letter answer;
    • RGB PNG output for JPEG, WebP and RGBA input;
    • the SHA-256 and row-count checks;
    • the pinned download call.
  • Docs:
    • the resources server's README: its "BabyVision data" section names the file's URL and SHA-256;
    • both benchmarks' READMEs and config comments;
    • the tutorial;
    • the task_id and source_id descriptions in task_data.py.

Validation

  • In an environment synced like the unit-test workflow (uv sync with the dev, ray, sandbox, openshell, mlflow and wandb extras), these pass: 273 passed. The suites are test_babyvision_opencode_prepare.py, test_babyvision_opencode_configs.py, test_fern_docs_links.py, resources_servers/visual_coding_opencode/tests, test_environment_manifest.py and test_registry.py.
  • ruff check and ruff format --check (0.9.9, the pre-commit pin) pass on the changed Python files.
  • I ran both preparers once against a real download with an empty Hugging Face cache. They wrote 388 rows each, byte-identical to the TSV-based files (md5 9d666cd2… and 7df8e3b6…).

yfw and others added 29 commits November 9, 2026 17:25
A resources-server tool can list images under tool_output_images, each a data URL with an optional label. Gym's
MCP layer returns them as MCP image content after the reply's text, each after its label. simple_agent shows them
to the model in a user message after the turn's tool outputs, since a Chat Completions tool message carries only
text.

A result with images carries no structured content unless the tool declares an output schema. OpenCode 1.17.11
replaces an MCP result's content with its structured content when that is present, which would drop the images.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…urces server lends

Nine servers lend a per-episode sandbox, and each writes its own code to start it from config, describe it as
SandboxAccess, stop it at close (keeping it when the stop fails, so close can retry) and stop the rest at shutdown.
LentSandboxes holds that part. The server keeps its own ResourcesSessionFence and any other session state, and
calls lend() in its typed seed and release() in its typed close. Files are optional, so the same call lends a
sandbox with the task files or an empty one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…a session's config

Training on OpenCode rollouts needs one chain of model calls per rollout, and a fair comparison
with other harnesses needs a step budget. The session path accepted only permission and tools,
so neither could be set.

A session's opencode_config now also accepts compaction.auto (a boolean) and agent.build.steps
(a positive integer), and still refuses everything else, including compaction.prune (it rewrites
old tool output, which breaks the token prefix) and other agent fields (they would replace the
adapter's prompt, model or sampling). The replacement system prompt and the request sampling now
join each agent's entry instead of overwriting it, and the session copies opencode_config instead
of mutating the shared one.

Tests: the allowlist, both prompt modes, request sampling beside a step limit, and the real
OpenCode 1.17.11 binary reading steps from the session config (GYM_TEST_OPENCODE_BINARY).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
Main split ResourcesSessionFence into ResourcesSessionLocks and ResourcesSessionFences (NVIDIA-NeMo#5083).
A server holds the session's ResourcesSessionLocks lock around lend() and release().

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…operate descriptor

A lent sandbox now stops as SandboxSessionResourcesServer's do:

- Every stop is shielded from the cancellation of its request and bounded by STOP_TIMEOUT_S, so a close whose
  client disconnects still stops the sandbox, and a hung provider does not hold the close forever.
- release_all() stops the sandboxes concurrently, at most SHUTDOWN_STOP_CONCURRENCY at a time, because the
  supervisor gives a server about a second to exit.
- The harness gets an operate descriptor (serialize(scope="operate")): it may use the sandbox but not destroy it.

Each new test fails without its change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…e of a lent sandbox

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
… describe the step limit as OpenCode applies it

From the call at the step limit on, OpenCode 1.17.11 adds an assistant message (MAX_STEPS_PROMPT) to each request.
The fingerprint join of token capture finds no earlier call for such a request and records a capture failure, so
NeMo-RL drops the rollout as poisoned, with only the finalize/capture_poisoned_rollouts metric to show it. With
forest training the call starts a new chain instead, the same break that compaction.auto: false avoids. So with token
capture on, a session's seed now refuses agent.build.steps with 422. Eval without token capture is unchanged.

OpenCode also still offers the tools at the limit, with tool_choice auto, so a model that keeps calling them runs past
it. The docstring and the README now say so instead of "caps the model calls". The harness guide's OpenCode row lists
the session keys the README lists.

Test: with token capture on, a seed with agent.build.steps gets 422 and starts nothing; compaction.auto alone still
seeds. The test fails on the previous code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…ol reply's JSON format

- A reply model may declare an optional image list, so FastAPI sends "tool_output_images": null in a reply without
  images. split_tool_output_images raised on it: simple_agent failed the rollout with HTTP 500, and MCP returned an
  error result for every call without an image. Null now means no images.
- simple_agent wrote the rest of an image reply with json.dumps defaults (spaces, \uXXXX escapes). It now uses the
  compact UTF-8 form FastAPI sends, so a tool's text is the same with and without images, and the same as the MCP
  tool result.
- The module docstring names the two readers of the key (simple_agent and the MCP endpoint), says where each puts
  the label and the image, and says that an agent that does not read the key passes the base64 data as text.

Tests: a null image list; the JSON format of an image reply; a plain-text or nested tool output that only names the
key stays unchanged (the JSONDecodeError and top-level-key fallbacks). The first two fail on the previous code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…s sandbox

lend() stops a new sandbox when serialize fails or the seed is cancelled while it runs. No test failed if that stop
went back to an unshielded sandbox.stop(): a cancelled seed then left the sandbox running until ttl_s, and
release_all() could not stop it because lend() had not stored it. The new test cancels the seed during serialize
and fails with that change.

The docstring now says "episode seed" and "episode close", the glossary names, and says what a stop does: it goes
on when its request is cancelled and gives up after STOP_TIMEOUT_S.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
A new section says how a tool returns images (the key, ToolOutputImage, a short example), what the model gets from
the /mcp endpoint, from simple_agent and from an agent that does not read the key, that null means no images, and
that an agent which puts the images inside its tool output (Codex) needs inline_tool_output_images on vllm_model.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…within it

NeMo RL sets max_output_tokens on every row (its generation limit). An OpenCode sandbox
session refused the field, so an OpenCode training run under NeMo RL failed its first
episode with 422 "does not support request field max_output_tokens", and RL stopped the run.

A session now accepts max_output_tokens when it is at least the configured
max_output_tokens, which is OpenCode's own limit for each model call. A smaller value is
still refused, so nothing is silently ignored.

Test: a NeMo RL row (temperature 1.0, top_p 1.0, max_output_tokens 4096 or 16384 with a
configured limit of 4096) passes, and OpenCode keeps the limit of 4096. The test fails
without this change. The existing refusal of max_output_tokens 123 still passes.
819 OpenCode tests pass. The same change ran in the run C and D smokes (3 steps each).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…del server

A harness that creates its own sandbox can set network_access model_only, so the sandbox reaches only the model
server. A sandbox that a resources server lends kept the provider's network, and the harness that borrows it cannot
change that, so a lent sandbox could reach the internet.

LentSandboxes now takes network_access ("inherit" by default, or "model_only") and model_server. With model_only,
lend() adds the same egress rule that an agent-owned sandbox gets: deny by default, and allow the model server's host
on every port. A provider without network policies, or a model server on a loopback address, refuses the seed with
HTTP 422 before any sandbox starts. Setting model_only together with an explicit
sandbox_config.provider_options.network_policy is a configuration error.

restricted_network_policy and its host check move from nemo_gym.agents.agent_tools to nemo_gym.utils.network_policy,
since server_runtime sits below agents in the package layers. agent_tools imports them, so the old names still work.

Test: tests/unit_tests/server_runtime/test_sandbox_lending.py (13 passed), the agents and server_runtime unit tests,
and the import-linter hook.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
(cherry picked from commit b0abe8e)
… step limit

With agent.build.steps set, OpenCode 1.17.11's `opencode run` appends a note that asks for a final
answer from call number `steps` on. It still offers the tools, so the model may answer or keep calling
tools. An environment whose own agent scores an episode that runs out of rounds as 0 needs to know
when a rollout reached the limit, because otherwise the harness rewards long tool loops: a policy
trained with the answer at the limit scored learned to use every step.

The OpenCode agent now sets response metadata `harness_step_limit_reached: "true"` when the last
prompt made at least `steps` model calls (one saved assistant message per call). The new
HARNESS_STEP_LIMIT_METADATA_KEY in nemo_gym.agents names it for any harness adapter. The mark only
reports the limit; the environment decides how to score it.

Tests: opencode_agent 825 passed, 23 skipped (new: the mark at, above and below the limit, and
counting only the last prompt). tests/unit_tests/agents and test_public_api: 660 passed; the 3
test_outcome_policy failures need cloudpickle, which the local environment lacks, and fail the same
without this change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…Gym NVIDIA-NeMo#5833's capture fix is installed

A seed with token capture refused agent.build.steps, because OpenCode's step-limit note made capture poison the
next call. Gym NVIDIA-NeMo#5833 fixes that in token capture and adds nemo_gym/models/token_capture/harness_notes.py. The seed
now refuses the setting only when that file is missing, so a branch that merges both PRs can train with a step
limit. The check reads the installed package's files and imports nothing.

TODO: remove the check once NVIDIA-NeMo#5833 is on main.

Tests: the refusal without the fix, the acceptance with it, and the file check. opencode_agent: 832 passed,
23 skipped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
return_session_trajectory now defaults to true, in the agent config class and in configs/opencode_agent.yaml.
Close then returns OpenCode's own turns (one per saved assistant reply, compaction summaries left out), so rollout
collection joins each captured model call to the step that made it. With false, every call is reported as an
unmatched assistant message and the harness evidence checks become noise. Training data does not change, because
training uses the captured calls.

Tests: the default in the config class and the shipped config; the existing parametrized test keeps both values.
opencode_agent, rollouts and the repo session contract: 3428 passed, 23 skipped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…arness calls

LentSandboxes takes network_access="model_and_tools" with tool_servers,
as agent-owned sandboxes already do. The egress rule allows the model
server's host and the host of each tool server, such as the resources
server that serves its tools over MCP. Before, a lent sandbox whose
harness calls MCP tools could only keep the provider's network.

tool_servers is refused without model_and_tools, and model_and_tools is
refused without tool_servers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…ort, in either layout

The check for NVIDIA-NeMo#5833's capture fix probed for nemo_gym/models/token_capture/harness_notes.py. NVIDIA-NeMo#5833 now keeps the
notes in a harness_notes/ package, so the probe returned False even with the fix installed, and a seed with token
capture would refuse agent.build.steps for good. The check now imports the module and looks for an OpenCode entry in
HARNESS_NOTES, which works for a module or a package and does not turn on for an unrelated file at that path.

Tests: no module; a module or a package with an OpenCode note, a Pi note only, or no notes. Checked by hand against
NVIDIA-NeMo#5833's package at 1c0cd40: False without it, True with it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
ToolOutputImage checked only the data URL's prefix, so invalid base64 or JPEG bytes labeled image/png passed and
failed later, at the model server or in the harness, as a rollout error. It now decodes the URL with
MediaFile.from_data_uri, the rule for prompt images: valid base64 holding a PNG, JPEG, GIF or WebP image, any case,
image/jpg allowed. The URL is written again from the content, so its label always matches the bytes. A bad image is
again a ValidationError, an error of the tool.

Tests: invalid base64, base64 that is not an image, and a PNG signature without IHDR are refused; a mislabeled JPEG
and image/JPG are relabeled. Tool-image fixtures use a real 1x1 PNG. The MCP page says how images are checked.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…, and drop agentic_if's copy of the default

The opencode_agent config's comment now says what false costs: one turn per captured call, so evidence checks report
every call as unmatched, and compaction summaries count as steps. agentic_if set the same value as the new default,
so its line goes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…imit, as OpenCode does

reached_step_limit() took the last user message as the prompt and counted the assistant messages after it. An
automatic compaction adds user messages (the compaction marker, then a synthetic "Continue" text or a replay of the
prompt), so the count restarted after a compaction, and a prompt that reached the limit was not marked.

OpenCode 1.17.11's session loop (session/prompt.ts) counts passes: each build call, each compaction summary call,
and a pass that only starts a compaction after a finished call overflowed (session/compaction.ts saves its marker
without an overflow field). The counter is not reset by compaction. The check now skips the user messages that
compaction adds when it finds the prompt, and counts those passes.

Tests: five exports in OpenCode's message shapes, the overflow-pass and in-call compaction paths, a compaction with
no continuing message, and a new prompt after a compacted one. Four fail on the old count. The README says how the
limit is counted and when token capture allows it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…livery, and keep a failed seed's stop for retry

Two cleanup gaps in LentSandboxes.lend():

- A seed cancelled while the new sandbox received its files left the sandbox running. AsyncSandbox.start() stops
  the sandbox when an upload fails, but that stop is not shielded, so it is cancelled with the request. lend() now
  runs start() inside its own failure path, whose shielded, bounded _stop() finishes the stop; after a stop that
  did finish, _stop() does nothing.
- When a failed seed's stop failed or timed out, the sandbox was dropped, so no close or shutdown could stop it.
  It is now kept apart from the lent sandboxes: get() never returns it, release() and release_all() retry its stop,
  and the session's next lend stops it before it starts another sandbox (a failed stop there fails the lend).

Tests: a seed cancelled during upload_file() with the real AsyncSandbox.start() and a provider close that crosses an
AnyIO checkpoint; a failed seed whose first stop fails or hangs, stopped later by release() or release_all(); a
repeated seed that stops the earlier sandbox first, and one that fails while that stop still fails. The seven new
tests fail without the fix. test_sandbox_lending.py and tests/unit_tests/sandbox: 2028 passed, 8 skipped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…nd when token capture allows the step limit

The harness guide's OpenCode row now matches the README: a session's opencode_config also accepts attachment (from
NVIDIA-NeMo#4922), and agent.build.steps works with token capture once the harness notes know OpenCode's step-limit message.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…n benchmarks on OpenCode sandbox sessions

A multi-turn visual-coding environment: OpenCode answers a question about an image in a sandbox whose shell has
Python with pillow, numpy, scipy and opencv, and a GPT judge grades the final \boxed{} answer against the gold
answer. BabyVision (388 visual-reasoning puzzles) and its question-only variant run on it.

- `resources_servers/visual_coding_opencode`: the judge (`equivalent` scores 1; a failed call or a reply without a
  valid verdict is masked as `judge_failed`, not scored 0), the task-data schema, and a typed seed and close that
  lend each episode a sandbox through `LentSandboxes` with `sandbox_network_access: model_only`, so the sandbox
  reaches only the policy model. A sandbox image (`sandbox_image/Dockerfile`) carries the toolkit and OpenCode
  1.17.11, pinned by its SHA-256.
- The environment config runs each task with `opencode_agent` in a sandbox session behind the
  `single_agent_turn_legacy` Environment Server. The prompt image is attached with `opencode run --file`.
  Compaction is off and there is no step limit, so Gym's token capture joins every model call and the same config
  serves evaluation and RL.
- `benchmarks/babyvision_opencode` and `benchmarks/babyvision_opencode_question_only`: prepare scripts for
  VLMEvalKit's BabyVision TSV (checked by md5), configs and manifests.
- The "Evaluate Visual Coding with OpenCode" tutorial and its index entry.
- Tests: the judge, the lent sandbox and the session contract, the BabyVision configs, the prepare scripts, and the
  example rows run through a seeded `opencode_agent` session.

Based on NVIDIA-NeMo#5712 by Danial MohseniTaheri, moved from a host-CLI agent path onto sandbox sessions.

Co-authored-by: Danial MohseniTaheri <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…outs

The server test's data check expects 5 example rows, their metrics and 5 example rollouts.

- example.jsonl: three small synthetic puzzles, and BabyVision tasks 4624 (Spatial Perception, Count 3D blocks) and
  487 (Visual Pattern Recognition, Logic Patterns) from the UnipatAI/BabyVision dataset on Hugging Face (MIT
  license), revision 849cbeea2b1d00ad334e9e1e2b49a1960c9ff3f3, in prepare.py's format. The README names the source.
- example_metrics.json comes from `gym dataset collate ... +mode=example_validation`.
- example_rollouts.jsonl is one rollout of each row: OpenCode in a lent, model-only sandbox, a hosted
  vision-language policy and a gpt-4o-mini judge. Four rows score 1.0; task 4624 ends incomplete and scores 0.

Co-authored-by: Danial MohseniTaheri <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
The model looks at its crops and plots through OpenCode's read tool, and OpenCode passes those images to the model
only when the model declares image input. Since NVIDIA-NeMo#4922, opencode_agent declares it when the prompt has images or
image_input is true. The prompt image already declared it; image_input: true keeps it declared for any row, as NVIDIA-NeMo#4922
asks of configs whose tools return images. The session tests now run with the setting.

Tests: visual_coding_opencode, BabyVision, docs link and session contract tests: 73 passed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…MIT, and run the prepare tests in CI

- prepare.py writes the TSV index as task_id, which `gym eval plan` needs (it raised ConfigError for every row);
  TaskData declares it, optional, so the example rows stay valid.
- Both manifests say `licensing: MIT`, the license of UnipatAI/BabyVision, so `gym env publish` accepts them.
- The prepare tests move to tests/unit_tests/benchmarks/, where the core test suite runs them; no CI job collected
  benchmarks/babyvision_opencode/tests. A new check covers task_id.
- The README says that mean/reward leaves judge failures out, and that scores are not comparable to the BabyVision
  leaderboard, whose scorer judges only the last \boxed{} with another judge.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…e policy model, and grade only a finished final answer

Network and seeds:
- The lent sandbox's egress rule opens every port of the policy model's host, and NeMo RL gives every server
  without its own host that address. The judge, the agent, the resources server and the Environment Server now set
  host 127.0.0.1, so sandbox code cannot spend the judge's key, run OpenCode on the host, or start sandboxes and
  episodes. All their callers run on the same host. A config test checks that only the policy model takes
  NeMo RL's default_host.
- While the server lends sandboxes, it refuses a cookie seed (an agent's own /run, which would run OpenCode on its
  host without the image) and a malformed typed seed with 422; the stateless server refuses only the latter.

Grading:
- A run whose status is incomplete (a timeout, an output cap or a context limit) scores 0 without a judge call, as the
  docs promised; an early \boxed{} guess no longer reaches the judge.
- `extracted` is the last \boxed{}, the answer the prompt asks for, not string_match's last "answer:".
- The verdict comes from every JSON object in the reply that has one: a brace ahead of it no longer masks the row,
  and objects that disagree stay a judge failure. A reply with no choices is a judge failure too.
- Judge calls run inside observe_llm_judge_grading, so judged rows carry a grading record.
- judge_model is removed: the judge's model server picks the model.

Config and docs:
- The Environment Server admits 64 episodes at a time (the agent's concurrency), and an episode has 5400 s, below the
  sandbox's 7200 s TTL; before, all rows started sandboxes at once with a 21600 s deadline.
- The docs say that model_only keeps the model off the internet only on an OpenSandbox server that enforces egress
  at the IP layer (dns+nft), what `thinking` does, and how NeMo RL's masked_reward_policy treats a judge failure.

Tests: verdict parsing, empty choices, incomplete runs, the last \boxed{}, the gold answer in the judge prompt, the
exported verifier fixture, seed refusals, hosts and admission. Ten new cases fail on the old code. 86 passed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
…o the sandbox image

opencode_agent always configures a plugin, so OpenCode 1.17.11 installs @opencode-ai/plugin from npm at each start
unless the dependencies are present. The lent sandbox reaches only the model server, so each start waited about 70 s
for that install to fail before the first model call.

The image now builds the dependency archive in two stages, from a copy of benchmarks/agentic_if/opencode's lockfile
with the recipe in benchmarks/agentic_if/README.md: npm ci with Node 24.15.0 (npm 11.12.1), then GNU tar 1.34 and
GNU gzip 1.10 (Debian 11). The build checks the archive against the pinned SHA-256 (77b03eba..., the same bytes
agentic_if pins), and the config sets sandbox_plugin_dependencies_path and _sha256 to it. The docker build context
is sandbox_image/, so the two lockfile files are copied there; a test keeps them equal to agentic_if's.

Checked: the image builds and holds the archive with the pinned digest. Offline (docker --network none), with one
plugin configured and the adapter's OpenCode environment, the first model request came 1.0 s after start with the
archive unpacked into XDG_CONFIG_HOME/opencode, and 71.1 s without it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
… Face release

prepare.py read BabyVision from one of two VLMEvalKit-style TSVs that have
no public download. It now downloads UnipatAI/BabyVision (MIT license) at
revision 849cbeea2b1d, checks the parquet file's SHA-256 and builds each row
from the release record: the options listed as (A), (B), ... after
"Choices:", the option's letter as the answer, type, subtype and ansType as
category, l2_category and ans_type, and every image as an RGB PNG.
BABYVISION_PARQUET reads a local copy of the file on a host without
internet access.

Both prepared files (babyvision_opencode and the question-only variant) are
byte-identical to the ones the TSV with md5 4216333e produced, so scores on
that copy stay comparable.

Both benchmarks declare prepare_dependencies: [pillow], as agentic_mme
does, since a dev install of Gym has no Pillow.

Signed-off-by: Danial MohseniTaheri <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Nov 10, 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.

@DanialTaheri

Copy link
Copy Markdown
Contributor Author

/ok to test db2a707

@github-actions

Copy link
Copy Markdown
Contributor

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP WITH CARE — one RISK: the added preparation-dependency fields make both BabyVision manifests invalid.

I reviewed all 12 changed files and traced the preparation workflow, dataset contract, runtime consumers, tests, and documentation. I found no other qualifying issues.

This was a static, read-only review. I didn't execute tests or retrieve the external release, so the reported full-release byte equivalence remains author-reported validation.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

type: benchmark
jsonl_fpath: benchmarks/babyvision_opencode/data/babyvision_opencode_benchmark.jsonl
prepare_script: benchmarks/babyvision_opencode/prepare.py
prepare_dependencies:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RISK — Keep preparation dependencies in the configs, not the manifests.

Loading either modified manifest now fails: ManifestDataset inherits extra="forbid" and doesn't declare prepare_dependencies. Consequently, load_manifest() raises ManifestError at datasets.0.prepare_dependencies. Catalog discovery catches this and falls back to legacy entries, losing manifest metadata; manifest validation fails before inspecting either workload.

Could you remove this block from both this manifest and the question-only manifest?

-  prepare_dependencies:
-  - pillow

Retain prepare_dependencies: [pillow] in both configs: the preparation workflow reads it there. This restores valid manifests without removing Pillow installation from either benchmark. The manifest projection already excludes preparation-only fields.

The dependent config test currently compares entire raw mappings. Replace its final assertion with:

datasets = [OmegaConf.to_container(dataset) for dataset in agent["datasets"]]
assert all(dataset["prepare_dependencies"] == ["pillow"] for dataset in datasets)
assert [
    {key: value for key, value in dataset.items() if key != "prepare_dependencies"}
    for dataset in datasets
] == manifest["datasets"]

Proposed acceptance checks, not executed: parameterize load_manifest() over both real manifests and expect success; discover both catalog entries and assert each manifest_path points to its real manifest, rather than None; run the existing parameterized config test and retain its routing assertions plus the dependency assertion above. Keep the existing blank/choice preparation results and question-only instruction omission unchanged. Please verify the suggested changes before adopting them.

@yfw
yfw force-pushed the yifuw/babyvision-opencode-sessions-main branch from cf81746 to 93c064f Compare November 10, 2026 08:15
@yfw
yfw requested a review from a team as a code owner November 10, 2026 08:15
@yfw
yfw deleted the branch NVIDIA-NeMo:yifuw/babyvision-opencode-sessions-main November 11, 2026 01:19
@yfw yfw closed this Nov 11, 2026

This branch was previously deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants