Skip to content

refactor(fsdp): rename sleep_wake.py to device_move.py - #273

Merged
Rockdu merged 1 commit into
fsdp-followups/7-nft-kl-namefrom
fsdp-followups/8-device-move
Oct 4, 2026
Merged

Rockdu merged 1 commit into
fsdp-followups/7-nft-kl-namefrom
fsdp-followups/8-device-move

Conversation

@Rockdu

@Rockdu Rockdu commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Stack 8/9 of follow-ups to #263: main ← #265 ← #266 ← #267 ← #268 ← #269 ← #271 ← #272 ← this ← #274.

What

  • miles/backends/fsdp_utils/sleep_wake.py becomes device_move.py, named after what it holds (move_model, move_optimizer, and the frozen-model sleep/wake built on them). Its GPU test and worker follow: test_device_move.py, _device_move_worker.py.

Why

Other RL trainers name these helpers after the move (offload_fsdp_model_to_cpu in verl, move_to_device in NeMo-RL, move_torch_optimizer in miles); sleep / wake_up stay the actor's phase names, as in miles and slime. Renaming here instead of in #267 keeps the CI results of the PRs below.

Checklist

  • pre-commit run passes on the changed files
  • Added/updated tests for new behaviour — rename only
  • pytest -x is green — CPU fsdp tests pass locally; the renamed GPU test is still registered on stage-b-5-gpu-h200
  • If launch flags changed, python3 train.py --help still parses — n/a
  • If a public flag was added, it appears in the CLI reference docs — n/a
  • If an example was added, it has a real walkthrough — n/a

@Rockdu
Rockdu merged commit 045302f into main Oct 4, 2026
39 of 46 checks passed
OnePunchMonk pushed a commit to OnePunchMonk/miles_diffusion that referenced this pull request Oct 5, 2026
OnePunchMonk pushed a commit to OnePunchMonk/miles_diffusion that referenced this pull request Oct 5, 2026
OnePunchMonk pushed a commit to OnePunchMonk/miles_diffusion that referenced this pull request Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci-basic Authorize and run only basic unlabeled CI tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants