-
Notifications
You must be signed in to change notification settings - Fork 614
Got an error very recently for "layers.normalizations". Something related to the "epsilon" variable in the typeguard module. #1067
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
Comments
It was running good previously. Not sure if this is due to a recent update. |
I used a work-around solution by simply downgrading to 0.7.1 |
This is a good catch @davidweioct Should be a float not integer. |
So isn't it just a change of
|
The catch is that we incorrectly typed it as an int. If we have casting then we can make it Union[int, float], but otherwise it should be typed as float |
I mean, from a workflow point of view. It's a very simple (even "stylish") modification that could be done in no time without a contributors' help. Sorry, I'm just unfamiliar with practices of this project. |
Addons only consists of volunteer contributors 😄 Please feel free to submit a PR, as you mentioned its an easy fix... and maintainers need to balance reviews, shepparding issues (like this one) and submitting contirbutions.... |
|
Got it! |
Thanks for the fix!! Encouraging others to fix easy issues also helps grow our contributor base. Any thoughts on adding this to a 0.8.2 patch version? We could also include the fixes to CohensKappa once that merges. |
Yes, let's stress test our release process! Jokes aside, it's a good way to check that the release process is as automatic as possible :) It would be nice if we had an automatic way of porting bugfix PRs to other branches. I know CPython has a system like that. |
(cherry picked from commit 99352d0)
Thank you for all the information. I understand "epsilon" should be a float simply based on it's definition. I was running in google-colab and not quite family with all those function. Thanks again! |
* Fix kappa (#1047) * fix kappa * add more tests and rename regression variable * add cross_entropy test for binary class model (cherry picked from commit 83df531) * Typo in type #1067 (#1069) (cherry picked from commit 99352d0) * Bump to 0.8.2 * Add CI to release branches Co-authored-by: Aakash Kumar Nain <[email protected]> Co-authored-by: failure-to-thrive <[email protected]>
@davidweioct This is fixed in the newly pushed 0.8.2 version
@gabrieldemarmiesse Super simple 😄 it did launch 3 builds (so I canceled 2) but that's been fixed on master |
The code was run in google colab with the following install libraries:
!pip3 install nilearn
!pip3 install simpleITK
!pip3 install tensorflow-gpu==2.1.0
!pip3 install tensorflow-addons==0.8.1
ERROR info:
File "/usr/local/lib/python3.6/dist-packages/tensorflow_addons/layers/normalizations.py", line 319, in init
super().init(**kwargs)
File "/usr/local/lib/python3.6/dist-packages/typeguard/init.py", line 809, in wrapper
check_argument_types(memo)
File "/usr/local/lib/python3.6/dist-packages/typeguard/init.py", line 670, in check_argument_types
raise exc from None
File "/usr/local/lib/python3.6/dist-packages/typeguard/init.py", line 668, in check_argument_types
check_type(description, value, expected_type, memo)
File "/usr/local/lib/python3.6/dist-packages/typeguard/init.py", line 598, in check_type
format(argname, qualified_name(expected_type), qualified_name(value)))
TypeError: type of argument "epsilon" must be int; got float instead
Thank you so much!
The text was updated successfully, but these errors were encountered: