-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
Avoid import tensorflow directly #18655
Conversation
from keras.api_export import keras_export | ||
from keras.backend import KerasTensor | ||
from keras.backend import distribution_lib | ||
from keras.backend.common import global_state | ||
from keras.utils.module_utils import tensorflow as tf |
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. Can we move this to the place that tf is used (eg the distribute_dataset method.)
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #18655 +/- ##
==========================================
- Coverage 78.49% 69.59% -8.91%
==========================================
Files 334 334
Lines 32603 32605 +2
Branches 6377 6377
==========================================
- Hits 25593 22690 -2903
- Misses 5454 8452 +2998
+ Partials 1556 1463 -93
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Why was this not caught by our dedicated integration test? |
I just found it is caught by the integration test. However, the CI did not fail even with the error presented in the log. |
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 for the fix. |
People may use other backends without installing TF.