[Train] Add warmup-stable-decay learning rate scheduler - #1058
[Train] Add warmup-stable-decay learning rate scheduler#1058qianlihuang wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughChangesWSD scheduler
Merge Risk: ⚪ Minimal · up to The PR adds a validated WSD learning-rate schedule without introducing an actionable merge-blocking risk; it is merge-ready after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Merge Protections🔴 1 of 1 protections blocking · waiting on 👀 reviews
🔴 Require approval from approved reviewers listWaiting for any of
This rule is failing.All pull requests must have at least one approving review from a member of the approved reviewers list before merging.
|
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: qianlihuang <yiliu.dong@qq.com>
Signed-off-by: qianlihuang <yiliu.dong@qq.com>
1c2eee9 to
098c28c
Compare
There was a problem hiding this comment.
🟢 Approval recommended
The new scheduler is gated behind an explicit config choice, includes input validation, and is covered by focused unit tests for core behaviors and edge cases.
Pull request overview
Adds a new warmup-stable-decay (WSD) learning-rate scheduler option to the training stack, integrating it into the existing trainer scheduler selection and exposing configuration/CLI schema knobs while backing the new behavior with unit tests.
Changes:
- Introduces a WSD LR schedule implementation (warmup → stable → final decay) with multiple decay curves and overlap validation.
- Extends trainer/config schema and CLI wiring to support
scheduler_type="wsd"and its parameters. - Adds unit tests covering the schedule shape, decay-style coefficients, and invalid overlapping phase configurations.
File summaries
| File | Description |
|---|---|
| tests/unit/train/test_trainer_scheduler.py | Adds unit coverage for WSD schedule progression, decay curve coefficients, and overlap rejection. |
| src/speculators/train/trainer.py | Implements WSD scheduler logic and wires it into TrainerConfig + scheduler creation. |
| src/speculators/train/config/schema.py | Exposes WSD scheduler options in the config schema (type + ratios + decay style). |
| src/speculators/train/cli.py | Passes new scheduler args through to TrainerConfig so CLI/config values take effect. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Purpose
Add an independent warmup-stable-decay (WSD) learning-rate scheduler to the trainer.
The scheduler provides:
Tests
Checklist
I have filled in: