Skip to content

fix: use launch world size for CLI scheduler steps - #66

Closed
dorodo0721 wants to merge 1 commit into
ViperEkura:mainfrom
dorodo0721:main
Closed

dorodo0721 wants to merge 1 commit into
ViperEkura:mainfrom
dorodo0721:main

Conversation

@dorodo0721

Copy link
Copy Markdown

Summary

  • Resolve the effective world size using the existing external-launcher detection: local launches use CLI nprocs, while external launches require a positive integer WORLD_SIZE.
  • Use the resolved world size only when calculating CLI scheduler total steps, so warmup and decay lengths reflect global data-parallel sharding.
  • Preserve TrainConfig.nprocs, launcher behavior, and existing configuration validation; update the distributed training guide.

Tests

  • Add launch-world-size resolution tests and CLI-to-scheduler regression coverage for cosine, SGDR, and WSD, including mismatched CLI and environment values.
  • Before CLI wiring: regression tests reproduced the bug (9 failed, 6 passed). After the fix: targeted tests passed (38 passed, 2 deselected).
  • Full CPU test suite: python -m pytest -q tests/ --tb=short resulted in 712 passed, 50 skipped, and 2 dependency deprecation warnings. Tests requiring localhost sockets were rerun successfully outside the sandbox.
  • Ruff import checks, formatting checks, and git diff --check passed.

Limitations

  • Validated on macOS ARM64 with Python 3.12.13 and PyTorch 2.11.0.
  • No actual GPU training or multi-node torchrun execution; CLI regression tests simulate launcher environment variables and instantiate real schedulers without starting training.

@ViperEkura
ViperEkura force-pushed the main branch 2 times, most recently from e7237f6 to 093c57e Compare September 8, 2026 23:09
@ViperEkura ViperEkura closed this Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants