opened
msusol
username_0
Projector Demo does not properly provide metadata for the tensors (vocabulary). 
https://github.com/tensorflow/tensorboard/blob/master/tensorboard/plugins/projector/projector_demo.py

encoder.subwords does not match the dimension of the weights (tensors).

"Number of tensors (8184) do not match the number of lines in metadata (7928)."

$ print(len(weights.numpy()))
8184
$ print(len(encoder.subwords))
7928

## Environment information (required)

tested from internal colab

## Issue description

Number of tensors (8184) do not match the number of lines in metadata (7928).
projector_demo.py does not have proper metadata
issue
created
wchargin
username_1
Hi @username_0! Thanks for the report. I can reproduce this: running the
demo script via `python` (not Bazel) in a new virtualenv with
`tensorflow` and `tensorflow-datasets`, then pointing `tensorboard` at
the resulting logdir, I see both “Number of tensors (8184) do not match
the number of lines in metadata (7928)” in a toast at bottom-left and
“TypeError: Cannot read property 'toString' of undefined” in a centered
modal:

![Screenshot of failure messages][ss]

@hfiller, could you please take a look?

<details>

<summary>Output of `pip freeze` for repro virtualenv</summary>

```
absl-py==0.9.0
astor==0.8.1
attrs==19.3.0
cachetools==4.0.0
certifi==2019.11.28
chardet==3.0.4
dill==0.3.1.1
future==0.18.2
gast==0.2.2
google-auth==1.12.0
google-auth-oauthlib==0.4.1
google-pasta==0.2.0
googleapis-common-protos==1.51.0
grpcio==1.27.2
h5py==2.10.0
idna==2.9
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
Markdown==3.2.1
numpy==1.18.2
oauthlib==3.1.0
opt-einsum==3.2.0
pkg-resources==0.0.0
promise==2.3
protobuf==3.11.3
pyasn1==0.4.8
pyasn1-modules==0.2.8
requests==2.23.0
requests-oauthlib==1.3.0
rsa==4.0
scipy==1.4.1
six==1.14.0
tensorboard==2.1.1
tensorflow==2.1.0
tensorflow-datasets==2.1.0
tensorflow-estimator==2.1.0
tensorflow-metadata==0.21.1
termcolor==1.1.0
tqdm==4.44.1
urllib3==1.25.8
Werkzeug==1.0.0
wrapt==1.12.1
```

</details>

[ss]: https://user-images.githubusercontent.com/4317806/77939981-d2fc3580-726c-11ea-9f1d-18b072082b13.png
comment
created
wchargin
username_1
FWIW, I can also reproduce this against today’s nightlies:

<details>

<summary>`pip freeze`</summary>

```
absl-py==0.9.0
astunparse==1.6.3
attrs==19.3.0
cachetools==4.0.0
certifi==2019.11.28
chardet==3.0.4
dill==0.3.1.1
future==0.18.2
gast==0.3.3
google-auth==1.12.0
google-auth-oauthlib==0.4.1
google-pasta==0.2.0
googleapis-common-protos==1.51.0
grpcio==1.27.2
h5py==2.10.0
idna==2.9
Keras-Preprocessing==1.1.0
Markdown==3.2.1
numpy==1.18.2
oauthlib==3.1.0
opt-einsum==3.2.0
pkg-resources==0.0.0
promise==2.3
protobuf==3.11.3
pyasn1==0.4.8
pyasn1-modules==0.2.8
requests==2.23.0
requests-oauthlib==1.3.0
rsa==4.0
scipy==1.4.1
six==1.14.0
tb-nightly==2.3.0a20200330
tensorboard-plugin-wit==1.6.0.post2
tensorflow-datasets==2.1.0
tensorflow-metadata==0.21.1
termcolor==1.1.0
tf-estimator-nightly==2.3.0.dev2020033001
tf-nightly==2.2.0.dev20200330
tqdm==4.44.1
urllib3==1.25.8
Werkzeug==1.0.0
wrapt==1.12.1
```

</details>

In nightly, I don’t get the “Cannot read property 'toString' of
undefined” error, but I still see the “Number of tensors (8184) do not
match the number of lines in metadata (7928)” toast.
comment