anyone knows if there is a method to prevent tensorflow from polluting standard error with gpus' memory allocation log?. I noted that when the following command is executed:
with tf.Session() as sess:
tensorflow prints on standard error a log about memory and gpu resources allocation. Something like:
I tensorflow/core/common_runtime/local_device.cc:25] Local device intra op parallelism threads: 48
Graphics Device pciBusID 0000:02:00.0
Free memory: 11.75GiB
...
For important reasons, I wanna avoid this printing.
How can I disable it? You just need to change the environment variable and put a logging level for tensorflow. Also you can check which level you want for logging and useing them in stead of disabling.
This was recently fixed, and should be available if you upgrade to TensorFlow 0.12 or later.
To disable all logging output from TensorFlow, set the following environment variable before launching Python:
$ export TF_CPP_MIN_LOG_LEVEL=3
$ python ...
You can also adjust the verbosity by changing the value of TF_CPP_MIN_LOG_LEVEL
:
INFO
messages are not printedINFO
and WARNING
messages are not printedINFO
, WARNING
, and ERROR
messages are not printedIf 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