提交 150b4c8e 编写于 作者: D Dan Moldovan 提交者: TensorFlower Gardener

Use vlog rather then the verbosity level, to allow debugging without changing the code.

PiperOrigin-RevId: 225396273
上级 2b442889
......@@ -160,8 +160,7 @@ def do_not_convert(run_as=RunMode.GRAPH, return_dtypes=None):
def converted_call(f, owner, options, *args, **kwargs):
"""Compiles a function call inline. For internal use only."""
if options.verbose >= converter.Verbosity.VERBOSE:
logging.info('Converted call: {}; owner: {}'.format(f, owner))
logging.vlog(logging.DEBUG, 'Converted call: %s; owner: %s', f, owner)
if owner is not None:
if not isinstance(f, str):
......
......@@ -129,8 +129,7 @@ def entity_to_graph(o, program_ctx, arg_values, arg_types):
Raises:
ValueError: if the entity type is not supported.
"""
if program_ctx.options.verbose == converter.Verbosity.VERBOSE:
logging.info('Converting {}'.format(o))
logging.vlog(logging.DEBUG, 'Converting %s', o)
if tf_inspect.isclass(o):
node, name, ns = class_to_graph(o, program_ctx)
......@@ -164,9 +163,9 @@ def entity_to_graph(o, program_ctx, arg_values, arg_types):
program_ctx.add_to_cache(o, node)
if program_ctx.options.verbose == converter.Verbosity.VERBOSE:
logging.info('Compiled output of {}:\n\n{}\n'.format(
o, compiler.ast_to_source(node)))
if logging.get_verbosity() <= logging.DEBUG:
logging.vlog(logging.DEBUG, 'Compiled output of %s:\n\n%s\n', o,
compiler.ast_to_source(node))
if program_ctx.options.recursive:
while True:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册