Fix verbosity in interactive prompts.

PiperOrigin-RevId: 233482282
This commit is contained in:
Dan Moldovan 2019-02-11 14:42:30 -08:00 committed by TensorFlower Gardener
parent 8039f40966
commit d584984e82
2 changed files with 3 additions and 1 deletions

View File

@ -45,4 +45,4 @@ def report_internal_error(entity, exception):
'Unexpected error transforming %s. If you believe this is due to a bug,'
' please set the verbosity to 10 (on Linux, `export '
'AUTOGRAPH_VERBOSITY=10`) and attach the full output when filing the bug '
'report. Caused by %s' % (entity, exception))
'report. Caused by: %s' % (entity, exception))

View File

@ -136,6 +136,8 @@ def log(level, msg, *args, **kwargs):
def warn(msg, *args, **kwargs):
logging.warn(msg, *args, **kwargs)
if echo_log_to_stdout:
print('WARNING:', msg % args)
def warn_first_n(msg, *args, **kwargs):