Skip to content

Commit 8fe61b0

Browse files
cklukjart
authored andcommitted
Fix the input_pipeline_analyzer plugin for TensorFlow 1.8 (#1126)
1 parent 46a0b7d commit 8fe61b0

File tree

1 file changed

+29
-28
lines changed

1 file changed

+29
-28
lines changed

tensorboard/plugins/profile/input_pipeline_analyzer/input-pipeline-analyzer.html

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,6 @@
3939
#summary-host {
4040
font-weight: bold;
4141
}
42-
.summary-conclusion {
43-
font-weight: bold;
44-
font-style: italic;
45-
color: var(--summary-color, black);
46-
}
47-
.host-conclusion {
48-
font-weight: bold;
49-
font-style: italic;
50-
color: green;
51-
}
5242
.highlighted-text {
5343
text-decoration: underline;
5444
font-weight: bold;
@@ -90,23 +80,29 @@
9080
color: #ff33cc;
9181
text-decoration: underline;
9282
}
83+
#summary_conclusion{
84+
font-weight:bolder;
85+
font-style:italic;
86+
color: var(--summary-color, green);
87+
}
88+
#summary_nextstep{
89+
font-weight:bolder;
90+
font-style:italic;
91+
color:green;
92+
}
93+
#recommendation_title{
94+
font-weight:bolder;
95+
font-style:normal;
96+
color:black;
97+
}
9398
</style>
9499
<div>
95100
<div id="section_summary">
96101
<div id="title_summary">
97102
<p class="section-header"> Section 1: Summary of input-pipeline analysis</p>
98103
</div>
99-
<p id="summary">
100-
<span>The overall performance is </span>
101-
<span class="summary-conclusion">[[_summary_text]]</span>
102-
<span>input-bounded because on average (over all steps) the device has spent </span>
103-
<span><span class="summary-conclusion">[[_infeed_percent_average]]%</span> of time </span>
104-
<span>(standard deviation = [[_infeed_percent_stddev]]) waiting for input data </span>
105-
<span>[see Section 2 below for details].</span>
106-
</p>
107-
<p id="summary-host">
108-
Recommendation for next step: <span class="host-conclusion">[[_host_conclusion]]</span>
109-
</p>
104+
<p><span id="summary_conclusion">[[_summary_conclusion]]</span></p>
105+
<p><span id="recommendation_title">Recommendation for next step: </span><span id="summary_nextstep">[[_summary_nextstep]]</span></p>
110106
</div>
111107
<div id="section_device_side_analysis">
112108
<div id="title_device_side_analysis">
@@ -227,7 +223,8 @@
227223
computed: '_getToggleButtonText(_show_host_side_table)'
228224
},
229225
},
230-
_summary_text: String,
226+
_summary_conclusion: String,
227+
_summary_nextstep: String,
231228
_infeed_percent_average: String,
232229
_infeed_percent_stddev: String,
233230
_infeed_percent_minimum: String,
@@ -236,7 +233,6 @@
236233
_steptime_ms_stddev: String,
237234
_steptime_ms_minimum: String,
238235
_steptime_ms_maximum: String,
239-
_host_conclusion: String,
240236
onClick: function(e) {
241237
this.set('_show_host_side_table', !this._show_host_side_table);
242238
},
@@ -248,9 +244,11 @@
248244
_updateView: function() {
249245
if (this._data == null) return;
250246
var deviceJson = this._data[0];
251-
var hostJson = this._data[1];
252-
var recommendationJson = this._data[2];
253-
this.set('_summary_text', deviceJson.p['summary_text']);
247+
var hostJson = this._data[2];
248+
var recommendationJson = this._data[3];
249+
var conclusion = deviceJson.p['summary_conclusion'];
250+
this.set('_summary_conclusion', conclusion);
251+
this.set('_summary_nextstep', deviceJson.p['summary_nextstep']);
254252
this.set('_infeed_percent_average', deviceJson.p['infeed_percent_average']);
255253
this.set('_infeed_percent_stddev', deviceJson.p['infeed_percent_standard_deviation']);
256254
this.set('_infeed_percent_minimum', deviceJson.p['infeed_percent_minimum']);
@@ -259,8 +257,11 @@
259257
this.set('_steptime_ms_stddev', deviceJson.p['steptime_ms_standard_deviation']);
260258
this.set('_steptime_ms_minimum', deviceJson.p['steptime_ms_minimum']);
261259
this.set('_steptime_ms_maximum', deviceJson.p['steptime_ms_maximum']);
262-
this.set('_host_conclusion', recommendationJson.p['overall']);
263-
this.customStyle['--summary-color'] = deviceJson.p['summary_color'];
260+
if (conclusion.includes('HIGHLY')) {
261+
this.customStyle['--summary-color'] = 'red';
262+
} else if (conclusion.includes('MODERATE')) {
263+
this.customStyle['--summary-color'] = 'orange';
264+
}
264265
this.updateStyles();
265266
this._showDeviceStepChart(deviceJson);
266267
this._showDeviceInfeedChart(deviceJson);

0 commit comments

Comments
 (0)