-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Experimental plugins specified using ExperimentalPluginLoader #3344
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
Merged
bmd3k
merged 12 commits into
tensorflow:master
from
bmd3k:experimental-plugins-tbloader
Mar 10, 2020
Merged
Experimental plugins specified using ExperimentalPluginLoader #3344
bmd3k
merged 12 commits into
tensorflow:master
from
bmd3k:experimental-plugins-tbloader
Mar 10, 2020
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
commented
Mar 9, 2020
wchargin
reviewed
Mar 9, 2020
Now have ExperimentPlugin as a marker that can be used either on TBPlugin or TBLoader types.
wchargin
approved these changes
Mar 9, 2020
Contributor
wchargin
left a comment
There was a problem hiding this 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!
nfelt
approved these changes
Mar 9, 2020
Move ExperimentalPlugin to its own file.
wchargin
approved these changes
Mar 10, 2020
Contributor
wchargin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great; thanks!
Closed
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.
Using an example where "images" and "graphs" are marked as experimental.
No query parameters:

"experimentalPlugin=images" query parameter:

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

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.