feat(eval): support NeMo-Gym multi-turn rollouts#2453
Open
taivu1998 wants to merge 1 commit into
Open
Conversation
Signed-off-by: taivu1998 <46636857+taivu1998@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Standalone eval currently supports only the single-turn environment step path. NeMo-Gym already owns the multi-turn rollout loop used by training, but
examples/run_eval.pycannot route eval datasets through that Gym-backed rollout path.Closes #1089.
Root Cause
The eval driver always loads eval datasets, creates a single scoring environment, generates one assistant response, and calls
env.step(...). NeMo-Gym data and environments require a different path:NemoGymDatasetandnemo_gym_data_processorpreserve Gym row metadata inextra_env_inforl_collate_fnpreserves the metadata and training-style fields expected by the Gym rollout helperrun_async_nemo_gym_rolloutowns the multi-turn rollout, reward extraction, and result postprocessingChanges
eval.rollout_modewithsingle_turnandnemo_gymmodes.max_rollout_turns: nullnum_tests_per_prompt: 1top_k: nullrollout_mode=nemo_gymthroughNemoGymDataset,rl_collate_fn,NemoGym, andrun_async_nemo_gym_rollout.mean_rewardscoring for Gym eval while keepingpass@kavailable when Gym rewards are binary.examples/configs/evals/nemo_gym_eval.yamland update existing eval exemplars with the new required config keys.Validation
tests/unit/evals/test_eval.py: 16 passedexamples/configs/evals/*.yaml: passeduvx ruff check examples/run_eval.py nemo_rl/evals/eval.py nemo_rl/environments/nemo_gym.py nemo_rl/experience/rollouts.py nemo_rl/data/__init__.py tests/unit/evals/test_eval.py: passeduvx ruff format --check examples/run_eval.py nemo_rl/evals/eval.py nemo_rl/environments/nemo_gym.py nemo_rl/experience/rollouts.py nemo_rl/data/__init__.py tests/unit/evals/test_eval.py: passedpython -m py_compileon changed Python files: passedgit diff --check: passedNote: the local repo-native
uv runpath is blocked on this macOS host because/usr/local/bin/python3.13reports an emptyplatform.mac_ver()touv. The focused pytest run was executed in a temporary Python 3.13 uv environment with the repo import dependencies and a temporarydecordimport stub outside the repository, becausedecordhas no usable macOS arm64 CPython 3.13 wheel here and this test file does not exercise video decoding.