Skip to content

Commit e27515d

Browse files
authored
Merge branch 'master' into muelerma-hangouts-channel
2 parents ae5a250 + ce3bec3 commit e27515d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

rasa/utils/common.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,15 @@ def update_socketio_log_level() -> None:
104104
def update_tensorflow_log_level() -> None:
105105
"""Set the log level of Tensorflow to the log level specified in the environment
106106
variable 'LOG_LEVEL_LIBRARIES'."""
107+
108+
# Disables libvinfer, tensorRT, cuda, AVX2 and FMA warnings (CPU support). This variable needs to be set before the
109+
# first import since some warnings are raised on the first import.
110+
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2"
111+
107112
import tensorflow as tf
108113

109114
log_level = os.environ.get(ENV_LOG_LEVEL_LIBRARIES, DEFAULT_LOG_LEVEL_LIBRARIES)
110115

111-
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2" # disables AVX2 FMA warnings (CPU support)
112116
if log_level == "DEBUG":
113117
tf_log_level = tf.compat.v1.logging.DEBUG
114118
elif log_level == "INFO":

0 commit comments

Comments
 (0)