Skip to content

feat(nemo-gym): support async SpatialClaw GRPO - #4235

Draft
ehosseiniasl wants to merge 6 commits into
mainfrom
ehsan/spatialclaw-async-grpo
Draft

ehosseiniasl wants to merge 6 commits into
mainfrom
ehsan/spatialclaw-async-grpo

Conversation

@ehosseiniasl

@ehosseiniasl ehosseiniasl commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor
  • I, the PR author, have personally reviewed every line of this PR.

What and why

SpatialClaw can introduce images between policy calls. A final response history can lose the media grouping the generation backend used on each call. This PR packs request-prefix token IDs without concatenating media tensors and adds a replay path that restores the processor inputs for each policy call. Replay preserves generation-authored token IDs and keeps video frames grouped separately from independent tool images. Gym agents that omit the new fields keep the existing history-based path.

flowchart LR
    A[Gym policy call] --> B[Token IDs and per-call media]
    B --> C[NeMo RL processor replay]
    C --> D[Async GRPO policy update]
Loading

The PR also adds a 16-node async SpatialClaw GRPO recipe and documents the replay contract. Training guide

Issues

None.

Convergence / perf / functionality proof

The rebased head passed 71 CPU tests covering the SpatialClaw recipe, the Gym environment and multimodal replay, and request-prefix token IDs. Ruff lint and formatting checks passed on all seven changed Python files.

The OpenCode-to-learner run and convergence measurements remain pending.

Needs upstream changes

The Gym SpatialClaw port uses typed tasksets. This PR's recipe still uses the legacy Resources configuration. The recipe needs the typed OpenCode preset, and Gym needs to supply prompt_multimodal_content and prompt_mm_processor_kwargs for each trainable policy call. Training also needs isolated execution for model-written Python. Gym #5894

PR commands and CI
  • CI label, exactly one:
    • CI:Lfast: the default for most PRs. Runs a fast test subset.
    • CI:L1: dependency or container changes (pyproject.toml, uv.lock, Dockerfile) or broad core changes. Builds a new image and runs unit and functional tests.
    • CI:docs: docs-only changes. Runs doc tests only.
  • /ok to test <full-commit-sha>: start CI for that commit. Post again after each push.
  • /internal-ci test-case=<job>: run NVIDIA's internal nemo-ci pipeline for the PR head; eligible teams only.
  • /review: automated review comments. Add mode=strict for a stricter review, reset=true for a fresh full review.
  • /resolve-conflict: Autobot merges main into this PR and resolves the conflicts. PRs from forks must allow edits by maintainers.
  • Locally: /review-pr-team <pr-number> for a team review before you ask for human review.
  • Contributor guidelines

@copy-pr-bot

copy-pr-bot Bot commented Sep 21, 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.

@github-actions github-actions Bot added the Documentation Improvements or additions to documentation label Sep 21, 2026
@ehosseiniasl ehosseiniasl added the CI:L1 Run doctests, unit tests, and functional tests label Sep 21, 2026
@ehosseiniasl

Copy link
Copy Markdown
Contributor Author

/ok to test 1438475

@ehosseiniasl ehosseiniasl changed the title feat(nemo-gym): support dynamic multimodal async GRPO feat(nemo-gym): support async SpatialClaw GRPO Sep 21, 2026
@ehosseiniasl

Copy link
Copy Markdown
Contributor Author

/ok to test b058c94

@terrykong terrykong added CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) and removed CI:L1 Run doctests, unit tests, and functional tests labels Nov 5, 2026
@ehosseiniasl
ehosseiniasl force-pushed the ehsan/spatialclaw-async-grpo branch 2 times, most recently from 9d80293 to b2ea09e Compare November 24, 2026 20:10
@ehosseiniasl
ehosseiniasl force-pushed the ehsan/spatialclaw-async-grpo branch from b2ea09e to 6e22cd0 Compare November 25, 2026 05:09
@terrykong terrykong removed the Documentation Improvements or additions to documentation label Nov 28, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants