TF 2.0.0-rc0, why so many warnings when using Estimators?

368 views
Skip to first unread message

James Clarke

unread,
Aug 27, 2019, 9:38:47 AM8/27/19
to Discuss
W0827 09:35:01.190161 4548941248 deprecation.py:323] From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow_core/python/feature_column/feature_column_v2.py:4273: IndicatorColumn._variable_shape (from tensorflow.python.feature_column.feature_column_v2) is deprecated and will be removed in a future version.
Instructions for updating:
The old _FeatureColumn APIs are being deprecated. Please use the new FeatureColumn APIs instead.

W0827 09:35:02.540920 4548941248 deprecation.py:323] From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/head/base_head.py:550: to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.cast` instead.

W0827 09:35:02.656876 4548941248 deprecation.py:323] From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/model_fn.py:337: scalar (from tensorflow.python.framework.tensor_shape) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.TensorShape([]).

W0827 09:35:03.033190 4548941248 deprecation.py:323] From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow_core/python/ops/array_ops.py:1486: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where


Alexandre Passos

unread,
Aug 27, 2019, 10:08:35 AM8/27/19
to James Clarke, Discuss
Each message is self explanatory, something in your codebase is relying on deprecated v1 apis. Can you search for the symbols mentioned and move them forward?

--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/CE22F7B0-F985-4195-A9F2-17D71CE0C108%40aol.com.

Derek Murray

unread,
Aug 27, 2019, 10:13:54 AM8/27/19
to Alexandre Passos, James Clarke, Discuss
All of those deprecation warnings are coming from calls inside the tf.estimator implementation. We'd welcome a pull request to https://github.com/tensorflow/estimator with a change that moves them forward :).

James Clarke

unread,
Aug 27, 2019, 10:16:32 AM8/27/19
to Alexandre Passos, Discuss
These warnings are coming from within Tensorflow core, not  from my code.

jim

Martin Wicke

unread,
Aug 27, 2019, 10:40:02 AM8/27/19
to James Clarke, Karmel Allison, Alexandre Passos, Discuss
+Karmel Allison we can use the Silence context to suppress them, if we must rely on the old APIs in the implementation. Better would be to not rely on them. 

Reply all
Reply to author
Forward
0 new messages