View source on GitHub
|
Sets the AutoGraph verbosity level.
tf.autograph.set_verbosity(
level, alsologtostdout=False
)
Debug logging in AutoGraph
More verbose logging is useful to enable when filing bug reports or doing more in-depth debugging.
There are two means to control the logging verbosity:
The
set_verbosityfunctionThe
AUTOGRAPH_VERBOSITYenvironment variable
set_verbosity takes precedence over the environment variable.
For example:
import os
import tensorflow as tf
os.environ['AUTOGRAPH_VERBOSITY'] = '5'
# Verbosity is now 5
tf.autograph.set_verbosity(0)
# Verbosity is now 0
os.environ['AUTOGRAPH_VERBOSITY'] = '1'
# No effect, because set_verbosity was already called.
Logs entries are output to absl's
default output,
with INFO level.
Logs can be mirrored to stdout by using the alsologtostdout argument.
Mirroring is enabled by default when Python runs in interactive mode.
View source on GitHub