question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Quickstart example throws warnings

See original GitHub issue

The quickstart example throws some warnings:

WARNING:tensorflow:From /path/to/stable-baselines/stable_baselines/common/policies.py:436: flatten (from tensorflow.python.layers.core) is deprecated and will be removed in a future version.
Instructions for updating:
Use keras.layers.flatten instead.
WARNING:tensorflow:From /usr/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From /usr/lib/python3.7/site-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
WARNING:tensorflow:From /usr/lib/python3.7/site-packages/tensorflow/python/ops/math_grad.py:102: div (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Deprecated in favor of operator or tf.math.divide.

stable-baselines is installed from git commit 0eac3f5.

Here is the information collected by tf_env_collect.sh that seems relevant:

== uname -a =====================================================
Linux thamiel 4.19.34-1-MANJARO #1 SMP PREEMPT Sat Apr 6 08:28:55 UTC 2019 x86_64 GNU/Linux

== check pips ===================================================
numpy                             1.16.2    
protobuf                          3.7.0     
tensorflow                        1.13.1    
tensorflow-estimator              1.13.0    
tensorflow-serving-api            1.13.0    
tensorflow-serving-api-gpu        1.13.0

Also:

$ python --version
Python 3.7.3

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
nicola-pesaventocommented, Dec 5, 2020

For removing the Tensorflow’s deprecation warnings it’s possible to use the following code too:

import tensorflow as tf
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)

(Source: https://github.com/tensorflow/tensorflow/issues/27023#issuecomment-523710266 )

1reaction
araffincommented, Jun 2, 2020

as we are moving to PyTorch, this will probably not be fixed. However, to remove the warnings, one can do:

# Filter tensorflow version warnings
import os
# https://stackoverflow.com/questions/40426502/is-there-a-way-to-suppress-the-messages-tensorflow-prints/40426709
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'  # or any {'0', '1', '2'}
import warnings
# https://stackoverflow.com/questions/15777951/how-to-suppress-pandas-future-warning
warnings.simplefilter(action='ignore', category=FutureWarning)
warnings.simplefilter(action='ignore', category=Warning)
import tensorflow as tf
tf.get_logger().setLevel('INFO')
tf.autograph.set_verbosity(0)
import logging
tf.get_logger().setLevel(logging.ERROR)

Read more comments on GitHub >

github_iconTop Results From Across the Web

1016056 – camel-example-cxf-tomcat throws WARNING with ...
Doc Text: If you try to deploy the camel-example-cxf-tomcat quick start, you will encounter a warning with an exception. The example application will...
Read more >
Quickstart guide not working - Google Groups
https://structr.org/quick-start-guide. Somehow it doesn't work MAVEN is ... warning: no description for @throws > [ERROR] * @throws FrameworkException
Read more >
How to create continuations that can throw errors
So, first we'd define the errors we want to throw, then we'd write a newer async version of fetchMessages() using ...
Read more >
Servlet Exception and Error Handling Example Tutorial
Servlet Exception and Error Handling Example Tutorial ... I will write a simple servlet that will throw the ServletException.
Read more >
Warnings - Ads API - Google Developers
To utilize this feature for a method, you'll need to set the enable_warnings field of the corresponding request object. For example, you can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found