Skip to content
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

Make scalars is_active short circuit if apt #621

Merged
merged 2 commits into from
Oct 5, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tensorboard/plugins/scalar/scalars_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ def get_plugin_apps(self):

def is_active(self):
"""The scalars plugin is active iff any run has at least one scalar tag."""
return bool(self._multiplexer) and any(self.index_impl().values())
if not self._multiplexer:
return False

return bool(self._multiplexer.PluginRunToTagToContent(metadata.PLUGIN_NAME))

def index_impl(self):
"""Return {runName: {tagName: {displayName: ..., description: ...}}}."""
Expand Down