Add a private bit to the upload to graph observatory script and the dataset JSON format.

If a dataset is private, it will only show up if it is requested via URL, otherwise it will
not appear in the dropdown.
Change: 127090337
This commit is contained in:
Nikhil Thorat 2016-07-11 07:45:20 -08:00 committed by TensorFlower Gardener
parent 6e27603622
commit cd2162b3ea
2 changed files with 12 additions and 1 deletions
tensorflow/tensorboard/components/tf-graph/demo

View File

@ -110,6 +110,12 @@
"name": "AlexNet",
"path": "alexnet.pbtxt"
},
{
"id": "alexprivate",
"name": "AlexNet Private",
"path": "alexnet.pbtxt",
"private": true
},
{
"name": "TestError404",
"path": "nofile"

View File

@ -123,6 +123,8 @@ Polymer({
}
d3.json(DEMO_DATASETS, function (error, datasets) {
let publicDatasets = [];
if (error) {
console.log('Error loading demo datasets:');
console.log(error);
@ -135,6 +137,8 @@ Polymer({
_.each(datasets, function(dataset, index) {
if (queryParams['graphid'] && dataset.id == queryParams['graphid']) {
selectedDataset = index;
} else if (dataset['private']) {
return;
}
dataset.path = this._normalizePath(dataset.path);
@ -143,8 +147,9 @@ Polymer({
metadata.path = this._normalizePath(metadata.path);
}, this);
}
publicDatasets.push(dataset);
}, this);
this.set('datasets', datasets);
this.set('datasets', publicDatasets);
if (selectedDataset != 0) {
this.set('selectedDataset', selectedDataset);
}