-
Notifications
You must be signed in to change notification settings - Fork 611
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
Typing the lamb optimizer. #931
Typing the lamb optimizer. #931
Conversation
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.
Failing on linux tests for:
TypeError: type of argument "learning_rate" must be one of (Tensor, float, float16, float32); got tensorflow.python.keras.optimizer_v2.learning_rate_schedule.InverseTimeDecay instead
Seems like this can be handled by modifying the types that are accepted... but I'm more confused as to why this fails only for linux builds. typeguard
is an OS agnostic python library.
That's definitly strange. I read the docs a second time, and it says:
Do you think it's related? |
exclude_from_weight_decay=None, | ||
exclude_from_layer_adaptation=None, | ||
name='LAMB', | ||
learning_rate: Union[FloatTensorLike, Callable] = 0.001, |
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.
Looks good. Did we ever figure out why this was only failing for linux?
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.
Nope haha, my overall position on this is that we're very early in the history of tooling atound typing. We can try typeguard now, but if we see that it doesn't work well, we can drop it until the field is more mature.
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.
LGTM Thanks!
Linked to #894