Repository navigation
fix(args): treat the fully-async rollout path as the mode that selects it - #3587
Merged
Merged
Conversation
…s it --fully-async selects FullyAsyncRolloutFn, but naming that class through --rollout-function-path selected the same producer while leaving the mode off. Such a run skipped every --fully-async check (colocate, partial rollout, legacy rollout v1, pause mode, multi-LoRA) and the guard in train.py that sends the mode to the async driver, so a misconfiguration surfaced during training instead of at launch. Normalize the path spelling into the flag before validation runs. A subclass still has to pass --fully-async, since only the exact class is recognized.
Shi-Dong
requested review from
Zhichenzzz,
fzyzcjy,
guapisolo,
jybsuper,
maocheng23 and
yueming-yuan
as code owners
September 22, 2026 02:47
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
Collaborator
Author
|
@claude review always |
Shi-Dong
commented
Sep 22, 2026
Same three points in two lines: the path is the selection the flag makes, a plugin path would skip the checks below and train.py's guard, and only the exact class is recognized.
guapisolo
approved these changes
Sep 22, 2026
The file landed in #3586 unformatted, so `pre-commit` fails repo-wide on every branch cut from main since; this PR inherited that red check. Only black reformats it, and the file's AST is unchanged.
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
--fully-asyncselectsFullyAsyncRolloutFn, but the class can also be named directly:That spelling loads the same persistent producer while
args.fully_asyncstaysFalse, so the run silently skips everything the mode implies:--colocate,--partial-rollout, legacy rollout v1,--pause-generation-mode abort, multi-LoRA, and the rest are all checked insideif args.fully_async:train.pythat refuses the sync driver, so the producer can run with no async driver at allexamples/infra_features/fully_async/run_qwen3_5_4b_fully_async_eval.pyuses exactly this spelling today. The mismatch surfaces during training rather than at launch.Change
Normalize the path spelling into the flag before any validation runs: when
--rollout-function-pathnamesFullyAsyncRolloutFn, enable--fully-asyncand let the flag own the selection. The two spellings are one selection, so the existing "pass only one" assertion now fires only when the path names a different function.The path string becomes a shared constant, so the override and the normalization cannot drift apart. Only the exact class is recognized: a subclass still passes
--fully-asyncexplicitly.Behavior
--fully-async--rollout-function-path <FullyAsyncRolloutFn>AssertionError--fully-async+ a different pathAssertionErrorA run that was already correct is unaffected. A run that was silently wrong now either works or fails at launch with the mode's own message.
Tests
Five cases in
tests/fast/utils/test_arguments.py: the path enables the mode, the mode's constraints then apply (--colocateis rejected), the agreeing pair is accepted, a conflicting pair still raises, and an ordinary plugin path is untouched.Verified locally:
mainthe path-plus---colocatecombination is accepted and returnsfully_async=Falsetests/fast/rollout/test_fully_async_rollout.pyandtests/fast/test_train_async.py: 34 passedNo GPU run.
Unrelated file:
scripts/ci/runner_utilization_report.pyThat file landed in #3586 unformatted, so the repo-wide
pre-commitjob fails on every branch cut from main since — including this one, on a file it does not touch. The last commit here isblackalone (the pinned 24.3.0, applied through the repo's own hook); the file's AST is unchanged.pre-commit run --all-filespasses with it and fails without it. Drop that commit if main is fixed first.