Repository navigation
refactor(grpo): remove grpo_sync and the non-SC data plane path - #5433
Conversation
|
/ok to test 0e147b4 |
0e147b4 to
6543486
Compare
yuki-97
left a comment
There was a problem hiding this comment.
Self-review via /review-pr-team: 6 agents (rl-expert, test-agent, bug-finder, design-reviewer, comment-reviewer, comment-editor) + devil's-advocate pass.
Verdict — 9 inline comments: code only the deleted trainer used that is still in TQPolicy / TQDriverMixin (C1, C2, C3), the unbumped review-skill REVISION (C4), docs and comments that still describe the deleted trainer (C5, C6), no nightly left for the nixl backend (C7), and nits on the new guard message and the test README counts (C8, C9; C3 is a nit too); none is a correctness bug in the surviving training paths.
Verified clean
- All four legacy GRPO launchers (
run_grpo.py,run_vlm_grpo.py,run_grpo_sliding_puzzle.py,nemo_gym/run_grpo_nemo_gym.py) reach the newgrpo.setup()rejection before any policy or generation worker is built. Every shipped config, driver and functional script that setsdata_plane.enabled=truerunsexamples/run_grpo_single_controller.py. - No removed non-test name has an import, attribute, string or patch-target reference left: the
grpo_syncmodule and its functions,SyncRolloutActor,select_sync_trainer,make_policy_factory, the removedTQPolicy/TQDriverMixinmethods, and theACTOR_ENVIRONMENTSentry.nemo_rl.data_plane.factoryno longer importsgrpo, so the new import ingrpo.pyadds no cycle. - The nightly budget matches the suite: the total computed with
tools/launch's formula is 5194 GPU-hours at head and 5752 at base. No suite list,--deselectentry or lane script names a deleted driver, recipe or test.pyrefly-baseline.jsonloses exactly the 36 entries of the two deleted files. - Every deleted or narrowed unit test covered only deleted code, apart from the two tests in the notes below. SimpleStorage SSD offload and router replay over the data plane keep SingleController coverage.
outdated_config_checks.pyis rightly not used:data_plane.enabledis still accepted, and SingleController requires it.
Lower-priority notes that are not inline
- No test lane has run on this head. The unit, lint and functional lanes last ran green on the pre-rebase commit, and pyrefly was not run locally. The launchers now call the typed
grpo_traindirectly, so the Lint job is worth a look once CI runs. - Two small tests of surviving code went away with the trainer's tests: the empty-input case of
group_index_columnand the cluster-scope branch ofTQPolicy.get_data_plane_step_metrics. tests/test_suites/llm/common-tq.envstill limits TQ wrappers togrpo-/dapo-/prorlv2-recipes, a limit that came from the deleted trainer.
nemo-rl-review: kind=self harness=claude-code/2.1.333 model=claude-fable-5-2 effort=medium review-pr-team=v3 reviewed=27191c0
|
/ok to test e2aa55e |
terrykong
left a comment
There was a problem hiding this comment.
Clean, well-scoped deletion. Putting the one data_plane.enabled check in grpo.setup() is the right spot: all four legacy launchers go through it and SingleController never does. A MasterConfig validator would also reject SingleController, since it reuses that class. Replacing the two narrower checks, which could no longer be reached, with this one is a good cleanup.
The self-review fixes for C2, C3 and C5–C9 hold at e2aa55e. Moving the streaming2 nightly to nixl (C7) covers that backend with no extra GPU hours. A repo-wide grep finds no reference left to any removed symbol, recipe or script, and every nightly and L1 entry resolves.
Seven items, all for this PR:
- (C10) Add a unit test for the new
data_plane.enabledguard ingrpo.setup(); it is now the only thing keeping legacy launchers off the data plane. - (C11) Drop "synchronous data-plane training" from the
seq_logprob_error_in_lossparagraph indocs/guides/grpo.md. - (C12) Delete the message-log decompose helpers, their three calls (which now always return early), and what their deletion leaves unused.
- (C13) Delete the
policy_factoryparameter ofgrpo.setup(). - (C14) Delete
KVBatchMeta.stamp_tags. - (C15) Delete
TQPolicy.train_from_metaand the unusedtimerparameters, plus what their deletion leaves unused (reply on the C1 thread). - (C16) Drop the unused
pad_value_dictparameter ofread_columns(the next layer down from the C3 fix).
C12–C15 come from the description's "Dead code left for a follow-up decision" list, and C16 is one more case of the same kind. Per dead-code.md, a test-only caller does not count as a consumer, so please delete all five here rather than in a follow-up.
nemo-rl-review: kind=expert harness=claude-code/2.1.333 model=claude-opus-5-5 effort=medium review-pr-team=v3 reviewed=e2aa55e
Signed-off-by: Yuki Huang <[email protected]>
…lectors Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
e2aa55e to
5040d83
Compare
|
/ok to test 5040d83 |
Resolve the nightly GPU-hour cap conflict: main's #5433 lowered it to 5226, and this branch's SC fused-linear-logprobs nightly adds 18, so the cap is 5244. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Anish Mahishi <[email protected]>
What and why
Removes
grpo_sync.pyand the non-SingleController TransferQueue path it served. Breaking:data_plane.enabled=trueis now rejected by the legacy launchers; the SingleController path is unchanged.1. Delete the trainer and the code only it used.
SyncRolloutActor,select_sync_trainer,make_policy_factory, and theTQPolicystep-lifecycle methods (prepare_step,prepare_val_partition,discard_samples,finish_step,tq_partition_id) plusTQDriverMixin.write_to_dataplane. SingleController registers its partitions insingle_controller_utils/setup.pyand never called these. Also removed, since only the trainer used or fed them:TQPolicy.train_from_meta, thepolicy_factoryparameter ofgrpo.setup(),KVBatchMeta.stamp_tags, and the message-log decompose helpers (decompose_message_log,reconstruct_message_log,attach_message_log_view), whose only producer wasSyncRolloutActor.2. Reject
data_plane.enabled=trueingrpo.setup(). One check covers every legacy launcher.run_grpo_sliding_puzzle.pyandrun_grpo_nemo_gym.pyused to ignore the key and rungrpo_train, and the async branch ofrun_grpo.pybuilt aTQPolicyforasync_grpo_train; all now raise and point to the SingleController path. The two narrowerdata_plane.enabledchecks ingrpo.py(multimodal dedup with NeMo-Gym, async router replay) became unreachable and are removed.3. Delete the 23 non-SC
-tq_{simple,nixl,mooncake}recipes and their nightly drivers. The nightly GPU-hour cap drops from 5784 to 5226, both measured withDRYRUN=1 ./tools/launch.tests/test_suites/vlm/common-tq.envno longer has a user and is kept on purpose for future VLM SingleController drivers.4. Docs.
nemo_rl/data_plane/README.mdloses the three sections that walked throughgrpo_train_sync, anddata-plane-async-proposal.mdis deleted because SingleController is the implemented async path.Issues
None
Convergence / perf / functionality proof
No convergence or perf impact: this removes a trainer and its recipes, and the code of the remaining training paths is unchanged.
Deleting the recipes would leave no nightly on
data_plane.backend=nixl, sogrpo-llama3.1-8b-instruct-2n8g-async-1off-single-controller-streaming2.shnow runs on it. The changed nightly finished and all checks pass:median(data["train/token_mult_prob_error"]) < 1.1data["train/token_mult_prob_error"]["10"] < 1.1mean(data["train/grad_norm"], 2, 0) > 0.06max({**data.get("data_plane/cluster/step/hash/mismatches", {}), **data.get("data_plane/driver/step/hash/mismatches", {})}) == 0max({**data.get("data_plane/cluster/step/hash/rows_checked", {}), **data.get("data_plane/driver/step/hash/rows_checked", {})}) > 0Needs upstream changes
None
Dead code left for a follow-up decision
column_io.kv_first_writelost its last production caller in this PR and is intentionally not deleted here: nine files undertests/unit/use it as their TQ write helper.PR commands and CI
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./review: automated review comments. Addmode=strictfor a stricter review,reset=truefor a fresh full review./resolve-conflict: Autobot mergesmaininto this PR and resolves the conflicts. PRs from forks must allow edits by maintainers./review-pr-team <pr-number>for a team review before you ask for human review.