Skip to content

[ci][rl] Area reviewer updates, RL vLLM attention subpackage, review skill fixes - #5759

Merged
tianyu-l merged 1 commit into
mainfrom
ai-review-evolve
Nov 3, 2026
Merged

tianyu-l merged 1 commit into
mainfrom
ai-review-evolve

Conversation

@tianyu-l

@tianyu-l tianyu-l commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary (human-written)

This PR adapts learnings from recent code review experience from me.

Why

Three problems with the review automation on main:

  1. Area routing. Several areas lack the right PoCs, cuda_graph is named after files that were renamed to accelerator_graph, and the RL vLLM attention code has no area of its own because it is spread across torchtitan/rl/generator/vllm/.
  2. The bot approves one-sided designs. On [rl][models] GDN: one input projection grouped by key head, shared by trainer and generator (5/7) #5689 the bot approved a generator-only fused GDN projection. That design needed free_storage on FSDP-owned params, a refresh hook, a private torch._C._accelerator_setAllocatorSettings call, and an ordering invariant. A native fused parameter shared with the trainer would delete all of that, and the bot only said so after being asked to review the maintainer's review. The first two runs on [rl][models] GDN: one input projection grouped by key head, shared by trainer and generator (5/7) #5689 didn't load the pr-review skill at all.
  3. A stale REQUEST_CHANGES. On [train] Require one device for a seed checkpoint #5313 the bot wrote "Approve" in a "review my review" run but submitted COMMENT, as the skill instructed for that mode. Its earlier REQUEST_CHANGES stayed and kept blocking the PR.

Example (area matching). A PR touching rl/generator/vllm/attention/gdn.py, rl/generator/vllm/worker.py and tests/rl/x.py:

Areas matched Requested
Before (any prefix match) rl (3) felipemello1, pzhan9, wwwjn (cap of 3 used up)
After (longest prefix) rl (2), rl_attention (1) felipemello1, pzhan9, wwwjn, liangel-02, drisspg, minus the author and already-requested code owners, capped at 3

What changed

  • .github/area_reviewers.yml
    • attention += fegin, liangel-02
    • quantization += vkuzo
    • context_parallel += liangel-02, drisspg
    • cuda_graph -> accelerator_graph, += sanketpurandare
    • new rl_attention (torchtitan/rl/generator/vllm/attention/): liangel-02, drisspg
  • .github/workflows/area_reviewers.yml: each changed file counts toward the area with its longest matching prefix, so a subarea wins over its parent.
  • Mechanical, skim: attention.py, mla.py, gdn.py, kda.py, linear_attention.py move from torchtitan/rl/generator/vllm/ to torchtitan/rl/generator/vllm/attention/ (mirrors models/common/attention/). The only other changes are import updates in model_wrapper.py, registry.py, worker.py, the moved files, and the RL tests.
  • .claude/skills/pr-review/
    • New gate question 7, "one-sided design": an optimization added to only one side (generator vs. trainer, inference vs. training, one model or backend) must be compared against the shared version and what it would delete. Workaround machinery counts as evidence for the shared version: private APIs, storage tricks on FSDP-owned tensors, refresh hooks, copies kept in sync, ordering invariants.
    • If the shared version would delete that machinery, the finding is the lead must-fix with Request changes or Needs discussion, never a TODO. Same item added to review-checklist.md.
    • The review event always matches the verdict line in every mode. COMMENT is used only for answers with no verdict.
    • The fallback body file is written in the working directory; writes to /tmp are denied.
  • .github/workflows/claude-code.yml

Numerics

No computation change. The RL change only moves files and updates imports.

Testing

  • pytest tests/rl/unit_tests/cpu/test_vllm_wrapper.py tests/rl/unit_tests/cpu/test_vllm_registry.py: 25 passed.
  • All moved modules plus model_wrapper, registry and worker import. The GDN GPU tests collect (23 tests) but were not run on GPU.
  • I checked the area-matching logic with a local node script on the example above.
  • The skill and workflow changes take effect only after merge (the workflows run from main).

…skill fixes

- area_reviewers: add reviewers, rename cuda_graph -> accelerator_graph, add
  rl_attention; count each file toward its longest matching area prefix.
- Move the RL vLLM attention modules into torchtitan/rl/generator/vllm/attention/
  (mechanical).
- pr-review: gate on one-sided designs; review event always follows the verdict;
  allow create_and_submit_pull_request_review; invoke the skill first.
@pytorch-bot pytorch-bot Bot added the ciflow/fake-pg Run 1-GPU Fake PG integration tests label Nov 3, 2026
@pytorch-bot pytorch-bot Bot added the ciflow/rl label Nov 3, 2026
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 3, 2026
@github-actions
github-actions Bot requested a review from pzhan9 November 3, 2026 05:47
@tianyu-l
tianyu-l merged commit 6a2292d into main Nov 3, 2026
@tianyu-l
tianyu-l deleted the ai-review-evolve branch November 3, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/fake-pg Run 1-GPU Fake PG integration tests ciflow/rl 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