Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy up the tensorboard.main API #620

Merged
merged 1 commit into from
Oct 5, 2017
Merged

Tidy up the tensorboard.main API #620

merged 1 commit into from
Oct 5, 2017

Conversation

jart
Copy link
Contributor

@jart jart commented Oct 5, 2017

This change will make it easier to write plugins with custom builds of
TensorBoard. The plugin author will no longer be required to explicitly list
all the first-party plugins, as they can now be inherited via the
tensorboard.default module.

The tensorboard.program module has also been introduced. This module gives a
permanent home to all the APIs that crept into tensorboard.main over the
years. After this change, the tensorboard.main module is nothing more than
glue between the program and default modules.

The special-case code in main.py that the debugger plugin was using, has now
been relocated into the debugger plugin's directory.

This change is backwards-compatible. Delegates have been added for relocated
functions that will log a deprecation warning if used.

Proof that this is good

This change, along with #611 which was recently submitted, have allowed me to write tensorflow/tensorboard-plugin-example#18 which removed about a hundred lines of boilerplate the custom tensorboard building process.

This change will make it easier to write plugins with custom builds of
TensorBoard. The plugin author will no longer be required to explicitly list
all the first-party plugins, as they can now be inherited via the
`tensorboard.default` module.

The `tensorboard.program` module has also been introduced. This module gives a
permanent home to all the APIs that crept into `tensorboard.main` over the
years. After this change, the `tensorboard.main` module is nothing more than
glue between the `program` and `default` modules.

The special-case code in main.py that the debugger plugin was using, has now
been relocated into the debugger plugin's directory.

This change is backwards-compatible. Delegates have been added for relocated
functions that will log a deprecation warning if used.
Copy link
Member

@chihuahua chihuahua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. A clean main function seems worth it.

@jart jart merged commit bb26115 into tensorflow:master Oct 5, 2017
@jart jart deleted the main-api branch October 5, 2017 21:07
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