MCPcopy Index your code
hub / github.com/tensorflow/tensorboard / main

Method main

tensorboard/program.py:254–278  ·  view source on GitHub ↗

Blocking main function for TensorBoard. This method is called by `tensorboard.main.run_main`, which is the standard entrypoint for the tensorboard command line program. The configure() method must be called first. Args: ignored_argv: Do not pass. Required

(self, ignored_argv=("",))

Source from the content-addressed store, hash-verified

252 return [arg0]
253
254 def main(self, ignored_argv=("",)):
255 """Blocking main function for TensorBoard.
256
257 This method is called by `tensorboard.main.run_main`, which is the
258 standard entrypoint for the tensorboard command line program. The
259 configure() method must be called first.
260
261 Args:
262 ignored_argv: Do not pass. Required for Abseil compatibility.
263
264 Returns:
265 Process exit code, i.e. 0 if successful or non-zero on failure. In
266 practice, an exception will most likely be raised instead of
267 returning non-zero.
268
269 :rtype: int
270 """
271 self._install_signal_handler(signal.SIGTERM, "SIGTERM")
272 self._fix_mime_types()
273 subcommand_name = getattr(self.flags, _SUBCOMMAND_FLAG)
274 if subcommand_name == _SERVE_SUBCOMMAND_NAME:
275 runner = self._run_serve_subcommand
276 else:
277 runner = self.subcommands[subcommand_name].run
278 return runner(self.flags) or 0
279
280 def _run_serve_subcommand(self, flags):
281 # TODO(#2801): Make `--version` a flag on only the base parser, not `serve`.

Callers 15

testImplicitServeMethod · 0.95
testExplicitServeMethod · 0.95
testSubcommandMethod · 0.95
errors_test.pyFile · 0.45
version_test.pyFile · 0.45
lib_test.pyFile · 0.45
auth_test.pyFile · 0.45
mainFunction · 0.45
lazy_test.pyFile · 0.45

Calls 3

_fix_mime_typesMethod · 0.95
runnerFunction · 0.85

Tested by 5

testImplicitServeMethod · 0.76
testExplicitServeMethod · 0.76
testSubcommandMethod · 0.76
mainFunction · 0.36