Skip to content

Commit

Permalink
Make step text depend on steps array (tensorflow#552)
Browse files Browse the repository at this point in the history
Previously, the text atop image loaders (displaying step and wall time)
would only depend on the step index. This was problematic because during
reloads, the array of steps changes, but the number of sampled steps
remains the same, so the text above individual images would not update.

Fixes tensorflow#550.

Test plan: Run mnist_with_summaries.py:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/tutorials/mnist/mnist_with_summaries.py

Start TensorBoard pointed at
/tmp/tensorflow/mnist/logs/mnist_with_summaries, and navigate to the
image dashboard. Notice that the step updates now when TensorBoard
reloads, both during the periodic reload and during manually triggered
reloads.
  • Loading branch information
chihuahua authored and jart committed Sep 23, 2017
1 parent 7e51652 commit 2ce22db
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,11 @@
},
_stepValue: {
type: Number,
computed: "_computeStepValue(_stepIndex)",
computed: "_computeStepValue(_steps, _stepIndex)",
},
_currentWallTime: {
type: Number,
computed: "_computeCurrentWallTime(_stepIndex)",
computed: "_computeCurrentWallTime(_steps, _stepIndex)",
},
_maxStepIndex: {
type: Number,
Expand Down Expand Up @@ -280,11 +280,11 @@
_computeHasMultipleSteps(steps) {
return !!steps && steps.length > 1;
},
_computeStepValue(stepIndex) {
return this._steps[stepIndex].step;
_computeStepValue(steps, stepIndex) {
return steps[stepIndex].step;
},
_computeCurrentWallTime(stepIndex) {
return formatDate(this._steps[stepIndex].wall_time);
_computeCurrentWallTime(steps, stepIndex) {
return formatDate(steps[stepIndex].wall_time);
},
_computeMaxStepIndex(steps) {
return steps.length - 1;
Expand Down

0 comments on commit 2ce22db

Please sign in to comment.