When I use nosetests
with some test scripts with TensorFlow, I get's lots of debugging output from TensorFlow:
az@azmacbookpro ~/P/crnn> nosetests tests/test_TFUtil.py
Level 1:tensorflow:Registering FakeQuantWithMinMaxArgs (<function _FakeQuantWithMinMaxArgsGradient at 0x112306048>) in gradient.
Level 1:tensorflow:Registering FakeQuantWithMinMaxVars (<function _FakeQuantWithMinMaxVarsGradient at 0x1126ba9d8>) in gradient.
Level 1:tensorflow:Registering FakeQuantWithMinMaxVarsPerChannel (<function _FakeQuantWithMinMaxVarsPerChannelGradient at 0x1126ba950>) in gradient.
...
Level 1:tensorflow:Registering Fact (<function _set_call_cpp_shape_fn.<locals>.call_without_requiring at 0x1122c0268>) in default shape functions.
Level 1:tensorflow:Registering TensorSummary (None) in gradient.
Level 1:tensorflow:Registering queue_runners ((<class 'tensorflow.core.protobuf.queue_runner_pb2.QueueRunnerDef'>, <function QueueRunner.to_proto at 0x1130687b8>, <function QueueRunner.from_proto at 0x113068840>)) in proto functions.
E
======================================================================
...
-------------------- >> begin captured logging << --------------------
tensorflow: Level 1: Registering FakeQuantWithMinMaxArgs (<function _FakeQuantWithMinMaxArgsGradient at 0x112306048>) in gradient.
tensorflow: Level 1: Registering FakeQuantWithMinMaxVars (<function _FakeQuantWithMinMaxVarsGradient at 0x1126ba9d8>) in gradient.
tensorflow: Level 1: Registering FakeQuantWithMinMaxVarsPerChannel (<function _FakeQuantWithMinMaxVarsPerChannelGradient at 0x1126ba950>) in gradient.
...
tensorflow: Level 1: Registering queue_runners ((<class 'tensorflow.core.protobuf.queue_runner_pb2.QueueRunnerDef'>, <function QueueRunner.to_proto at 0x1130687b8>, <function QueueRunner.from_proto at 0x113068840>)) in proto functions.
--------------------- >> end captured logging << ---------------------
----------------------------------------------------------------------
...
That verbose debug output from TensorFlow might be useful in some case but very probably not for my cases, or at least definitely not the tests in this specific file.
How can I disable them?
I'm doing this now:
import logging
logging.getLogger('tensorflow').disabled = True
You could try with nosetests tests/test_TFUtil.py --nologcapture
.
P.S. could you please post some code from the test file? Thanks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With