Problem
At the warmup/cosine transition, the scheduler wrapper can delegate to CosineAnnealingLR.get_lr() while the cosine scheduler is in a chainable state with last_epoch == 0 and the optimizer LR already set to the warmup peak.
That state applies the recursive cosine update to the current peak LR instead of returning the epoch-0 peak value.
Impact
The learning rate can exceed the configured peak for one step. With eta_min = 0, the transition factor is:
2 / (1 + cos(pi / T_max))
For example, T_max = 10 overshoots by about 2.51%.
Fix
Fixed in PR #30 by special-casing the handoff to return the configured peak/base LRs directly, then letting the following scheduler step advance cosine normally.
Problem
At the warmup/cosine transition, the scheduler wrapper can delegate to
CosineAnnealingLR.get_lr()while the cosine scheduler is in a chainable state withlast_epoch == 0and the optimizer LR already set to the warmup peak.That state applies the recursive cosine update to the current peak LR instead of returning the epoch-0 peak value.
Impact
The learning rate can exceed the configured peak for one step. With
eta_min = 0, the transition factor is:For example,
T_max = 10overshoots by about 2.51%.Fix
Fixed in PR #30 by special-casing the handoff to return the configured peak/base LRs directly, then letting the following scheduler step advance cosine normally.