Skip to content

feat(video): agentic Video-MME v2, Video-MME, LVBench and open-ended video QA on stock opencode_agent, with Video-MME v2 / Video-MME agentic benchmarks - #6315

Merged
yaoyu-33 merged 51 commits into
NVIDIA-NeMo:mainfrom
cg1177:guoc/agentic-video-frames
Nov 21, 2026

Conversation

@cg1177

@cg1177 cg1177 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #6238, #6290 and #6314. Their current heads (and main) are merged into this branch, so until they land
the diff also shows their changes. This PR's own changes are the agentic commits and the commits after the merges,
among them one that adapts video_qa_rubric (#6314) to this PR's failure reading, one that adds the question and options
to the agentic example rows, and one that runs video_qa_rubric's open-ended questions agentically (below). Once the
three are merged, merging main again leaves only this PR's changes. The branch only gains commits, with no rebase or
force-push: b1d18416a, an earlier head, is pinned by a downstream evaluation setup.

What

The agentic setting of the three video benchmarks that #6071 added in single-turn form, two benchmarks that run it on
the full Video-MME v2 and Video-MME, and the same setting for video_qa_rubric's open-ended questions (#6314). The model
answers each question with OpenCode in a sandbox that holds the video, using two video tools, watch_video and
view_image.

  • Stock harness. The new configs (videomme_v2_agentic.yaml, videomme_v1_agentic.yaml, lvbench_agentic.yaml)
    run the stock opencode_agent (OpenCode 1.17.11) through a single_agent_turn_legacy Environment Server, the shape
    of visual_coding_opencode (feat(visual_coding_opencode): visual-coding environment and BabyVision on OpenCode sandbox sessions #5839). Each episode's seed lends OpenCode a sandbox (LentSandboxes,
    sandbox_network_access: model_only), and the episode's close stops it.
  • OpenCode as in our training data. The four agentic configs offer the model OpenCode's own tools (task included)
    besides the video tools, except webfetch (tools: {webfetch: false}): the lent sandbox reaches only the model
    server, so its calls could only fail. The lent sandbox sets SHELL=/bin/sh, so OpenCode's shell tool runs commands
    with sh and its description says so. OpenCode's doom_loop permission stays at ask, so a model response that
    calls a tool a third time in a row with identical input ends the run without an answer. These are the settings of
    the rollouts our agentic video training data came from: the tools of the first request have the names, descriptions
    and parameters of the training trajectories' tool block (without its webfetch), and such a repeat ends the run the
    same way (see Validation).
  • Sandbox image from this repo. resources_servers/video_mcqa/sandbox_image/Dockerfile installs OpenCode 1.17.11
    and its plugin dependencies (the pins of visual_coding_opencode), the static FFmpeg 7.0.2 build of
    mwader/static-ffmpeg pinned by image digest and by the binaries' SHA-256, Python 3.13 with NumPy, Pillow and Pydantic
    pinned, and the video tools: the OpenCode plugin video_tools.mjs and the video_tools program it runs for each
    call. The configs read the image name from VIDEO_MCQA_SANDBOX_IMAGE. The image is the full node:22.23.3-bookworm
    image, pinned by digest, that our agentic video training data was generated in, so that evaluation and RL run in the
    same environment as the training trajectories (its shell, ImageMagick, git, compilers and other programs); a build
    stage installs the tools on the pinned Python 3.13 image, and the last stage copies them in and adds the URW fonts
    that ImageMagick's labels and annotations default to. Unlike in that sandbox, the model's own drawtext, montage
    and convert -annotate commands work; the build checks them and ripgrep (OpenCode's grep and glob tools).
  • Frame tools. watch_video(video_path, start, end, num_frames, resize_long_edge) samples the center of each of
    num_frames equal bins of [start, end), takes the latest source frame not after each sampling time, resizes by area
    to the requested long edge rounded down to the model's grid (patch_size / downsample_ratio, a parameter; 28 px by
    default) and returns JPEG frames (quality 95, 4:4:4) as images. Its text says what was sampled (the frame count, the
    video, the window, the spacing, the frame size and the visual tokens), that the frames are attached after the tool
    results in this order, and one Frame i: t s line per frame. Per-frame and per-call pixel caps refuse a request
    instead of shrinking it, and the plugin caps an episode's tool images (400 MiB of base64). view_image returns an
    image file unchanged. Both tools read regular files in the workspace and under video_tools.scratch_roots (default
    /tmp/opencode, where OpenCode's bash tool keeps temporary files such as frames or contact sheets the model made); a
    symlink that leads out of these directories is refused.
  • Seeding (video_mcqa/sandbox.py, used by the video_mcqa, videomme_v2 and video_qa_rubric servers): the row's
    video_binding.source must be a regular file under the configured video_roots; the video goes in with
    nemo_gym.sandbox.upload_path; one command in the sandbox then checks that the image's video tools have this
    repository's SHA-256 and the video the row's SHA-256 (422 otherwise), makes the video read-only and runs the tools'
    own check. A command result with an error_type or the -1 sentinel, like any other failure, stops the sandbox and
    raises, so the Environment Server runs the episode again.
  • Scoring reads the stock agent's outcome: in the agentic setting, a failed or incomplete response that reaches
    verify() is an execution_failure scored 0, from the response's own status, so a replayed row scores the same.
    This replaces the video_execution_failure metadata key, also in video_qa_rubric (feat(video-qa-rubric): open-ended video QA graded against each question's rubric #6314), which now
    calls the same response_failure. Single-turn scoring is unchanged.
  • Letter prompts and a judge for agentic rows. prepare_agentic(..., prompt=...) and prepare.py --prompt write
    an agentic row in a benchmark's own letter wording (feat(video_mcqa): a shared video multiple-choice base: judge-read answers from each row's question, question sets, frame rows #6238's single-turn prompts) after one line that names the video
    in the sandbox, Video: /testbed/videos/<file>; the boxed prompt stays the default.
    <benchmark>_agentic_llm_extraction.yaml, listed after <benchmark>_agentic.yaml, gives the agentic resources
    server feat(video_mcqa): a shared video multiple-choice base: judge-read answers from each row's question, question sets, frame rows #6238's answer judge. The judge's model server listens on 127.0.0.1, because the lent sandbox may reach every
    port of the policy model server's host.
  • Benchmarks videomme_v2_agentic and videomme_v1_agentic. prepare.py downloads the authors' annotation at a
    pinned revision and checks its SHA-256 (test.parquet of MME-Benchmarks/Video-MME-v2 at 6e4bebb0;
    videomme/test-00000-of-00001.parquet of lmms-lab/Video-MME at ead1408f; VIDEOMME_V2_PARQUET /
    VIDEOMME_V1_PARQUET name a local copy). It binds each question to <source_dir>/video/<video>.mp4 by the SHA-256
    that <source_dir>/FILES.sha256 lists, reading no video; the seed checks that hash in the sandbox. Rows use the
    letter prompts above with llm_extraction_v1; the judge defaults to gpt-6.1-sol at max reasoning effort
    (JUDGE_BASE_URL, JUDGE_API_KEY, JUDGE_MODEL). Video-MME v2 task IDs are videommev2-L<level>/<question_id>,
    and its cohort groups the four questions of each video under the level of the fourth while each question keeps its
    own (fix(videomme_v2): let the questions of one group keep their own levels #6290); Video-MME rows come from video_mcqa/prepare.py's prepare_dataset with task IDs
    videomme_v1:<question_id>.
  • prepare.py names the video at --sandbox-root/sandbox_path (default /testbed) in agentic prompts. Each of the
    three servers gets five agentic example rows (the single-turn example questions, with the committed clips bound
    by path), an agentic example cohort and one real-model rollout per row (see Rollouts).
  • Open-ended questions, agentically. video_qa_rubric_agentic.yaml runs video_qa_rubric's questions with the same
    stock opencode_agent, sandbox image, video tools and sandbox settings as the three video benchmarks; the rubric
    judge grades the final answer as in the single-turn setting, from a model server on 127.0.0.1. The
    video_qa_rubric server and its config take video_mcqa's VideoSandboxServer bases (with sandbox_provider
    unset nothing changes) and Gym's sandbox extra. task.prepare_agentic(task_id, question, rubric, video_path=...)
    builds an agentic row's user turn (the question and the video's sandbox path, never the rubric), and the row adds the
    video_binding that its task-data schema now declares. data/example_agentic.jsonl asks the five single-turn example
    questions about the committed clips, bound by path.
  • A separate commit moves the video servers' pre-0.8 nemo_gym import paths to the public packages
    (scripts/migrate_imports.py --check is clean for these folders), as feat(video): add single-turn Video-MME v2, Video-MME and LVBench environments #6071's description promised.

Nothing changes in nemo_gym/, opencode_agent, NeMo-RL, vLLM or OpenCode. The history holds a change to the sandbox
tools and its revert, which cancel out.

Why

Follow-up of #6071, whose agentic part was removed in review. It takes the route the review recommended
(opencode_video_agent/app.py:174): stock opencode_agent, a sandbox that the resources server lends, the
tools as an OpenCode plugin in an image built from the repo (steps 1, 2, 4 and 5). The frames reach the model as
images, so step 3 (video input for opencode_agent) is not needed, and neither are the NeMo-RL video media CLI and the
vLLM loader for the tool video (points 2 and 3 of the five). The image is built from this repo (point 1), and its
plugin is checked against the repo's at every seed (point 4). Real-model rollouts (point 5): see Rollouts. The fix of
review thread 2 (error_type, -1) is in the seed check; there is no post-run hash step anymore (grading never reads
the sandbox), and thread 8's duplicated key is gone with the agent.

The two benchmarks make the agentic setting runnable on the full official data, with the same questions and answer
reading as a judged single-turn evaluation, so the two settings can be compared question by question.

On 50 requests over seven test videos (B-frames, variable frame rate, a shifted container clock, MJPEG), the tool
returns the same frame indices, sizes and byte-identical JPEG frames as the reference implementation of these frame
rules, and its text states the same window, frame count, size, visual tokens and frame times. No issue: new
environment settings. The datasets stay evaluation only.

Behavior notes

  • Image placement. For an OpenAI-compatible provider, OpenCode keeps a tool result's text in the tool message and
    moves the images of all the tool results of one model response, in call order, into one user message after them
    (Attached media from tool result:). watch_video's text is written for that: it says that its frames are attached
    after the tool results, in the order in which it lists their times, and the tool's description says that the images
    of several calls in one response follow in call order. The model matches frames and times by order.
  • Large videos. The video goes into the sandbox in one upload, which Gym's OpenSandbox provider reads whole and
    sends in one write; that failed for files of about 1.6–2.0 GB in our runs (6 LVBench videos, 90 of its 1,549
    questions, are larger than 1.5 GiB). Such videos need feat(opencode): per-row sandbox inputs, model id, streamed uploads #5904, which streams OpenSandbox uploads from disk; until then
    their seeds fail and the cohort counts them as missing. The README says so.
  • OpenCode's own tools. webfetch is not offered: in a sandbox that reaches only the model server its calls fail,
    as they did when the training data was generated. OpenCode 1.17.11 offers websearch only with a search provider
    enabled, so it is not offered either. A task call runs its subagent in an OpenCode session of its own, whose model
    calls are not in the build agent's chain.
  • Repeated tool calls. OpenCode 1.17.11 asks for doom_loop when the last three parts of one model response are
    calls of the same tool with identical input. opencode run rejects the request, which ends the run with no answer
    (exit code 1, "The user rejected permission to use this specific tool call."). opencode_agent reports that run as
    failed (HTTP 502), which the Environment Server treats as a retryable agent failure: the episode is not scored and
    runs again within the attempt cap, as the rollouts of our training data ran such an attempt again. The same call
    repeated across separate responses does not end the run.
  • Thinking. OpenCode sessions send no chat_template_kwargs. For a model whose template takes enable_thinking,
    set it on the policy model server:
    ++policy_model.responses_api_models.vllm_model.chat_template_kwargs.enable_thinking=true.
  • Benchmark data. prepare.py downloads only the annotation (1.2 MB and 0.4 MB); the videos and their
    FILES.sha256 listing must already be on the host, as the Video-MME and Video-MME v2 terms do not allow us to
    redistribute them.

Related PRs

Validation (CPU; Python 3.13.14, uv 0.13.4)

At the head (0a563e6c79c117304de754f221d2e2e386225e60: one commit on 44ba0b105 that rewrites watch_video's text
and description for the layout above; the frames, the frame rules and view_image are unchanged):

  • ng_test +entrypoint=resources_servers/<server> +should_validate_data=true with FFmpeg 7.0.2 on PATH: video_mcqa
    420 passed, 122 subtests; videomme_v2 138; videomme_v1 1; lvbench 1; video_qa_rubric 89; each
    "successfully validated". tests/unit_tests/benchmarks/test_video_mcqa_task_data.py and
    test_videomme_agentic_prepare.py: 24 passed. pre-commit run --all-files: pass, no changes.
    scripts/component_locks.py: 327 projects, 0 failed. CI's secrets-detector command on the changed files: exit 0.
    The core suite was not rerun for this commit, which changes only video_mcqa's video tools, their tests and its
    README.
  • The image built from the Dockerfile passes the seed check; the image of 44ba0b105 fails it (its tool files
    differ). 50 watch_video requests on the test clips return the same 857 JPEG frames, byte for byte, as that image;
    the 47 replies with frames state the same window, frame count, size, visual tokens and frame times as its text, and
    the 3 refusals are the same. In a sandbox from the image (Docker, no network), the 16 checks listed under
    9f9d396df pass.
  • OpenCode 1.17.11 in the image with a scripted model server whose response calls watch_video twice (4 and 3 frames)
    and view_image once: the three tool messages carry the tools' text and no image, and the next user message carries
    the 8 images in call order. The first request equals the one with the previous tool files except for the added
    sentence of watch_video's description.
  • Remote OpenSandbox provider: a sandbox from the image was ready in 44 s and passed the seed check; 111 recorded
    watch_video calls gave the same 3,885 JPEG frames as the previous image, with texts that state the same facts, and
    the 16 checks passed there too.

At 44ba0b10561b032d5e076fad9475167a5d03e1b7 (main at 826c8c185 merged into 9f9d396df. The one
conflict, in the environment list page, keeps main's new vstar_spatiotemporal row before this PR's Video-MME v2,
Video-MME and LVBench rows. The sandbox image's files are unchanged):

  • ng_test +entrypoint=resources_servers/<server> +should_validate_data=true with FFmpeg 7.0.2 on PATH: video_mcqa
    420 passed, 122 subtests; videomme_v2 138; videomme_v1 1; lvbench 1; video_qa_rubric 89; each
    "successfully validated". tests/unit_tests/benchmarks/test_video_mcqa_task_data.py and
    test_videomme_agentic_prepare.py: 24 passed. scripts/ci/core_unit_tests.sh (unsharded, CI's flags):
    23,408 passed, 109 skipped, 341 subtests; 2 SIGINT subtests in test_super_vllm_launcher.py failed because the run
    was started in the background with SIGINT ignored, and that file passes when rerun normally (52 passed).
    pre-commit run --all-files: pass, no changes. scripts/component_locks.py: 327 projects, 0 failed. CI's
    secrets-detector command on the changed files: exit 0.
  • The image built from the Dockerfile passes the seed check at this head.

At 9f9d396df5ce3df3a7b589c612d8e4f8128d78a3 (two commits on 4f9985dcf. 70799e552 lets the video tools
read files under /tmp/opencode and makes drawtext, montage and convert -annotate work in the image (another
FFmpeg 7.0.2 build and the URW fonts); 9f9d396df turns webfetch off in the four agentic configs, with the server
README and a config test):

  • ng_test +entrypoint=resources_servers/<server> +should_validate_data=true with FFmpeg 7.0.2 on PATH: video_mcqa
    420 passed (two new tests of the scratch directories), 122 subtests; videomme_v2 138; videomme_v1 1; lvbench 1;
    video_qa_rubric 89; each "successfully validated". pre-commit run --all-files: pass, no changes.
    scripts/component_locks.py: 322 projects, 0 failed. CI's secrets-detector command on the changed files: exit 0.
  • The image built from the Dockerfile (docker build --platform linux/amd64) passes the seed check; the image of the
    previous Dockerfile fails it (its tool files differ). 50 watch_video requests on the test clips give the same
    replies and byte-identical JPEG frames (857) as that image. In a sandbox from it (Docker, no network): 16 of 16
    checks pass (view_image and watch_video on files the model made under /tmp/opencode, drawtext twice,
    montage twice, convert -annotate, view_image of a montage), where the previous image fails 8 (it refuses files
    under /tmp/opencode; drawtext fails with its FFmpeg build; montage and convert -annotate abort, since
    ImageMagick's default font Helvetica maps to URW Type 1 files that node:22 lacks); an ImageMagick stress run has no
    abort.
  • OpenCode 1.17.11 in the image with a scripted model server: the first request's messages equal those at 4f9985dcf
    byte for byte, and its tools are the previous ones without webfetch, the other 11 byte-identical and in the same
    order (bash's description: "Shell: sh").
  • Remote OpenSandbox provider: a sandbox from the image with the agentic configs' settings (4 CPU, 12 GiB, egress to
    the model's host only) was ready in 36 s and passed the seed check; 111 recorded watch_video calls gave the same
    replies and the same 3,885 JPEG frames as in the previous image, and the 16 checks above passed there too.

At 4f9985dcfe79d2390ffc1b0c14393339d9c52663 (one commit on 5b2c9c535 that sets doom_loop: ask in the
four agentic configs, with the server README and a config test):

  • ng_test +entrypoint=resources_servers/<server> +should_validate_data=true with FFmpeg 7.0.2 on PATH: video_mcqa
    418 passed, 122 subtests; videomme_v2 138; videomme_v1 1; lvbench 1; video_qa_rubric 89; each
    "successfully validated". pre-commit run --all-files: pass, no changes. scripts/component_locks.py: 322
    projects, 0 failed. CI's secrets-detector command on the six changed files: exit 0.
  • OpenCode 1.17.11 in the sandbox image (Docker, no network), launched with the configuration that opencode_agent
    builds from videomme_v2_agentic.yaml and from video_qa_rubric_agentic.yaml, against a scripted model server
    whose first response holds three identical bash calls: OpenCode asks for doom_loop, opencode run rejects it, and
    the run ends after that one model call (exit code 1; the assistant message's error "The user rejected permission to
    use this specific tool call."). opencode_agent's run classification makes it a failed run, answered with HTTP 502.
    The same run with the OpenCode configuration, environment and command line of the agent our training data was
    generated with ends the same way. At 5b2c9c535 (doom_loop: allow) the three calls run and the next response
    answers. Two identical calls in one response, or one call repeated in three consecutive responses, run to the
    answer with either setting.

At 5b2c9c535c4b964520579074c8268e466cafb2a9 (one commit on bb87905a4 that changes the OpenCode settings of the four
agentic configs, with the server README and a config test):

  • ng_test +entrypoint=resources_servers/<server> +should_validate_data=true with FFmpeg 7.0.2 on PATH: video_mcqa
    418 passed, 122 subtests; videomme_v2 138; videomme_v1 1; lvbench 1; video_qa_rubric 89 (its agentic
    config's agent and sandbox settings equal videomme_v2_agentic.yaml's); each "successfully validated".
    pre-commit run --all-files: pass, no changes. scripts/component_locks.py: 322 projects, 0 failed. CI's
    secrets-detector command on the six changed files: exit 0.
  • OpenCode 1.17.11 in the sandbox image (Docker, no network), launched with the configuration that opencode_agent
    builds from videomme_v2_agentic.yaml, the seed's tools.json and a scripted model server: the first request
    offers 12 tools whose names, descriptions and parameters equal the tool block of our agentic video training
    trajectories (bash's description: "Shell: sh"); a bash call runs in dash; a webfetch call is allowed and fails with
    a transport error. At bb87905a4, the same run offers 10 tools (no webfetch, no task) and runs bash ("Shell: bash").
    With OPENCODE_ENABLE_EXA=1, websearch is offered too.
  • With Docker as the sandbox provider, a sandbox lent by LentSandboxes from the config's sandbox_config gives the
    processes the harness starts SHELL=/bin/sh.

At bb87905a40866aee0fac1b1358b178894396f9bd (one commit on 0f71ba0ef that moves the sandbox image onto node:22; only
the Dockerfile and the server README change):

  • ng_test +entrypoint=resources_servers/video_mcqa +should_validate_data=true with FFmpeg 7.0.2 on PATH: 418 passed,
    122 subtests, "successfully validated". pre-commit run --all-files: pass, no changes. scripts/component_locks.py:
    322 projects, 0 failed. CI's secrets-detector command on the two changed files: exit 0.
  • The image built from the Dockerfile (docker build --platform linux/amd64, 2.29 GB) passes the seed check, and 50
    watch_video calls on nine test clips give the same replies and byte-identical JPEG frames (857) as the image of
    the previous Dockerfile. With Docker as the sandbox provider, a lent sandbox from it receives the video (the upload
    makes /testbed/videos), passes the seed check and returns the same frames for three calls.

At 0f71ba0ef5c5593671226d0692414a8c1357ded0 (#6314's head 8a2535889, this PR's two commits above, and #6238's head
1e1e48be3 with main eff187554 merged in):

  • ng_test +entrypoint=resources_servers/<server> +should_validate_data=true with FFmpeg 7.0.2 on PATH:
    video_mcqa 418 passed, 122 subtests; videomme_v2 138; videomme_v1 1; lvbench 1; video_qa_rubric 89 (the
    agentic rows, the config against the agentic Video-MME v2 config, and a lent sandbox on the local provider); each
    "successfully validated".
  • scripts/ci/core_unit_tests.sh (unsharded, CI's flags), at bcfecebb3 (the same changes on main 46683f974; the
    later merge of feat(video_mcqa): a shared video multiple-choice base: judge-read answers from each row's question, question sets, frame rows #6238's head and main changes none of this PR's files): 23,121 passed, 108 skipped, 341 subtests.
    Two subtests of tests/unit_tests/benchmarks/test_super_vllm_launcher.py (SIGINT shutdown, "Launcher did not
    terminate") failed while a second suite ran on the machine; the file alone passes (52 passed, 319 subtests), and
    nothing it covers is touched here. At the head: tests/unit_tests/benchmarks/test_video_mcqa_task_data.py,
    test_videomme_agentic_prepare.py and tests/unit_tests/data/test_task_data.py, 530 passed.
  • pre-commit run --all-files: pass, no changes. scripts/component_locks.py: 322 projects, 0 failed (the
    video_qa_rubric lock regenerated with the sandbox extra). CI's secrets-detector command on the 114 changed
    files: exit 0.
  • gym eval prepare --benchmark videomme_v2_agentic and --benchmark videomme_v1_agentic (local copies of the
    annotations, SHA-256 checked): 3,200 and 2,700 rows; each carries question and options (both appear in its
    prompt) and is otherwise identical to the rows before feat(video_mcqa): a shared video multiple-choice base: judge-read answers from each row's question, question sets, frame rows #6238's change, and both cohorts are byte-identical.
  • Live judge check (gpt-6.1-sol, reasoning effort max): 18 calls (a CPU job; scripted answers), all HTTP 200 on the
    first attempt, about $0.04 in all: 10 multiple-choice readings (three training-set rows with frames as images, two
    Video-MME v2 agentic rows) all as expected, with no frame label, file URL or sandbox path in any judge prompt;
    video_qa_rubric: two single-turn training rows (a reference answer 100 points, an unrelated answer 0) and two
    agentic example rows answered as the final message after a recorded OpenCode episode's watch_video calls (the
    right description 100, a wrong one 0).

At b1d18416aa62b97b9ee2d57b19a116ce19c43714 (before the video_qa_rubric merge and #6238's new head):

  • CI's sandbox job (pytest -m sandbox with its extras): 1,805 passed, 11 skipped.
  • Full official data. gym eval prepare --benchmark videomme_v2_agentic and --benchmark videomme_v1_agentic
    with the annotations downloaded at the pinned revisions and the videos' FILES.sha256: 3,200 rows over 800 videos
    and 2,700 rows over 900 videos, 7 s each. Every row passes its server's task-data validation. The videomme_v2
    server starts with the 3,200-question cohort (800 groups; 169 of them hold questions of different levels, 359
    questions in all), and verify() scores all 3,200 rows with a scripted judge, none refused; aggregate_metrics
    reports coverage 1.0 and 800/800 complete groups. The same for the videomme_v1 server: 2,700 scored, none refused.
    Against main's level check, the same cohort fails at startup ("Task and group levels disagree"), and without
    per-question levels 359 rows are refused.
  • Both benchmarks' run configs resolve (gym env resolve with the vLLM model config): judge server on 127.0.0.1,
    reasoning_effort: max, the 262,144-token OpenCode window.

Before the merges of main, #6290 and #6238, on the agentic configs alone:

  • ng_test +should_validate_data=true with FFmpeg 7.0.2 on PATH: video_mcqa 319 passed, 118 subtests;
    videomme_v2 136; videomme_v1 1; lvbench 1. The image built from sandbox_image (docker build --platform linux/amd64, 808 MB) passes the seed check (its video tools match the repository's).
  • Every pin of the image checks out. In the image, the tool runs on the committed clips, and its results match the
    reference implementation's (above).
  • Local end-to-end run of each agentic config with Docker as the sandbox provider and a scripted OpenAI-compatible
    stand-in for the model: Environment Server, lent sandbox from the built image, seed check, stock opencode_agent with
    OpenCode 1.17.11 loading the plugin, watch_video in the sandbox, verification. 5 of 5 rows per config; each tool
    call's four frames reached the model in the next user message; every sandbox stopped at close.

Rollouts

One rollout per agentic example row, committed as data/example_agentic_rollouts.jsonl in each server:
nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16 (revision e5e99324, BF16) on one GB200 GPU, served by vLLM
0.32.0rc1.dev190+g3f1bcfd82 with the model card's flags plus
--enable-auto-tool-choice --tool-call-parser qwen3_coder --limit-mm-per-prompt '{"image": 256, "video": 0}', a
131,072-token context, at most 16,384 output tokens per call and the model's default sampling; OpenSandbox sandboxes (4
CPU, 12 GiB, model-only egress) from the image built from this branch's Dockerfile before its move to node:22, before
70799e552 and before 0a563e6c7 (the frames are byte-identical in the current image; the watch_video results show
the earlier text, This is a video: and one Frame i sampled at t seconds: line per frame), and with the OpenCode
settings before 5b2c9c535 (webfetch, websearch and task off; commands in bash; doom_loop: allow, which none of these
episodes reached: no model response repeats a tool call). The shared README has the commands.

Config Correct Episodes with tool calls watch_video calls Frames returned Tokens per episode, input / output (mean) Episode time (mean)
videomme_v2_agentic 5/5 5/5 13 31 31,675 / 2,073 61 s
videomme_v1_agentic 2/5 3/5 4 21 14,566 / 812 47 s
lvbench_agentic 4/5 3/5 7 30 19,932 / 1,063 45 s

All 15 episodes completed on the first attempt and ended with a \boxed{} answer. In four of the ten VideoMME-v1 and
LVBench episodes the model answered without calling a tool (three of them wrong). No sandbox of the run was left
afterwards. (These rows gained question and options with #6238; nothing else in them changed.)

video_qa_rubric_agentic: not recorded yet. Its five agentic example rows get one rollout each from the same
model, serving and sandbox settings (the rubric judge: the same served model, as in video_qa_rubric's single-turn
examples) in a following commit.

The two benchmarks were not run with a model on this branch: they add data preparation and the judge configuration
to these configs, and their rows were checked on the full data as above.

Compatibility and benchmark impact

  • resources_servers.video_mcqa.scoring.EXECUTION_FAILURE_METADATA_KEY (and its videomme_v2 re-export) is removed;
    only the agent that feat(video): add single-turn Video-MME v2, Video-MME and LVBench environments #6071's review removed set it. video_qa_rubric (feat(video-qa-rubric): open-ended video QA graded against each question's rubric #6314) read it and now uses
    response_failure: an agentic failed or incomplete response that reaches verify() is an execution_failure
    scored 0. Before, a failed one was a masked infrastructure_failure, an incomplete one was graded, and only the key
    gave 0. Its single-turn outcomes are unchanged; its failure reasons now use video_mcqa's wording.
  • Agentic rows: a failed response that reaches verify() is now a scored 0 (execution_failure), not a masked
    infrastructure failure; prompts name an absolute sandbox path. No agentic config existed on main.
  • videomme_v2's single-turn failure reasons now use video_mcqa's wording; outcomes and rewards are unchanged.
  • The four video servers' and video_qa_rubric's environments gain Gym's sandbox extra (uv.lock updates), and
    video_mcqa's NumPy and Pillow for its tests.
  • video_qa_rubric: its server can lend sandboxes (only with sandbox_provider set) and its task data declares the
    optional video_binding; single-turn behavior is unchanged.
  • Sandbox images: the seed checks the image's tool files against the repository's, so an image built before
    0a563e6c7 is refused (422) with this head; rebuild it from the Dockerfile. Its frames are unchanged;
    watch_video's text is the one above.
  • New benchmarks only; no existing benchmark's data or scoring changes.

Checklist

  • I have read the contributing guidelines.
  • The change is focused; unrelated "drive-by" edits are tracked as separate issues/PRs.
  • Tests added or updated and pass locally.
  • Documentation added or 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 (git commit -s).

🤖 Generated with Claude Code

cg1177 and others added 22 commits November 16, 2026 18:33
The four video servers and their tests imported the pre-0.8 module paths
(nemo_gym.base_resources_server, config_types, global_config, openai_utils,
server_utils), which still import with a deprecation warning. They now import
each name from its package's public API, as scripts/migrate_imports.py writes
it; `migrate_imports.py --check` reports nothing for these folders.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Guo Chen <[email protected]>
… Video-MME and LVBench

Add answer_policy llm_extraction_v1 to the shared video MCQA scoring. A judge model
(any OpenAI-compatible chat model behind a Gym model server, called through call_judge on
/v1/chat/completions) reads which option a final answer gives; the verifier scores that
option against the gold label. The judge sees the prompt's text (no media) and the final
answer (no reasoning), never the gold label.

- A "none" reading is the new outcome no_choice (a measured zero); an empty final answer
  stays no_answer and is not sent.
- A failed judge call or a reply that names no option raises a judge failure: Gym's judge
  failsafe masks the row and keeps it with its answer in the failures file, so the frozen
  cohort counts the task as missing until it is judged again.
- The judged grading, verify response included, runs in observe_llm_judge_grading, so Gym
  binds the graded response and reward to the judge's reply.
- The cohort declares the policy; a server whose cohort uses it refuses to start without
  judge_model_server. The rule policies stay the default and never call a judge.
- prepare_single_turn and prepare.py take a prompt style: boxed (default) or the
  benchmark's bare-letter prompt (videomme_v2, videomme_v1, lvbench).
- New configs <benchmark>_single_turn_llm_extraction.yaml for the three benchmarks: the
  single-turn config plus an openai_model judge (judge_base_url, judge_api_key,
  judge_model_name).

Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Adds resources_servers/video_mcqa/sandbox_image: a Dockerfile and the video
tools it installs in /opt/video-mcqa.

- video_tools.mjs: an OpenCode 1.17.11 plugin with watch_video and view_image.
  It runs `python3 -I -m video_tools.cli` once per call and returns the
  images as tool attachments. It also caps the tool images that one episode
  sends (400 MiB of base64 by default): from the result that would pass the cap
  on, results show a notice in place of their images, the same in every
  request. The tools take plain JSON Schema arguments, so the plugin imports
  only Node's standard library.
- video_tools: watch_video samples the center of each of num_frames equal bins
  of [start, end), takes the latest source frame not after each sampling time,
  resizes by area to the requested long edge rounded down to the model's grid
  (patch_size / downsample_ratio, 28 px by default) and returns
  JPEG frames (quality 95, 4:4:4) with "This is a video:" and one
  "Frame i sampled at t seconds:" line per frame. Per-frame and per-call pixel
  caps refuse a request instead of shrinking it. view_image returns an image
  file unchanged.
- Dockerfile: OpenCode 1.17.11 and its plugin dependencies with the pins of
  visual_coding_opencode, the static FFmpeg 7.0.2 build pinned by SHA-256,
  Python 3.13 with NumPy 2.4.6, Pillow 12.3.0 and Pydantic 2.13.5.

Tests cover the sampling, rounding, limits and text, the decode (seek against
the sequential reference), the program's JSON replies, and the plugin under
Node with a stand-in program. video_mcqa's environment gains NumPy and
Pillow for these tests, and Gym's sandbox extra for the lending that follows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Guo Chen <[email protected]>
…ncode_agent

Adds an agentic config to each of the three benchmarks. The stock
opencode_agent runs each question through a single_agent_turn_legacy
Environment Server, in a sandbox that the benchmark's resources server lends the
episode, as visual_coding_opencode does. The sandbox image is
video_mcqa/sandbox_image, and OpenCode loads its video tools plugin from there.

video_mcqa/sandbox.py lends the sandbox for the video_mcqa and videomme_v2
servers (the videomme_v1 and lvbench servers inherit it). At each seed it:

- refuses (422) a row whose video_binding.source is not a regular file under
  the configured video_roots;
- starts the sandbox with the video tools' configuration (tools.json, from the
  server's video_tools settings) and two checksum lists;
- uploads the video with nemo_gym.sandbox.upload_path;
- runs one command in the sandbox: the image's video tools must have this
  repository's SHA-256 and the video the row's SHA-256 (422 otherwise), then
  the video becomes read-only and the tools check their configuration and
  FFmpeg.

A command result with an error_type or the -1 sentinel, and any other failure,
stops the sandbox and raises, so the Environment Server runs the episode again.
The episode's close stops the sandbox. Grading never reads the sandbox.

The verifiers read the stock agent's outcome: in the agentic setting a failed
or incomplete response that reaches verify is an execution_failure scored 0,
from the response's own status, so a replayed row scores the same. This
replaces the video_execution_failure metadata key, which only the removed
opencode_video_agent set. Single-turn scoring is unchanged.

prepare.py names the video at --sandbox-root/sandbox_path (default /testbed)
in agentic prompts. The three servers gain agentic example rows and cohorts,
and their environments Gym's sandbox extra. READMEs describe the image, the
tools, seeding, the single-upload size limit of the providers and the thinking
switch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Guo Chen <[email protected]>
One rollout per agentic example row of the VideoMME-v2, VideoMME-v1 and
LVBench servers, from nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16 on
one GPU (vLLM 0.32.0rc1.dev190) through the stock opencode_agent, with
OpenSandbox sandboxes from the video MCQA sandbox image. The shared README
gives the serving flags, the commands and the outcomes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Guo Chen <[email protected]>
The Video-MME-v2 annotation gives every question its own level; the first
three questions of a logic group can have a level other than the group's
last question. The official scorer counts per-level accuracy by each
question's own level and scores a group under the level of its last
question.

validate_metric_cohort no longer requires every task level to equal its
group's level. When a cohort lists task_levels, each group's level must be
the level of its last question, /L<n>/raw_acc counts questions by their
task level, /L<n>/nonlinear_score counts groups by the group level, and the
verifier checks a result's level against its task level, so rows that carry
their own question level are scored instead of refused. A cohort without
task_levels behaves as before: each question takes its group's level.

Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…awtext, ripgrep and ImageMagick in the image

- view_image and watch_video also read regular files under video_tools.scratch_roots,
  by default /tmp/opencode: OpenCode's bash tool keeps temporary files there, such
  as frames or contact sheets the model made, and the tools refused them. A
  relative path still starts at the workspace, a symlink that leads out of these
  directories is refused, and the text names such a file by its absolute path.
  The tool descriptions are unchanged.
- The image's FFmpeg 7.0.2 is now the static build of mwader/static-ffmpeg, pinned
  by image digest and by the binaries' SHA-256. watch_video gets the same frames as
  with the previous 7.0.2 build (identical JPEG bytes on 50 requests over 7
  videos); the new build also has libharfbuzz and fontconfig, so the model's
  drawtext works, with fontconfig and DejaVu for its default font.
- ImageMagick for the model's montage and convert, with the URW fonts its labels
  default to, one thread (MAGICK_THREAD_LIMIT=1).
- ripgrep stays (OpenCode's grep and glob run it offline). The build checks
  drawtext, ripgrep and montage.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Guo Chen <[email protected]>
…ile change

This reverts commit cc13a8f: view_image and
watch_video read files under the workspace only, not OpenCode's /tmp/opencode;
the image's FFmpeg 7.0.2 is the johnvansickle.com static build again, without
drawtext; and the image has no ImageMagick. The tree is again the one of
2f336e9.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Guo Chen <[email protected]>
…'s rubric

A resources server for open-ended questions about a video, for RL training. The policy sees the video and the
question; a judge model grades the final answer against the question's weighted-points rubric (criteria worth
weight_points that add up to 100, and contradictions with a penalty and a score cap). The judge gets the question,
the rubric and the final answer (no video, reasoning or reference answer) and returns a strict-JSON judgment; the
server accepts it only when its points, applied contradictions and total add up, and the reward is the score / 100.

The judge is any OpenAI-compatible chat model with JSON-schema structured output behind a judge ModelServerRef
(judge_base_url, judge_api_key, judge_model_name), called through call_judge. A rejected judgment, a timeout and a
408/429/5xx reply are tried again up to judge_max_attempts; when every attempt fails, Gym's judge failsafe masks the
row and keeps the answer for judge-only recovery. A failed model call is a masked infrastructure failure; a
single-turn tool call or a failed agent run is an execution failure worth 0. empty_answer_reward (training only)
sets the reward of an attempt that produced output but no final answer; an empty response stays 0, as Gym's agents
require for execution_failure_reward_zero.

Single-turn config (simple_agent, single_agent_turn_legacy) with five invented example rows on video_mcqa's
synthetic clips, task_data schema, prepare_single_turn, README with the RL setup, tests with a scripted judge, and
the component lock. video_mcqa's final_answer_text (the answer after any reasoning block) is now public so this
server shares it.

Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…eo-frames

Brings in NVIDIA-NeMo#6290: the questions of one Video-MME v2 group keep their own levels, which the
cohort of the agentic Video-MME v2 benchmark lists.

Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ames

Brings in NVIDIA-NeMo#6238: a judge model can read the chosen option (llm_extraction_v1),
which the agentic benchmarks use with the benchmarks' own letter prompts.

Conflicts in resources_servers/video_mcqa/app.py and videomme_v2/app.py:
verify keeps this branch's response_failure (an agentic outcome read from the
response's own status) and the lent-sandbox server and config bases, and takes
NVIDIA-NeMo#6238's AnswerJudgeConfig and grade_final_answer.

Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
<benchmark>_agentic_llm_extraction.yaml, listed after <benchmark>_agentic.yaml,
gives the agentic resources server the judge model of llm_extraction_v1. The
judge server listens on 127.0.0.1: the lent sandbox may reach every port of the
policy model server's host and must not reach a judge.

Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
prepare_agentic and prepare.py --prompt now write an agentic row in a
benchmark's own letter wording: a first line that names the video in the
sandbox (Video: /testbed/videos/<file>), then the single-turn letter prompt.
Read its answers with llm_extraction_v1. The boxed prompt stays the default.

Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
One rollout per example row from nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16 on one GPU (vLLM
0.32.0rc1.dev190+g3f1bcfd82, the model card's video settings, default sampling), the same served model also judging
for this example only. Three answers earn full points, one earns 60 of 100 (the direction but not the square), and on
the counter the model runs out of output tokens (empty_answer, 0); the bar's first judgment was rejected by the
arithmetic check and the second accepted. example_metrics.json from gym dataset collate (example_validation). The
README records the commands. A failed judge attempt is now logged with its reason, never the answer.

Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…uthors' annotations

benchmarks/videomme_v2_agentic and benchmarks/videomme_v1_agentic run the
agentic configs of the videomme_v2 and videomme_v1 resources servers with
judge-read answers. prepare.py downloads the authors' annotation at a pinned
revision and checks its SHA-256 (VIDEOMME_V2_PARQUET / VIDEOMME_V1_PARQUET name
a local copy), then binds each question to its video by the SHA-256 that the
source directory's FILES.sha256 lists, reading no video; the resources server
checks that hash in the sandbox. Rows ask in the benchmark's letter wording
after a line that names the video in the sandbox, and a judge model
(gpt-6.1-sol at max reasoning effort by default) reads the chosen option.

Video-MME v2 rows keep each question's own level and the cohort groups the four
questions of each video under the level of the fourth, which the videomme_v2
server accepts with the per-question levels merged from NVIDIA-NeMo#6290.

Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The policy's model server reads the video URL: http(s) and data URLs, or a file:// URL the server may read (vLLM's
--allowed-local-media-path). A vLLM-served judge works through the config's openai_model server, as in the example
rollouts.

Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The server grades open-ended questions about a video and builds on
video_mcqa (its row types, final-answer reading and example clips), so
its name now says so. Renamed: the folder resources_servers/
video_qa_rubric and configs/video_qa_rubric.yaml with the keys
video_qa_rubric, video_qa_rubric_judge, video_qa_rubric_single_turn and
video_qa_rubric_single_turn_environment; the VideoQARubric* classes;
the project gym-resources-servers-video-qa-rubric (uv.lock differs only
in that name); the failure kinds video_qa_rubric:*; the example task
IDs video_qa_rubric:example-N; the rows in README.md and the
environment list.

The example rollouts carry the renamed task IDs, agent and environment
names; the model's input and output, the judgments and the rewards are
unchanged. What the judge receives is unchanged too: the system and
user messages and the structured output's schema and its name.

Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
nemo_gym.config_types is the path from before 0.8.0; it still imports,
with a deprecation warning, until 0.10.0. Server tests import public
names from the package's public API, as scripts/migrate_imports.py
writes them (its --check is now clean for this server).

Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in the video_qa_rubric resources server (open-ended video
questions graded against each question's rubric), whose PR comes before
this one. Its failure check still reads the metadata key that this
branch removed from video_mcqa; the next commit reads failed runs from
the response's own status instead, as video_mcqa does.

Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…, as video_mcqa does

video_qa_rubric decided an agent run had failed from the
video_execution_failure response metadata key, which only the removed
opencode_video_agent set; this branch removed the key from video_mcqa,
so video_qa_rubric could not even be imported here. It now uses
video_mcqa's response_failure, like the Video-MME v2 server: in the
agentic setting a failed or incomplete response that reaches verify is
an execution_failure scored 0, read from the response's own status, so
a replayed row scores the same. In the single-turn setting a failed
model call stays a masked infrastructure_failure and a tool call an
execution_failure; only the failure reasons now use video_mcqa's
wording.

The failed-run test covers failed and incomplete runs, and a new test
checks that a failed model call is masked only in the single-turn
setting. The README's outcome table says the same.

Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@copy-pr-bot

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

@cg1177

cg1177 commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

@yfw @yaoyu-33 could you take a look at these video env PRs when you get a chance? #6314 adds the open-ended video QA grader (video_qa_rubric) for our video RL data, and #6315 adds the agentic version of the video benchmarks from #6071 (stock opencode_agent with video tools in a sandbox). They sit on top of #6290 and #6238, which also still need an /ok to test to start CI. Thanks!

cg1177 and others added 6 commits November 18, 2026 02:31
Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… frame rows, empty-answer reward

Make video_mcqa the shared base that the video multiple-choice benchmarks and
other question sets fill with data and configuration.

- Each row's verifier_metadata keeps the question as asked: question (its
  text) and options (the option texts in label order). VerifierMetadata and
  the task-data schemas require both, and prepare_single_turn, prepare_agentic
  and prepare.py write them. A row without them is refused: rows prepared
  before this change are prepared again, and nothing falls back to the
  request.
- The llm_extraction_v1 judge builds its prompt from those two fields and the
  final answer only. It no longer reads the text of the model's request
  (scoring.prompt_text is gone), so the video, its frames and anything else in
  the prompt never reach it. videomme_v2 uses the same judge path.
- A cohort may be a question set instead of a benchmark (question_set.py,
  QuestionSetCohort): two to 26 options, task IDs outside the benchmarks'
  scopes, no level or group, accuracy under the set's name. A training set
  runs on the shared verifier this way. The VideoMME-v1 and LVBench servers
  refuse such a cohort.
- prepare_single_turn(..., frames=[(label, image_url), ...]) and
  task.video_parts send a video as labelled frames (input_image parts) instead
  of one input_video part.
- empty_answer_reward (unset by default, which scores 0): the reward of an
  attempt that produced output but no final answer, for example a training
  penalty. Accuracy still counts the attempt as no_answer.
- The shared rows take any number of options; VideoMME-v1 and LVBench check
  their four choices in their own task_data.py.
- configs/video_mcqa_single_turn_llm_extraction.yaml: the shared verifier with
  the answer judge. The committed example rows and rollouts gain the two
  fields; nothing else in them changes.

Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in NVIDIA-NeMo#6314's head, which only merged main into it.

Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ames

Brings in NVIDIA-NeMo#6238's new head: video_mcqa as the shared base. Each row keeps its
question and options for the answer judge, a cohort may be a question set, a
video may come as labelled frames, and empty_answer_reward is optional.

Conflicts: the video_mcqa/app.py docstring and imports (both sides kept: the
question-set cohort and this branch's lent sandbox); prepare_agentic keeps this
branch's letter prompts and writes the row's metadata the shared way; the
task_data.py docstring; the root README rows (both sides' rows).

Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ptions

NVIDIA-NeMo#6238 makes every video_mcqa row keep the question as asked (question, and
options in label order) in verifier_metadata. The agentic Video-MME v2,
Video-MME and LVBench examples gain the two fields, rebuilt with
prepare_agentic from the same questions; nothing else in the rows or in the
recorded rollouts changes. The benchmark wrappers write them through
prepare_agentic.

Signed-off-by: Guo Chen <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every request sends the episode's earlier tool images again. The plugin
capped them by max_tool_media_bytes (400 MiB of base64) only, so small
frames could pass that and still exceed the model server's image limit
per request: two watch_video results of 150 small frames make a request
with 300 images, over the 256 that the README's vLLM example allowed.

max_tool_media_images (ToolSettings, default 8192) caps their number the
same way: from the tool result whose images would pass either limit on,
each result shows the notice in place of its images, the same in every
request, and earlier results keep theirs. The README's vLLM example now
takes 8192 images per request, and the README says to change the two
together.

The plugin and video_tools/contract.py are files of the sandbox image, so
the image needs a rebuild: the seed check refuses an image whose tools
differ.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Guo Chen <[email protected]>
@cg1177

cg1177 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, fixed in da4528a. The history filter now also caps the image count (max_tool_media_images, default 8192) the same way as the byte cap: from the result that would go over, it sends the notice instead of the images and leaves earlier ones alone, so your 2x150 case sends 150 images under a 256 limit. The vLLM example in the README now uses image 8192 and says to change the two together. Could you /ok to test da4528a?

The agentic Video-MME benchmarks (benchmarks/videomme_v1_agentic,
benchmarks/videomme_v2_agentic) default the cohort manifest to their
prepared file, benchmarks/<name>/data/<name>_cohort.json, a path from the
Gym root. Gym starts each resources server in its own directory, and the
servers read the path as given, so a run with the benchmarks' default
stopped at server start with FileNotFoundError. Runs that passed an
absolute path were not affected.

The video_mcqa server (videomme_v1, lvbench, question sets) and the
videomme_v2 server now resolve the path with _resolve_under_cwd_or_install,
as tavily_search and hle_web_tools resolve their files: an absolute path is
used as given, and a relative one is looked up under NEMO_GYM_EXTRA_ROOTS,
the working directory, then the Gym root. The sandbox image's files do
not change, so an image built from the previous commit still passes the
seed check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Guo Chen <[email protected]>
@yaoyu-33

Copy link
Copy Markdown
Contributor

/ok to test 93a9be3

@nemo-automation-bot
nemo-automation-bot Bot requested review from a team November 20, 2026 16:52
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

yaoyu-33 and others added 6 commits November 20, 2026 11:01
main's NVIDIA-NeMo#6528 upgraded every managed dependency lock. The four uv.lock
files this branch also changed (lvbench, video_mcqa, videomme_v1,
videomme_v2) take main's version here; a later commit relocks them for
this branch's dependencies.

Signed-off-by: Guo Chen <[email protected]>
Takes NVIDIA-NeMo#6314's current head (its main merge and component lock refresh).
video_qa_rubric/uv.lock takes NVIDIA-NeMo#6314's refreshed lock here; this branch
adds the sandbox extra to that server, so a later commit relocks it.

Signed-off-by: Guo Chen <[email protected]>
… main

Relocked with uv 0.13.4 on top of main's upgraded locks (NVIDIA-NeMo#6528):
lvbench, video_mcqa, videomme_v1, videomme_v2 and video_qa_rubric. Each
lock only gains the packages of this branch's dependencies (nemo-gym's
sandbox extra, and pillow 12.3.0 in video_mcqa); python-dateutil is
2.9.0.post0 again, as in main's other locks with the sandbox extra.

Signed-off-by: Guo Chen <[email protected]>
… stops

main's NVIDIA-NeMo#6410 gives AsyncSandbox.stop a timeout_s keyword, and lending now
passes it. The `stopped` fixture (also used by video_qa_rubric's agentic
tests) wraps the real stop, so it takes and forwards the keyword, as
main's other session tests do since NVIDIA-NeMo#6410.

Signed-off-by: Guo Chen <[email protected]>
@cg1177

cg1177 commented Nov 21, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 15c6c7b

…deo_mcqa server tests

The tests import both benchmarks' prepare.py and, through them, the
video_mcqa and videomme_v2 server modules, so in the core suite they
added those modules to the core coverage measurement. The video_mcqa
server tests, which cover those modules, now run them. The tests are
unchanged.

Signed-off-by: Guo Chen <[email protected]>
@cg1177

cg1177 commented Nov 21, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 32dcb48

@yaoyu-33 yaoyu-33 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.

Reviewed the included video preparation and grading changes, sandbox seeding and cleanup, and the OpenCode tool-result budgets. The prior image-count finding is fixed. With two 150-frame results and a 256-image limit, the plugin keeps the first result and suppresses the second. The image-count and byte limits both apply.

On this revision, all 64 focused workstation tests passed with Node and the sandbox image's checksum-verified FFmpeg 7.0.2 binaries. These covered actual frame decoding, the plugin regression, sandbox seeding and agentic grading. Required source CI passed. The author recorded 15 real-model MCQA example rollouts on an earlier revision. The standalone weighted-rubric agentic preset and full benchmark configurations have no recorded real-model baseline.

@yaoyu-33 yaoyu-33 added ready-to-merge PR is approved, current, and waiting for final CI or merge and removed needs-review PR is ready for code review and waiting on a reviewer labels Nov 21, 2026
@yaoyu-33
yaoyu-33 enabled auto-merge November 21, 2026 16:33
@yaoyu-33
yaoyu-33 added this pull request to the merge queue Nov 21, 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/44925313769

Merged via the queue into NVIDIA-NeMo:main with commit 1ee1203 Nov 21, 2026
72 checks passed
yaoyu-33 added a commit to cg1177/Gym that referenced this pull request Nov 21, 2026
Apply the reviewed MM-Lifelong changes on top of the squash merge of NVIDIA-NeMo#6315.

Signed-off-by: yaoyu-33 <[email protected]>
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 benchmark-onboarding Self-contained benchmark onboarding feature New capabilities, enhancements, or enablement work ready-to-merge PR is approved, current, and waiting for final CI or merge risk:high Autobot PR risk: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants