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=("",))
| 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`. |