Simple python package to shut up Tensorflow warnings and logs.
Project description
Simple python package to shut up Tensorflow warnings and logs.
How do I install this package?
As usual, just download it using pip:
pip install silence_tensorflow
Tests Coverage
Since some software handling coverages sometime get slightly different results, here’s three of them:
How do I use it?
You only need to import the package before import Tensorflow:
import silence_tensorflow
import tensorflow as tf
...
# your code
How does this work under the hood?
This package will set the KMP_AFFINITY system variable to “noverbose”, TF_CPP_MIN_LOG_LEVEL to level 2 (only errors logged) and silence both FutureWarning and FutureWarning.
If you need a custom value for KMP_AFFINITY you should reset it after importing the package, as follows:
import os
backup = os.environ["KMP_AFFINITY"]
import silence_tensorflow
os.environ["KMP_AFFINITY"] = backup
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file silence_tensorflow-1.0.1.tar.gz
.
File metadata
- Download URL: silence_tensorflow-1.0.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.13.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a2dd14f8dcc53bed6d05b862f87e7b195287fc1ee3d9ad83bb4d7fb84ad7926 |
|
MD5 | 846f6e103e6bdf69d765cedbffa5636a |
|
BLAKE2b-256 | 5239a1dd1077d31c6a06903c6a30ec6b2c7332904d7894ef38413c23fb2078f4 |