feat: add AsyncNemoGymRolloutManager for gym per-prompt rollouts#2528
Open
yuki-97 wants to merge 7 commits into
Open
feat: add AsyncNemoGymRolloutManager for gym per-prompt rollouts#2528yuki-97 wants to merge 7 commits into
yuki-97 wants to merge 7 commits into
Conversation
Contributor
Author
|
/ok to test f53d93f |
16b889f to
9b6b705
Compare
Contributor
Author
|
/ok to test 9b6b705 |
82edf37 to
a6c14b6
Compare
Introduce `nemo_rl/experience/interfaces.py` with `Completion` and `PromptGroupRecord` dataclasses to represent per-prompt rollout results. Add `run_async_nemo_gym_rollout_by_prompt` to `rollouts.py`, which runs N generations for a single prompt via a single batched NeMo-Gym `run_rollouts` call and returns a `PromptGroupRecord`. Add unit tests verifying standalone correctness and output equivalence against the existing `run_async_nemo_gym_rollout`. Signed-off-by: Yuki Huang <yukih@nvidia.com>
…GymRolloutManager Signed-off-by: Yuki Huang <yukih@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com>
a6c14b6 to
45b4e5b
Compare
Contributor
Author
|
/ok to test 45b4e5b |
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.
Issue
Part of RL-729.
Summary
Introduces a per-prompt rollout abstraction for the NeMo-Gym path.
nemo_rl/experience/interfaces.pywithCompletionandPromptGroupRecorddataclassesAsyncNemoGymRolloutManagerinnemo_rl/experience/rollout_manager.py— takes oneDatumSpec, runsnum_generations_per_promptrollouts via a singlerun_rolloutscall, and returns aPromptGroupRecordAsyncNemoGymRolloutManagerstandalone behavior, and parity tests against the originalrun_async_nemo_gym_rolloutTest plan
pytest tests/unit/experience/test_rollouts.py