Skip to content

Instantly share code, notes, and snippets.

@mebaysan
Created April 23, 2024 09:39
Show Gist options
  • Save mebaysan/b853e7a2a0e11ec86b8a9cbe974dce78 to your computer and use it in GitHub Desktop.
Save mebaysan/b853e7a2a0e11ec86b8a9cbe974dce78 to your computer and use it in GitHub Desktop.
Warning ignore while working with Python.
# You can also use this section to suppress warnings generated by your code:
def warn(*args, **kwargs):
pass
import warnings
warnings.warn = warn
warnings.filterwarnings('ignore')
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' # tensorflow INFO and WARNING messages are not printed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment