kstaats / karoo_gp

A Genetic Programming platform for Python with TensorFlow for wicked-fast CPU and GPU support.
Other
159 stars 61 forks source link

Make the tf log level configurable and set it to 2. #64

Closed ezio-melotti closed 2 years ago

ezio-melotti commented 2 years ago

This PR does two things:

  1. it sets the default TensorFlow logging level to 2 (i.e. only ERRORs), hiding the following warning:
    2022-05-29 13:41:43.094655: W tensorflow/stream_executor/platform/default/dso_loader.cc:64]
      Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
    2022-05-29 13:41:43.094696: I tensorflow/stream_executor/cuda/cudart_stub.cc:29]
      Ignore above cudart dlerror if you do not have a GPU set up on your machine.
  2. it makes the logging level configurable by setting the TF_CPP_MIN_LOG_LEVEL env var. For example, you can show all the TF warnings by running TF_CPP_MIN_LOG_LEVEL=1 karoo-gp.py ...