From a1265be650bff7d1d38f0f2f68c10e32c369aedf Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Mon, 28 Oct 2024 12:23:29 +0000 Subject: [PATCH] Get rid of abseil warnings --- tests/tensorflow-notebook/units/unit_tensorflow.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/tensorflow-notebook/units/unit_tensorflow.py b/tests/tensorflow-notebook/units/unit_tensorflow.py index 96446a5d..9271a0e3 100644 --- a/tests/tensorflow-notebook/units/unit_tensorflow.py +++ b/tests/tensorflow-notebook/units/unit_tensorflow.py @@ -1,6 +1,13 @@ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. +import os + import tensorflow as tf +# Suppress logging warnings +# https://stackoverflow.com/a/78803598 +os.environ["GRPC_VERBOSITY"] = "ERROR" +os.environ["GLOG_minloglevel"] = "2" + print(tf.constant("Hello, TensorFlow")) print(tf.reduce_sum(tf.random.normal([1000, 1000])))