Skip to content

Commit 88e4677

Browse files
ckluknfelt
authored andcommitted
Fix the input_pipeline_analyzer plugin for TensorFlow 1.8 (#1126)
1 parent e42849c commit 88e4677

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">
@@ -236,7 +232,8 @@
236232
computed: '_getToggleButtonText(_show_host_side_table)'
237233
},
238234
},
239-
_summary_text: String,
235+
_summary_conclusion: String,
236+
_summary_nextstep: String,
240237
_infeed_percent_average: String,
241238
_infeed_percent_stddev: String,
242239
_infeed_percent_minimum: String,
@@ -245,7 +242,6 @@
245242
_steptime_ms_stddev: String,
246243
_steptime_ms_minimum: String,
247244
_steptime_ms_maximum: String,
248-
_host_conclusion: String,
249245
onClick: function(e) {
250246
this.set('_show_host_side_table', !this._show_host_side_table);
251247
},
@@ -269,9 +265,11 @@
269265
/* Update view according to new data */
270266
_updateView: function() {
271267
var deviceJson = this._data[0];
272-
var hostJson = this._data[1];
273-
var recommendationJson = this._data[2];
274-
this.set('_summary_text', deviceJson.p['summary_text']);
268+
var hostJson = this._data[2];
269+
var recommendationJson = this._data[3];
270+
var conclusion = deviceJson.p['summary_conclusion'];
271+
this.set('_summary_conclusion', conclusion);
272+
this.set('_summary_nextstep', deviceJson.p['summary_nextstep']);
275273
this.set('_infeed_percent_average', deviceJson.p['infeed_percent_average']);
276274
this.set('_infeed_percent_stddev', deviceJson.p['infeed_percent_standard_deviation']);
277275
this.set('_infeed_percent_minimum', deviceJson.p['infeed_percent_minimum']);
@@ -280,8 +278,11 @@
280278
this.set('_steptime_ms_stddev', deviceJson.p['steptime_ms_standard_deviation']);
281279
this.set('_steptime_ms_minimum', deviceJson.p['steptime_ms_minimum']);
282280
this.set('_steptime_ms_maximum', deviceJson.p['steptime_ms_maximum']);
283-
this.set('_host_conclusion', recommendationJson.p['overall']);
284-
this.customStyle['--summary-color'] = deviceJson.p['summary_color'];
281+
if (conclusion.includes('HIGHLY')) {
282+
this.customStyle['--summary-color'] = 'red';
283+
} else if (conclusion.includes('MODERATE')) {
284+
this.customStyle['--summary-color'] = 'orange';
285+
}
285286
this.updateStyles();
286287
this._showDeviceStepChart(deviceJson);
287288
this._showDeviceInfeedChart(deviceJson);

0 commit comments

Comments
 (0)