Fix incorrect frame numbers in tf_logging.warn

This fix tries to address the issue raised in 27848 where
the frame numbers in tf_logging.warn is incorrect in python 3.

The reason was that in python 2, `warn = warning` but in python 3,
an additional wrapper has been added to deprecate the warn. For
that reason one additional frame has been added, thus causing
incorrect output in the log.

This fix fixes 27848.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
Yong Tang 2019-04-15 19:25:32 +00:00
parent 0412677861
commit 7ae75b2cd1

View File

@ -158,7 +158,7 @@ def info(msg, *args, **kwargs):
@tf_export(v1=['logging.warn'])
def warn(msg, *args, **kwargs):
get_logger().warn(msg, *args, **kwargs)
get_logger().warning(msg, *args, **kwargs)
@tf_export(v1=['logging.warning'])