tensorboard
tensorboard copied to clipboard
Projector plugin UI not updated when data proto changes
When the data proto changes, the DataPanel's dataProvider attribute changes, but the selectedRun attribute will still have the value "proto", and therefore a call to DataPanel._selectedRunChanged() is never triggered. Consequently the projector UI still displays the old proto.
One possible solution is to change DataPanel.initialize() in vz-projector-data-panel.ts as follows:
initialize(projector: Projector, dp: DataProvider) {
this.projector = projector;
let dataProviderSame = this.dataProvider == dp;
this.dataProvider = dp;
this.setupUploadButtons();
// Tell the projector whenever the data normalization changes.
// Unknown why, but the polymer checkbox button stops working as soon as
// you do d3.select() on it.
this.querySelector('#normalize-data-checkbox')
.addEventListener('change', () => {
this.projector.setNormalizeData(this.normalizeData);
});
let forceCategoricalColoringCheckbox =
this.querySelector('#force-categorical-checkbox');
forceCategoricalColoringCheckbox.addEventListener('change', () => {
this.setForceCategoricalColoring(
(forceCategoricalColoringCheckbox as HTMLInputElement).checked);
});
// Get all the runs.
this.dataProvider.retrieveRuns(runs => {
this.runNames = runs;
// Choose the first run by default.
if (this.runNames.length > 0) {
let selectedRunSame = this.selectedRun == runs[0];
this.selectedRun = runs[0];
if (selectedRunSame && !dataProviderSame) {
this._selectedRunChanged();
}
}
});
}
Hmm, I'm trying to repro. How are you changing the data proto?