-
Notifications
You must be signed in to change notification settings - Fork 610
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 the serialization bug of rectified adam. #1375
Conversation
You are owner of some files modified in this pull request. |
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.
Thanks for the fix. It's unfortunate this was overlooked during the reviews.
if isinstance(total_steps, float): | ||
warnings.warn( | ||
"The parameter `total_steps` passed to the __init__ of RectifiedAdam " | ||
"is a float. This behavior is deprecated and in Addons 0.11, this " |
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.
Any reason to select 0.11? Also, how do we keep track of this when we get to version 0.11?
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.
We need to give a date in the warning, otherwise users won't care. They'll just say: "I'll leave tomorrow's probems to tomorrow's me". :P
No idea how to track it though. Milestones in github?
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.
Milestones require a due date, not version.
Why not provide a deprecation date instead of a version? But this directly means we'll need to create a new release on that due date.
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.
When stopping support for a branch, it's indeed common to specify a date: ex the python org will stop support for the branch 2.7 of python january 1st 2020.
When deprecating a feature and removing it later, it's more common to use a specific version:
/opt/conda/lib/python3.7/site-packages/tensorflow/python/training/tracking/data_structures.py:718: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
.
I believe it makes more sense to use a specific version. We can make a milestone. We're not forced to add a date. For example:
https://github.com/pytest-dev/pytest/milestones
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.
Sounds great! I'll accept this PR. We should create a milestone for this as well.
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.
Sure, I can do that.
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.
Haha, accidentally created a duplicate issue (#1381, closed now).
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.
Thanks for the fix!
* Fix the serialization bug of rectified adam. * Better error message. * Update tensorflow_addons/optimizers/rectified_adam.py
Fix #1373