From 555236a7b7e3c4d86afafc0f84d0c5a91384ccf3 Mon Sep 17 00:00:00 2001 From: William Chargin Date: Thu, 23 May 2019 09:39:09 -0700 Subject: [PATCH] vz-example-viewer: fix int feature list type (#2266) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tensorboard/components/vz_example_viewer/vz-example-viewer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorboard/components/vz_example_viewer/vz-example-viewer.ts b/tensorboard/components/vz_example_viewer/vz-example-viewer.ts index 13b04dae261..26b2a2db1e3 100644 --- a/tensorboard/components/vz_example_viewer/vz-example-viewer.ts +++ b/tensorboard/components/vz_example_viewer/vz-example-viewer.ts @@ -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[] = [];