Skip to content

Commit 30dbc10

Browse files
tolga-bjameswex
authored andcommitted
In WIT, set_target sets ground truth feature (#2314)
set_target now sets the ground truth feature in WIT as well. Before, user had to select ground truth feature in Fairness&Performance panel even after setting it in WitConfig.
1 parent 46c510d commit 30dbc10

File tree

2 files changed

+6
-0
lines changed
  • tensorboard/plugins/interactive_inference/witwidget/notebook

2 files changed

+6
-0
lines changed

tensorboard/plugins/interactive_inference/witwidget/notebook/colab/wit.py

+3
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ def infer_mutants(wit_id, details):
148148
wit.multiClass = config['multiclass'];
149149
}}
150150
wit.updateNumberOfModels();
151+
if ('target_feature' in config) {{
152+
wit.selectedLabelFeature = config['target_feature'];
153+
}}
151154
}};
152155
window.updateExamplesCallback = examples => {{
153156
if (!wit.updateExampleContents) {{

tensorboard/plugins/interactive_inference/witwidget/notebook/jupyter/js/lib/wit.js

+3
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ var WITView = widgets.DOMWidgetView.extend({
212212
this.view_.multiClass = config['multiclass'];
213213
}
214214
this.view_.updateNumberOfModels();
215+
if ('target_feature' in config) {
216+
this.view_.selectedLabelFeature = config['target_feature'];
217+
}
215218
},
216219
spriteChanged: function() {
217220
if (!this.setupComplete) {

0 commit comments

Comments
 (0)