Code Monkey home page Code Monkey logo

Comments (3)

teamdandelion avatar teamdandelion commented on September 7, 2024 7

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.

from tensorboard.

Jasonnor avatar Jasonnor commented on September 7, 2024 1

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

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

Hope it helps! πŸ˜ƒ

from tensorboard.

wchargin avatar wchargin commented on September 7, 2024

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

from tensorboard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.