Tensorboard: Hide empty panes in TensorBoard

Created on 16 Jun 2017  Â·  3Comments  Â·  Source: tensorflow/tensorboard

Migrated from https://github.com/tensorflow/tensorflow/issues/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

frontend feature

Most helpful comment

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.

All 3 comments

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.)

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.

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

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

Hope it helps! 😃

Was this page helpful?
0 / 5 - 0 ratings