Repository navigation
[rl] support short --module names for RL examples - #3691
Merged
Merged
Conversation
After #3684 each RL example owns its config_registry under rl/examples/<name>, so they had to be run with the full --module torchtitan.experiments.rl.examples.<name>. Let ConfigManager also search torchtitan.experiments.rl.examples when resolving a short --module name, and register alphabet_sort / search_r1 as shorthands, so --module alphabet_sort works like --module llama3. Switch the integration tests, READMEs, train/generate docs and loss_compare back to the short names.
yichuan-w
requested review from
fegin,
tianyu-l,
wconstab and
wwwjn
as code owners
June 16, 2026 22:04
tianyu-l
approved these changes
Jun 17, 2026
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.
Follow-up to #3684. Now that each RL example owns its
config_registryunderrl/examples/<name>, running one meant typing the full--module torchtitan.experiments.rl.examples.alphabet_sort. This letsConfigManagerresolve the short name like it does for models/experiments.What changed:
config/manager.py: when resolving a short--modulename, also searchtorchtitan.experiments.rl.examples.<name>.config_registry(aftertorchtitan.modelsandtorchtitan.experiments).experiments/__init__.py: registeralphabet_sortandsearch_r1as supported shorthands.train/example docs andloss_compare.pyback to the short names (e.g.--module alphabet_sort).So
--module alphabet_sort --config rl_grpo_qwen3_0_6b_varlennow works like--module llama3.Verified locally:
--module llama3 --config llama3_debugmodelstill builds (no regression).--module alphabet_sort --config rl_grpo_qwen3_0_6b_varlenand--module search_r1 --config rl_grpo_qwen3_1_7b_search_r1resolve and build.--module alphabet_sortand pull in vLLM).cc @tianyu-l — this is the manager.py change you sketched.