Skip to content

Commit

Permalink
Merge branch 'master' of github.com:tensorflow/tensorboard into debug…
Browse files Browse the repository at this point in the history
…ger-v1-removal
  • Loading branch information
caisq committed Aug 14, 2020
2 parents cf80aab + 7e06535 commit a6ee436
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
Expand Up @@ -156,9 +156,8 @@ class TfRunsSelector extends LegacyElementMixin(PolymerElement) {

@property({
type: String,
readOnly: true,
})
_dataLocationDelimiterPattern: string = '[/=_,-]';
readonly _dataLocationDelimiterPattern: string = '[/=_,-]';

@property({
type: Object,
Expand Down
Expand Up @@ -186,7 +186,7 @@ class TfHparamsSessionGroupDetails extends mixinBehaviors(
}
@observe('sessionGroup.*')
_sessionGroupChanged() {
if (!this.sessionGroup) {
if (!this.sessionGroup || Object.keys(this.sessionGroup).length == 0) {
this._indexOfSession = new Map();
this._sessionGroupNameHash = 0;
} else {
Expand Down Expand Up @@ -222,7 +222,11 @@ class TfHparamsSessionGroupDetails extends mixinBehaviors(
// Returns an array of the tensorboard 'runs' and 'tags' corresponding to
// the given metric in each of the sessions in the given session group.
_computeSeriesForSessionGroupMetric(sessionGroup, metricInfo) {
if (sessionGroup === null || metricInfo === null) {
if (
sessionGroup === null ||
Object.keys(sessionGroup).length == 0 ||
metricInfo === null
) {
return [];
}
return sessionGroup.sessions
Expand Down
Expand Up @@ -40,7 +40,7 @@ class TfHparamsTableView extends LegacyElementMixin(PolymerElement) {
</template>
</vaadin-grid-column>
<template is="dom-if" if="[[enableShowMetrics]]">
<vaadin-grid-column flex-grow="0" width="5em" resizable="">
<vaadin-grid-column flex-grow="0" autoWidth="" resizable="">
<template class="header">
<div class="table-header table-cell">Show Metrics</div>
</template>
Expand Down Expand Up @@ -175,6 +175,7 @@ class TfHparamsTableView extends LegacyElementMixin(PolymerElement) {
_sessionGroupHParam(sessionGroup, hparam) {
if (
sessionGroup == null ||
Object.keys(sessionGroup).length == 0 ||
!Object.prototype.hasOwnProperty.call(sessionGroup.hparams, hparam)
) {
return '';
Expand All @@ -184,8 +185,8 @@ class TfHparamsTableView extends LegacyElementMixin(PolymerElement) {
// Returns the metric value of the given sessionGroup. The value is
// returned as a string suitable for display.
_sessionGroupMetric(sessionGroup, metricName) {
if (sessionGroup == null) {
return null;
if (sessionGroup == null || Object.keys(sessionGroup).length == 0) {
return '';
}
for (let i = 0; i < sessionGroup.metricValues.length; ++i) {
let metricVal = sessionGroup.metricValues[i];
Expand Down

0 comments on commit a6ee436

Please sign in to comment.