-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Scheduler should be initialized after Apex is configured #841
Comments
Good catch, @alexandrebone mind you send a PR with the fix? 🤖 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Any news on this? This bug is still active. |
@SkafteNicki pls ^^ |
I will take a look at this. It will not be easy since we construct optimizers and schedulers at the same time currently. But maybe there is a workaround. |
The problem seems to be that the scheduler equips the
@Borda is this fine? |
it looks reasonable to me... |
Description
Using jointly a scheduler and apex-amp throws a UserWarning:
As suggested here (https://discuss.pytorch.org/t/cyclic-learning-rate-how-to-use/53796), the scheduler should be initialized after Apex is configured.
To reproduce
Run the MNIST example with
use_amp=True
.Expected behavior
No scheduler-related user warning.
Workaround
The following hack seems to work:
The text was updated successfully, but these errors were encountered: