Skip to content

Conversation

@bmd3k
Copy link
Contributor

@bmd3k bmd3k commented Mar 9, 2020

  • Motivation for features / changes

Allow an administrator of a Tensorboard to mark certain plugins as "experimental" and hidden to users by default. Users would then need to add query parameter "experimentalPlugin=" to the URL to see the experimental plugin.

  • Technical description of changes

Introduce simpler marker class ExperimentalPlugin which acts as an annotation on either TBPlugin or TBLoader that indicates a plugin is experimental. TensorBoardWSGIApp() uses isinstance() to determine if a plugin is experimental and passes the information as a list of names, "experimental_plugins", in its call to TensorBoardWSGI()

TensorBoardWSGI._serve_plugins_listing() filters out plugins that are included in experimental_plugins but are not specified in an experimentalPlugin query parameter.

There is logic in createRouter() that forward "experimentalPlugin" query parameter values from the original TensorBoard request to the call to the plugins_listing endpoint.

  • Screenshots of UI changes

Using an example where "images" and "graphs" are marked as experimental.

No query parameters:
image

"experimentalPlugin=images" query parameter:
image

"experimentalPlugin=images&experimentalPlugin=graphs" query parameters:
image

  • Detailed steps to verify changes work correctly (as executed by you)

Modify the list of plugins in default.py to use ExperimentalPlugin. Modify Images, Graphs,a nd Debugger plugins (a mix of TBPlugin and TBLoader):

class ExperimentalImagePlugin(
images_plugin.ImagesPlugin,
application.ExperimentalPlugin
):
pass

class ExperimentalGraphsPlugin(
graphs_plugin.GraphsPlugin,
application.ExperimentalPlugin,
):
pass

class ExperimentalDebuggerPluginLoader(
debugger_plugin_loader.DebuggerPluginLoader,
application.ExperimentalPlugin
):
pass

Start server.

Open "http://localhost:6006/" without query parameters. Note that "Images" and "Graphs" do not appear as plugins.

Open "http://localhost:6006/?experimentalPlugin=images&experimentalPlugin=graphs&experimentalPlugin=debugger". Note that "Images", "Graphs", and "Debugger" appear as plugins.

bmd3k added 6 commits March 4, 2020 11:11
Adds initial experimental plugins support in application layer. A list
of experimental_plugins can be specified (by plugin name). When handling
plugins_listing requests, experimental_plugins are included if they are
specified using the expplugin query parameter.

Note: This commit does not yet include the work to pass the query
parameters in the plugins_listing request.
Add support to pass expplugin query parameters from the page's URL to
the plugins_listing request.
Instead of having experimental_plugins argument on TensorBoardWSGIApp()
and standard_tensorboard_wsgi(), a plugin is marked as experimental if
its TBLoader instance is an instance of ExperimentalPluginLoader.
@bmd3k bmd3k changed the title Experimental plugins tbloader Experimental plugins specified using ExperimentalPluginLoader Mar 9, 2020
@bmd3k bmd3k requested a review from wchargin March 9, 2020 16:53
bmd3k added 2 commits March 9, 2020 16:27
Now have ExperimentPlugin as a marker that can be used either on
TBPlugin or TBLoader types.
@bmd3k bmd3k requested a review from wchargin March 9, 2020 20:38
Copy link
Contributor

@wchargin wchargin left a comment

Choose a reason for hiding this comment

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

Great; glad to see that the suggestion had a few side benefits!

Move ExperimentalPlugin to its own file.
@bmd3k bmd3k marked this pull request as ready for review March 10, 2020 01:22
Copy link
Contributor

@wchargin wchargin left a comment

Choose a reason for hiding this comment

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

Looks great; thanks!

@bmd3k bmd3k merged commit a47172f into tensorflow:master Mar 10, 2020
@wchargin wchargin mentioned this pull request Mar 10, 2020
@bmd3k bmd3k deleted the experimental-plugins-tbloader branch March 16, 2020 14:27
@bmd3k bmd3k restored the experimental-plugins-tbloader branch March 20, 2020 11:50
@bmd3k bmd3k deleted the experimental-plugins-tbloader branch March 20, 2020 11:50
stephanwlee added a commit to stephanwlee/tensorboard that referenced this pull request Mar 25, 2020
Using the new experimentPlugin mechanism (tensorflow#3344), we will control
whether to show a plugin or not.

Please use
`http://localhost:6006/ng_index.html?experimentalPlugin=debugger-v2` to
see the debugger-v2.
stephanwlee added a commit that referenced this pull request Mar 26, 2020
Using the new experimentPlugin mechanism (#3344), we will control
whether to show a plugin or not.

Please use
`http://localhost:6006/ng_index.html?experimentalPlugin=debugger-v2` to
see the debugger-v2 in the future.
bileschi pushed a commit to bileschi/tensorboard that referenced this pull request Apr 15, 2020
Using the new experimentPlugin mechanism (tensorflow#3344), we will control
whether to show a plugin or not.

Please use
`http://localhost:6006/ng_index.html?experimentalPlugin=debugger-v2` to
see the debugger-v2 in the future.
bileschi pushed a commit that referenced this pull request Apr 15, 2020
Using the new experimentPlugin mechanism (#3344), we will control
whether to show a plugin or not.

Please use
`http://localhost:6006/ng_index.html?experimentalPlugin=debugger-v2` to
see the debugger-v2 in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants