Repository navigation
[rl][ez] Squash landing import and git fixes PR #2324 and #2325 - #2331
Conversation
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]
There was a problem hiding this comment.
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_utilsfrommodelstoinfradirectory - 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.
| import torch | ||
| from vllm.attention.layer import Attention | ||
|
|
||
| try: |
There was a problem hiding this comment.
this comment seems not addressed
#2324 (comment)
I learned from @fegin you can use ghstack to submit PRs, but when landing, |
|
Gotcha. I will use vanilla GH pr next time and ask around. |
…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
…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
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