Skip to content

Commit

Permalink
vz-example-viewer: fix int feature list type (#2266)
Browse files Browse the repository at this point in the history
Summary:
Caught during a Clutz upgrade. From context, it looks like `ints` should
be an `Int64List`, as is already the case in `parseFeature` below.

Test Plan:
This preserves existing behavior. To exercise the codepath, run

```
bazel run //tensorboard/plugins/interactive_inference/tf_interactive_inference_dashboard/demo:agedemoserver
```

then navigate to `/tf-interactive-inference-dashboard/age_demo.html` in
a browser. Select a data point in the plot. In the list of features for
that data point (on the left side of the screen), click the “+” button
immediately below the bottom feature. Add an `Int` feature, and set its
value to some number. Select a different data point, then select the
first data point again, and observe that the new feature and value are
still present.

wchargin-branch: vzev-ints-list-type
  • Loading branch information
wchargin authored May 23, 2019
1 parent cc8e59f commit 555236a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tensorboard/components/vz_example_viewer/vz-example-viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -922,9 +922,9 @@ Polymer({
let jsonFeat: any;
if (this.newFeatureType === INT_FEATURE_NAME) {
const valueList: number[] = [];
const ints = new FloatList();
const ints = new Int64List();
ints.setValueList(valueList);
feat.setInt64List(ints as any); // TODO(#2266): Preserves behavior.
feat.setInt64List(ints);
jsonFeat = {int64List: {value: valueList}};
} else if (this.newFeatureType === FLOAT_FEATURE_NAME) {
const valueList: number[] = [];
Expand Down

0 comments on commit 555236a

Please sign in to comment.