Skip to content

[rl][ez] Squash landing import and git fixes PR #2324 and #2325 - #2331

Merged
wwwjn merged 3 commits into
mainfrom
gh/zhxchen17/6/base
Feb 6, 2026
Merged

wwwjn merged 3 commits into
mainfrom
gh/zhxchen17/6/base

Conversation

@zhxchen17

@zhxchen17 zhxchen17 commented Feb 5, 2026 •

Copy link
Copy Markdown
Contributor

Sorry for the previous 2 PRs I was tring out ghstack and made a mistake to merge them directly into /base branches. Re-landing them into main instead.

Squashed message:

#2324: I'm seeing some import errors while rebasing on the latest vllm and torchtitan. Fixing these.

#2325: Ignoring example_checkpoint/ dir since it clobbers git status rn.

Test Plan:
python torchtitan/experiments/rl/unified/infer.py

Summary:

I'm seeing some import errors while rebasing on the latest vllm and torchtitan. Fixing these.

Test Plan:
python torchtitan/experiments/rl/unified/infer.py

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary:

Ignoring example_checkpoint/ dir since it clobbers git status rn.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 5, 2026
@zhxchen17 zhxchen17 changed the title [rl][ez] Squash landing https://github.com/pytorch/torchtitan/pull/2324 and https://github.com/pytorch/torchtitan/pull/2325 [rl][ez] Squash landing PR 2324 and 2325 Feb 5, 2026
@zhxchen17 zhxchen17 changed the title [rl][ez] Squash landing PR 2324 and 2325 [rl][ez] Squash landing PR #2324 and #2325 Feb 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR squashes two previous PRs that fix import errors and add a gitignore entry for the RL experiments directory. The changes address compatibility issues with vLLM API changes and correct an import path that was refactored in the codebase.

Changes:

  • Added try/except fallback for vLLM Attention import to handle API location changes between vLLM versions
  • Fixed import path for parallelism_utils from models to infra directory
  • Added example_checkpoint/ to gitignore to prevent checkpoint files from cluttering git status

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
torchtitan/experiments/rl/unified/models/attention.py Added backward-compatible import handling for vLLM's Attention class
torchtitan/experiments/rl/unified/actors/trainer.py Corrected import path for create_trainer_parallel_dims function
torchtitan/experiments/rl/.gitignore Added example checkpoint directory to git exclusions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zhxchen17 zhxchen17 changed the title [rl][ez] Squash landing PR #2324 and #2325 [rl][ez] Squash landing import and git fixes PR #2324 and #2325 Feb 5, 2026

@tianyu-l tianyu-l left a comment

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.

Will use ghstack land next time.

I don't think ghstack works well for torchtitan. cc @fegin has a trick to work with it.
I'm no longer using ghstack for torchtitan these days.

import torch
from vllm.attention.layer import Attention

try:

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.

this comment seems not addressed
#2324 (comment)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@tianyu-l my bad. updated.

@wwwjn

wwwjn commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Will use ghstack land next time.

I don't think ghstack works well for torchtitan. cc @fegin has a trick to work with it. I'm no longer using ghstack for torchtitan these days.

I learned from @fegin you can use ghstack to submit PRs, but when landing, ghstack land won't work for torchtitan. You'll have to manually change the base branch of each PR to be "main" before merge.

@zhxchen17
zhxchen17 requested a review from tianyu-l February 6, 2026 15:18
@zhxchen17

Copy link
Copy Markdown
Contributor Author

Gotcha. I will use vanilla GH pr next time and ask around.

@wwwjn
wwwjn merged commit a7ff889 into main Feb 6, 2026
21 of 22 checks passed
TXacs pushed a commit to McmillanTAC/torchtitan that referenced this pull request Apr 13, 2026
…rch#2325 (pytorch#2331)

Sorry for the previous 2 PRs I was tring out ghstack and made a mistake
to merge them directly into /base branches. Re-landing them into main
instead.

Squashed message:

pytorch#2324: I'm seeing some import
errors while rebasing on the latest vllm and torchtitan. Fixing these.

pytorch#2325: Ignoring
example_checkpoint/ dir since it clobbers git status rn.

Test Plan:
python torchtitan/experiments/rl/unified/infer.py
ACharacterInASimulation pushed a commit to ACharacterInASimulation/torchtitan that referenced this pull request Apr 21, 2026
…rch#2325 (pytorch#2331)

Sorry for the previous 2 PRs I was tring out ghstack and made a mistake
to merge them directly into /base branches. Re-landing them into main
instead.

Squashed message:

pytorch#2324: I'm seeing some import
errors while rebasing on the latest vllm and torchtitan. Fixing these.

pytorch#2325: Ignoring
example_checkpoint/ dir since it clobbers git status rn.

Test Plan:
python torchtitan/experiments/rl/unified/infer.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

4 participants