Repository navigation
[rl] Add RL unit tests to CI - #4889
Merged
Merged
Conversation
wwwjn
force-pushed
the
feat/rl-unit-tests-ci
branch
3 times, most recently
from
September 25, 2026 23:15
b35f945 to
b788ac2
Compare
wwwjn
force-pushed
the
feat/rl-unit-tests-ci
branch
from
September 26, 2026 19:56
8ff39e5 to
9fa95af
Compare
wwwjn
marked this pull request as ready for review
September 26, 2026 21:54
wwwjn
requested review from
fegin,
felipemello1,
pzhan9,
tianyu-l and
wconstab
as code owners
September 26, 2026 21:54
tianyu-l
reviewed
Sep 26, 2026
| pip_install -r /opt/conda/requirements-vlm.txt | ||
| pip_install -r /opt/conda/requirements-transformers-modeling-backend.txt | ||
| # --no-deps: the image ships no torch on purpose, every job installs a nightly. | ||
| if [[ "${INSTALL_RL_DEPS:-0}" == "1" ]]; then |
Contributor
There was a problem hiding this comment.
why do we need this flag -- is it because for non-RL test we don't need that in docker image?
Contributor
Author
There was a problem hiding this comment.
Yes this is a flag to decide if we want to install RL dependencies in docker image. I want to prevent pretraining docker image installing something like vllm, to keep it simple
Contributor
There was a problem hiding this comment.
- should name this GPU?
- where do we do RL CPU test?
wwwjn
commented
Sep 28, 2026
|
|
||
| # TODO: test_gdn_full_runner_matches_eager skips here because | ||
| # TORCHTITAN_QWEN3_5_0_8B_HF_PATH is unset. The Hugging Face Qwen3.5-0.8B | ||
| # checkpoint ties its embeddings, and the torchtitan 0.8B config does not |
wwwjn
force-pushed
the
feat/rl-unit-tests-ci
branch
from
September 28, 2026 17:10
88eff45 to
fb37f11
Compare
tianyu-l
approved these changes
Sep 28, 2026
Comment on lines
16
to
+29
| "ciflow/rl": | ||
| - torchtitan/rl/** | ||
| - tests/rl/** | ||
| - scripts/rl/** | ||
| - torchtitan/trainer.py | ||
| - torchtitan/components/checkpointer/** | ||
| - torchtitan/components/data/** | ||
| - torchtitan/distributed/cuda_graph.py | ||
| - torchtitan/models/common/** | ||
| - torchtitan/models/qwen3_5/** | ||
| - torchtitan/models/qwen3_8/** | ||
| - .github/workflows/integration_test_8gpu_rl.yaml | ||
| - .github/workflows/unit_test_cpu_rl.yaml | ||
| - .github/workflows/unit_test_gpu_rl.yaml |
Contributor
There was a problem hiding this comment.
This might have been introduced by me? Feels that it could be revisited.
Mirror the core unit test layout (tests/unit_tests/{cpu,gpu} with a
multi_gpu marker):
- tests/rl/unit_tests/cpu: every RL unit test that needs no GPU, run on the
CPU runner used by the core CPU unit tests.
- tests/rl/unit_tests/gpu: the GDN cudagraph tests on one A10G, and the
bitwise parity and uneven-decode tests, marked multi_gpu and run under
one torchrun launch each on the 8x A10G runner.
The bitwise parity and uneven-decode tests move out of the RL integration
workflow, and the duplicate test_vllm_wrapper.py run there is dropped: that
test is CPU-only and is covered by the CPU job. The integration workflow now
runs only the loss guard and the end-to-end suite.
VllmConfig() infers its device from the current platform, so these tests fail with 'Failed to infer device type' on the CPU runner, which has no NVIDIA driver. They exercise CUDA graph dispatch metadata, so run them in the 1-GPU job.
Split unit_tests_rl.yaml into unit_test_cpu_rl.yaml (RL CPU Unit Tests) and unit_test_gpu_rl.yaml (RL GPU Unit Tests: the 1-GPU and multi-GPU jobs), following the core unit_test_cpu.yaml / unit_test_gpu.yaml naming. Also show both badges in the RL README, add the two workflows to the ciflow/rl labeler paths so edits to them trigger RL CI, and describe when the RL unit workflows run: main pushes, every 12 hours, and PRs with the automatically applied ciflow/rl label.
wwwjn
force-pushed
the
feat/rl-unit-tests-ci
branch
from
September 28, 2026 18:12
fb37f11 to
0c2735a
Compare
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.
Why
RL tests were outside the CPU/GPU unit-test workflows, so most RL coverage did not run in CI.
Changes
Validation