Skip to content

Conversation

@nfelt
Copy link
Contributor

@nfelt nfelt commented Sep 6, 2018

This PR extends the program.TensorBoard API introduced by #1240 so that it's compatible with internal use of TensorBoard. It makes the following changes:

  • program.TensorBoard() now accepts a server_class parameter specifying a subclass of the new TensorBoardServer abstract class, to customize the serving logic for TensorBoard's WSGI app
  • program.TensorBoard() will now use the new absl flags argparse integration if available so that absl flags get parsed together with the regular argparse ones, and any absl flags from the main module are exposed via TBContext.flags
  • program.TensorBoard() now accepts plugins as either TBPlugin classes (as it was before Migrate TensorBoard to argparse #1240) or TBLoader plugin loader instances, and constructs BasicLoaders automatically for the TBPlugin classes. This saves some boilerplate and makes it easy to do targeted removal of specific plugins from the default set if desired because they aren't wrapped in an undistinguishable BasicLoader.

The corresponding internal changes are previewed in cl/211881012. Together these get the internal sync unblocked.

@nfelt nfelt requested a review from jart September 6, 2018 23:00
@nfelt nfelt merged commit 9cbca7e into tensorflow:master Sep 7, 2018
@nfelt nfelt deleted the tb-server branch September 7, 2018 00:21
wchargin added a commit that referenced this pull request Oct 10, 2019
Summary:
TensorBoard used to have an optional dependency on `absl-py`, so #1240
and #1409 were careful to only import `absl` if it was installed. But as
of #1654 TensorBoard always requires `absl-py`, so we can promote the
conditional import to a normal import.

Test Plan:
Running TensorBoard with no arguments still fails as expected; running
with `--logdir` or `--version` still do the right things, too.

wchargin-branch: absl-always
wchargin added a commit that referenced this pull request Oct 11, 2019
Summary:
TensorBoard used to have an optional dependency on `absl-py`, so #1240
and #1409 were careful to only import `absl` if it was installed. But as
of #1654 TensorBoard always requires `absl-py`, so we can promote the
conditional import to a normal import.

Test Plan:
Running TensorBoard with no arguments still fails as expected; running
with `--logdir` or `--version` still do the right things, too.

wchargin-branch: absl-always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants