MCPcopy Index your code
hub / github.com/tensorflow/models / _format_output

Function _format_output

orbit/controller.py:47–54  ·  view source on GitHub ↗

Formats `output`, either on one line, or indented across multiple lines.

(output, indent=4)

Source from the content-addressed store, hash-verified

45
46
47def _format_output(output, indent=4):
48 """Formats `output`, either on one line, or indented across multiple lines."""
49 formatted = pprint.pformat(output)
50 lines = formatted.splitlines()
51 if len(lines) == 1:
52 return formatted
53 lines = [" " * indent + line for line in lines]
54 return "\n" + "\n".join(lines)
55
56
57Action = Callable[[runner.Output], None]

Callers 2

evaluateMethod · 0.85
_train_n_stepsMethod · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected