Skip to content

[RL] Test RL integration with spmd_types - #4112

Merged
acisseJZhong merged 7 commits into
mainfrom
gh/acisseJZhong/30/head
Aug 12, 2026
Merged

acisseJZhong merged 7 commits into
mainfrom
gh/acisseJZhong/30/head

Conversation

@acisseJZhong

@acisseJZhong acisseJZhong commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Configure both the trainer and generator to use the spmd_types backend in every RL integration test invocation. This exercises dense and MoE configurations, checkpoint resharding, compilation, and batch-invariant training through the SPMD types path.

Test Plan:

  • python3 -m py_compile torchtitan/experiments/rl/tests/integration_tests.py
  • 8-GPU RL integration tests will run in CI

[ghstack-poisoned]
[ghstack-poisoned]
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 11, 2026
@acisseJZhong
acisseJZhong requested a review from wwwjn August 11, 2026 16:29
[ghstack-poisoned]
acisseJZhong added a commit that referenced this pull request Aug 11, 2026
ghstack-source-id: 46c6c1d
Pull-Request: #4112
[ghstack-poisoned]
acisseJZhong added a commit that referenced this pull request Aug 11, 2026
ghstack-source-id: 9b0c6c1
Pull-Request: #4112
[ghstack-poisoned]
acisseJZhong added a commit that referenced this pull request Aug 11, 2026
ghstack-source-id: 00892f7
Pull-Request: #4112
[ghstack-poisoned]
acisseJZhong added a commit that referenced this pull request Aug 11, 2026
ghstack-source-id: 25af770
Pull-Request: #4112
@acisseJZhong acisseJZhong changed the title fix rl test migrating all rl tests to spmd types Aug 11, 2026
[ghstack-poisoned]
@acisseJZhong acisseJZhong changed the title migrating all rl tests to spmd types [RL] Test RL integration with spmd_types Aug 12, 2026
acisseJZhong added a commit that referenced this pull request Aug 12, 2026
Configure both the trainer and generator to use the spmd_types backend in every RL integration test invocation. This exercises dense and MoE configurations, checkpoint resharding, compilation, and batch-invariant training through the SPMD types path.

Test Plan:
- python3 -m py_compile torchtitan/experiments/rl/tests/integration_tests.py
- 8-GPU RL integration tests will run in CI

ghstack-source-id: 0355edc
Pull-Request: #4112
@acisseJZhong acisseJZhong added ciflow/h100.8 Trigger H100.8 CI ciflow/rl and removed ciflow/rl labels Aug 12, 2026
"--module alphabet_sort",
"--config rl_grpo_qwen3_0_6b_varlen",
"--trainer.parallelism.spmd_backend spmd_types",
"--generator.parallelism.spmd_backend spmd_types",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The trainer side don't need extra type checking because the pretraining tests should cover.

The generator side may still benefit from global spmd_types checking, for those modules that are different from trainer, e.g. attention. But we didn't have a mode to turn type checking on.

https://github.com/pytorch/torchtitan/blob/main/torchtitan/experiments/rl/models/vllm_wrapper.py#L249

I think this is not urgent, but good to have in mind. @pianpwk

@tianyu-l

Copy link
Copy Markdown
Contributor

rl test didn't run

@acisseJZhong

Copy link
Copy Markdown
Contributor Author

rl test didn't run

it's weird; I removed the ciflow/rl tag and added it again, still didn't trigger RL tests.

@acisseJZhong
acisseJZhong changed the base branch from gh/acisseJZhong/30/base to main August 12, 2026 06:07
@acisseJZhong
acisseJZhong merged commit 65fa556 into main Aug 12, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/h100.8 Trigger H100.8 CI ciflow/rl ciflow/8gpu CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants