Skip to content

Hide empty panes in TensorBoard #40

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

Open
teamdandelion opened this issue Jun 16, 2017 · 3 comments
Open

Hide empty panes in TensorBoard #40

teamdandelion opened this issue Jun 16, 2017 · 3 comments

Comments

@teamdandelion
Copy link

Migrated from tensorflow/tensorflow#6768 (there is some addl. discussion there)

When filtering runs, empty panes show up if a hidden run has a summary in a scope that the visible runs don't have. This makes TensorBoard very messy when comparing different machine learning models with different variable scopes, and so on. Could an option to hide empty panes be added?

Example (note the empty LSTM scope):
image

@wchargin
Copy link
Contributor

There are two ways to do this:

  • Make the categorizer not output empty categories.
  • Make the dashboards not render empty categories.

The first approach would lead to our standard Polymer-induced data
binding issues (as described in, e.g., #170), so we should try not to do
this.

The second approach would be possible at the cost of additional plugin
code:

diff --git a/tensorboard/plugins/scalar/tf_scalar_dashboard/tf-scalar-dashboard.html b/tensorboard/plugins/scalar/tf_scalar_dashboard/tf-scalar-dashboard.html
index c99eae1..c558ec2 100644
--- a/tensorboard/plugins/scalar/tf_scalar_dashboard/tf-scalar-dashboard.html
+++ b/tensorboard/plugins/scalar/tf_scalar_dashboard/tf-scalar-dashboard.html
@@ -127,6 +127,7 @@ limitations under the License.
           </paper-input>
           <template is="dom-repeat" items="[[_categories]]" as="category">
             <tf-category-pane category="[[category]]">
+              <template is="dom-if" if="[[!category.empty]]">
                 <tf-paginated-view
                   items="[[category.items]]"
                   pages="{{category._pages}}"
@@ -151,6 +152,7 @@ limitations under the License.
                     </template>
                   </template>
                 </tf-paginated-view>
+              </template>
             </tf-category-pane>
           </template>
         </template>

(category.empty would need to be added to the categorizer output, but
that's easy.)

(That immediate area already goes four templates deep, but that doesn't
necessarily mean that this is the wrong thing to do.)

@teamdandelion
Copy link
Author

I support this approach. True, it does make the boilerplate that all plugins should copypasta a little more verbose (I wish we could abstract it away, but c'est la vie). But I think the added complexity is low, and it will make a better user experience.

@Jasonnor
Copy link

Hello there, I write a simple chrome extension for hiding empty panes/scalars.

https://github.com/Jasonnor/tensorboard-empty-scalar-hider

Hope it helps! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants