Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Learning rate scheduler and optimizer logical issue #5731

Open
zhourunlong opened this issue Jul 5, 2024 · 1 comment · May be fixed by #6597
Open

[BUG] Learning rate scheduler and optimizer logical issue #5731

zhourunlong opened this issue Jul 5, 2024 · 1 comment · May be fixed by #6597
Assignees
Labels
bug Something isn't working training

Comments

@zhourunlong
Copy link

zhourunlong commented Jul 5, 2024

Describe the bug
The lr_scheduler takes effect after optimizer steps. This is a logical error, since the learning rate of the first optimization step is not generated by lr_scheduler. Concretely, if I initialize with both an optimizer with lr = x and a WarmupDecayLR scheduler with warmup_min_lr=y, then the first step learning rate would be x (instead of y), and then the second step learning rate would be y.

Perm link:
https://github.com/microsoft/DeepSpeed/blob/3d347276ce80e1a29e777c839d1d7fabe8e5f034/deepspeed/runtime/engine.py#L2109C28-L2109C64

Tasks

No tasks being tracked yet.
@zhourunlong zhourunlong added bug Something isn't working training labels Jul 5, 2024
@jomayeri jomayeri self-assigned this Sep 26, 2024
@jomayeri jomayeri linked a pull request Sep 26, 2024 that will close this issue
@jomayeri
Copy link
Contributor

@zhourunlong try the linked branch.

@jomayeri jomayeri removed a link to a pull request Oct 1, 2024
@jomayeri jomayeri linked a pull request Oct 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working training
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants