-
Notifications
You must be signed in to change notification settings - Fork 74k
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
TypeError: this __dict__ descriptor does not support '_DictWrapper' objects #62217
Comments
In keras-team#18507 we removed a hacky workaround for functional models so dictionary output is not made a trackable. We actually still need this when calling `predict` on a functional with dictionary output. Added testing to plug the coverage gap. Still no idea what the status of the underlying bug is :/, filed with tensorflow tensorflow/tensorflow#62217
In #18507 we removed a hacky workaround for functional models so dictionary output is not made a trackable. We actually still need this when calling `predict` on a functional with dictionary output. Added testing to plug the coverage gap. Still no idea what the status of the underlying bug is :/, filed with tensorflow tensorflow/tensorflow#62217
@sachinprasadhs, |
Is there an easy patch to fix this for TF2.15? E.g. can I just downrev typing_extensions in pip_package/setup.py? |
To answer my own question: Yes. Just applying the change from #60688 fixes this for us. |
@plopresti, |
@tilakrayal Yes, our reproducer also passes on tf-nightly. I wonder what change fixed it. Anyway this does not appear to be an issue with latest builds. |
@plopresti,
Thank you! |
At this point, given that keras fixed it, this issue can be closed, I think |
This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. |
This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. |
This issue is happening for us again with the r2.17 branch.
Rebuilding TensorFlow after patching I have confirmed our Keras version (3.3.3) has the change you cite above. I am at a loss for how to proceed and would welcome any suggestion. Thank you! |
Here is our trvial test program that blows up with
|
I'm going to reopen this issue since this definitely is not resolved |
Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
binary
TensorFlow version
nightly
Custom code
Yes
OS platform and distribution
Colab
Python version
3.10
Current behavior?
typing-extensions
pip package.tf.Module
(will wrap it in a_DictWrapper
for tracking).tf.function
.TypeError: this __dict__ descriptor does not support '_DictWrapper' objects
.This is somewhat of a zombie bug, see #60687.
This is important because it breaks all
keras
functional models with dictionary output, but is not akeras
bug. This can be reproduced simply with low-level tensorflow.We either need to continue pinning an older version of typing extensions, or fix tensorflow to work with the latest version of typing extension. The latter seems less likely to keep breaking.
Standalone code to reproduce the issue
https://colab.research.google.com/gist/mattdangerw/6904dc4ab29ff936ad3c3b966848f463/dict-output-bug.ipynb
Relevant log output
The text was updated successfully, but these errors were encountered: