-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Lighting wrapped optimizers do not allow return values #5235
Comments
Hi! thanks for your contribution!, great first issue! |
Dear @thoglu, Thanks for reporting this bug :) Best regards, |
Hi I wanted to take a look at this but have a couple of questions.
|
The use case (in my case, but I think more broadly) is for allowing to return optimizer-specific logging values for debug purposes. In Adam, for example, one could return first and second moments, and see how they evolve over time, as these are the central quantities of the optimizer. The logging can then happen in the main training loop function of PL. |
This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions, Pytorch Lightning Team! |
This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions, Pytorch Lightning Team! |
This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions, Pytorch Lightning Team! |
This is both a bug report /feature request:
Any optimizer.step function might have a return value. However, NO return values are currently handled by the optimizer.LightningOptimizer class in the "step" function. Optimizers with return values in their step function therefore do not operate properly.
BugFix: Add return value to to the respective line, something like:
Also the
__optimizer_step
function must be able to pass on the return valuecc @Borda @rohitgr7
The text was updated successfully, but these errors were encountered: