Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit 7ba8937

Browse files
author
DEKHTIARJonathan
committed
[Bencharming-Py] TF Logging Fix
1 parent 344ad16 commit 7ba8937

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tftrt/benchmarking-python/benchmark_runner.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import copy
88
import csv
99
import json
10-
import logging
10+
import logging as _logging
1111
import os
1212
import sys
1313
import time
@@ -21,7 +21,6 @@
2121

2222
from tensorflow.python.compiler.tensorrt import trt_convert as trt
2323
from tensorflow.python.framework.errors_impl import OutOfRangeError
24-
from tensorflow.python.platform import tf_logging
2524
from tensorflow.python.saved_model import signature_constants
2625
from tensorflow.python.saved_model import tag_constants
2726

@@ -85,8 +84,9 @@ def __init__(self, args):
8584
# Hide unnecessary INFO CPP Logs
8685
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2"
8786

88-
# Hide unnecessary DEBUG Python Logs
89-
tf_logging.set_verbosity(tf_logging.INFO)
87+
# Hide unnecessary TensorFlow DEBUG Python Logs
88+
_logging.getLogger("tensorflow").setLevel(_logging.INFO)
89+
_logging.disable(_logging.WARNING)
9090

9191
# TensorFlow can execute operations synchronously or asynchronously.
9292
# If asynchronous execution is enabled, operations may return

0 commit comments

Comments
 (0)