-
Notifications
You must be signed in to change notification settings - Fork 24
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
Support TF 2.15 #101
Support TF 2.15 #101
Conversation
This reverts commit f9d95b5.
This reverts commit 3e4f98c.
Behavior of tensorflow ObjectIdentitySet has change in 2.15, resulting in the set equality comparing wrappers instead of wrapped values. See tensorflow/tensorflow@bc28335.
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! (just one question re TF 2.13 and 2.14)
.github/workflows/quality-check.yaml
Outdated
@@ -22,7 +22,7 @@ jobs: | |||
strategy: | |||
matrix: | |||
python-version: ["3.7", "3.8", "3.9", "3.10"] | |||
tensorflow: ["~=2.5.0", "~=2.6.0", "~=2.7.0", "~=2.8.0", "~=2.9.0", "~=2.10.0", "~=2.11.0", "~=2.12.0"] | |||
tensorflow: ["~=2.5.0", "~=2.6.0", "~=2.7.0", "~=2.8.0", "~=2.9.0", "~=2.10.0", "~=2.11.0", "~=2.12.0", "~=2.15.0"] |
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.
do we not want to test on the intermediate values too?
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.
Wasn't sure, thought that would be a lot of combinations. I'll go ahead and add it.
Added support for tensorflow 2.15.
Required fixing of two issues:
ImportError: cannot import name 'Self' from 'typing_extensions' ...
. Worked around by limiting mypy version for older python versions.tensorflow.python.util.object_identity.ObjectIdentitySet
has changed such that the set equality now compares the internal wrappers instead of the wrapped objects (see tensorflow/tensorflow@bc28335). This resulted in a failing test. The test has been updated to directly compare the objectid
s, instead of using the internal tensorflow class. Note: this class is also used inoptimization/keras_natgrad.py
, but that behaviour hasn't changed and should continue to work. So that has been left alone in this PR.