feat(profiling): add pluggable policy and vLLM rollout hooks - #3573
Draft
minitu wants to merge 4 commits into
Draft
feat(profiling): add pluggable policy and vLLM rollout hooks#3573minitu wants to merge 4 commits into
minitu wants to merge 4 commits into
Conversation
Author
|
/ok to test bdbbb19 |
Author
|
/ok to test 1e9ef4b |
minitu
force-pushed
the
codex/policy-rollout-profiler-hooks
branch
from
August 11, 2026 21:52
1e9ef4b to
dbead9f
Compare
Author
|
/ok to test dbead9f |
minitu
force-pushed
the
codex/policy-rollout-profiler-hooks
branch
from
August 11, 2026 21:59
dbead9f to
e24c31f
Compare
Author
|
/ok to test e24c31f |
minitu
force-pushed
the
codex/policy-rollout-profiler-hooks
branch
from
August 11, 2026 22:17
e24c31f to
cd2b0a4
Compare
Author
|
/ok to test cd2b0a4 |
Signed-off-by: Jaemin Choi <jaeminc@nvidia.com>
Signed-off-by: Jaemin Choi <jaeminc@nvidia.com>
Signed-off-by: Jaemin Choi <jaeminc@nvidia.com>
Signed-off-by: Jaemin Choi <jaeminc@nvidia.com>
minitu
force-pushed
the
codex/policy-rollout-profiler-hooks
branch
from
September 2, 2026 23:07
cd2b0a4 to
26c84f9
Compare
Author
|
/ok to test 26c84f9 |
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.
Summary
Motivation
Policy training and rollout generation execute in isolated Ray worker environments, so external profiling tools need stable worker-local lifecycle hooks. These interfaces allow profiler packages to integrate without patching NeMo RL or introducing a hard dependency on a specific profiler.
For TP>1 and asynchronous vLLM engines, the outer NeMo RL actor coordinates generation but does not launch the GPU kernels. The profiler therefore has to be constructed in every internal vLLM GPU worker rather than only in the outer actor.
User impact
Profiling remains disabled by default. When the selector environment variables are unset, NeMo RL does not import a profiler package and existing training and generation behavior is unchanged.
NRL_POLICY_PROFILER_CLASSselects a policy-training plugin.NRL_ROLLOUT_PROFILER_CLASSselects a rollout plugin.tensor_parallel_size>=1,pipeline_parallel_size=1, andexpert_parallel_size=1with either synchronous or asynchronous vLLM engines.vllm_kwargs.worker_clsvalues are rejected before engine creation.The selected package must be installed in the corresponding Megatron policy-worker or vLLM generation-worker environment. For TP>1 and asynchronous engines, it must also be importable in vLLM's internal GPU-worker processes.
Validation
Qwen3-235B end-to-end golden workload
The ntrace
nemo_rl_qwen3_235bgolden was captured successfully on Lyris as job2821136using this PR's pre-rebase feature head,cd2b0a4a7abf9b8c4cc242f79cf34a7a09ba214e:That exact feature commit was subsequently rebased onto current
main; the post-rebase checks below validate the conflict resolutions. A fresh GPU run of the rebased SHA is not claimed here.Post-rebase checks
mainat13a10647ebbf0f940d2b06ea41800b3f2fb46099on 2026-09-02.checkandformat --checkpassed for all 15 changed Python files.git diff --checkpassed.megatron.bridge.Earlier Lyris worker-environment checks
megatron.bridgefrom current main.Fresh CI on the rebased SHA is the remaining qualification gate.