Skip to content
Merged
Show file tree
Hide file tree
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
17 changes: 12 additions & 5 deletions tensorboard/components/tf_tensorboard/plugin-dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,20 @@ <h2 id='dialog-title'>[[_title]]</h2>
},
},
openNoTensorFlowDialog() {
this.set(
'_title',
'This plugin is disabled without TensorFlow');
this.set(
'_customMessage',
this.openDialog(
'This plugin is disabled without TensorFlow',
'To enable this plugin in TensorBoard, install TensorFlow with '
+ '"pip install tensorflow" or equivalent.');
},
openOldTensorFlowDialog(version) {
this.openDialog(
'This plugin is disabled without TensorFlow ' + version,
'To enable this plugin in TensorBoard, install TensorFlow '
+ version + ' or greater with "pip install tensorflow" or equivalent.');
},
openDialog(title, message) {
this.set('_title', title);
this.set('_customMessage', message);
this.$.dialog.open();
},
closeDialog() {
Expand Down
3 changes: 3 additions & 0 deletions tensorboard/plugins/profile/profile_plugin_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ def load(self, context):
try:
# pylint: disable=g-import-not-at-top,unused-import
import tensorflow
# Available in TensorFlow 1.14 or later, so do import check
# pylint: disable=g-import-not-at-top,unused-import
from tensorflow.python.eager import profiler_client
except ImportError:
return
# pylint: disable=g-import-not-at-top
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,9 @@ <h3>No profile data was found.</h3>
.request(tf_backend.getRouter().pluginsListing())
.then(plugins => {
if (!(PLUGIN_NAME in plugins)) {
// The plugin was not created
this.$.initialDialog.openNoTensorFlowDialog();
// The plugin was not created and so either didn't have
// TensorFlow or had an old version
this.$.initialDialog.openOldTensorFlowDialog('1.14');
this.set('_isAvailable', false);
} else {
// The plugin was created
Expand Down