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
fix(integrations): make Keras WandbCallback compatible with TF version >= 2.11.0 #4533
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #4533 +/- ##
=======================================
Coverage ? 83.03%
=======================================
Files ? 261
Lines ? 33227
Branches ? 0
=======================================
Hits ? 27590
Misses ? 5637
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Could you also roll back the changes from #4508 to ensure that 2.11 gets tested in CI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, thanks a lot for the fix @ayulockin!
+1 on what @moredatarequired requested and then should be good to go in.
mypy issue seems unrelated, will look into that separately. |
@ayulockin @moredatarequired I merged a revert of #4508 into this branch. |
Fixes WB-11561
Description
In TensorFlow 2.9, an experimental version of the new Keras Optimizer API,
tf.keras.optimizers.experimental
was released. It was done to provide a more unified and expanded catalog of built-in optimizers which can be more easily customized and extended.In TensorFlow 2.11, these new optimizers are on by default.
Our Keras
WandbCallback
,log_gradient
feature creates a_CustomOptimizer
by subclassing old optimizers API.This PR creates the
_CustomOptimizer
using the correct parent class. This solves the problem oflog_gradient
feature not working with TF 2.11.0.Testing
This was manually tested with TF version 2.8.0, 2.9.0, 2.10.0, and 2.11.0. The W&B run pages are linked below:
Checklist