Open fmgs31 opened 3 years ago
@fmgs31, In order to expedite the trouble-shooting process, please provide a code snippet to reproduce the issue reported here. Thanks!
@fmgs31, Can you please respond to the above comment. Thanks!
Sure, sorry for the delay.
Set the content of projector_config.pbtxt to:
embeddings {
tensor_name: "default:00000"
tensor_path: "tensors.tsv"
metadata_path: "metadata.tsv"
}
import numpy as np
import pandas as pd
metadata = pd.DataFrame({'label':np.array(['a', 'b', 'c', 'd'])}, ) embeddings = pd.DataFrame({'d1':np.array([10,20,30,40]), 'd2':np.array([10,20,30,40]), 'd3':np.array([10,20,30,40])})
embeddings.to_csv('logs/tensors.tsv', sep = '\t', header=False, index=False) metadata.to_csv('logs/metadata.tsv', sep = '\t')
- Execute "tensoboard --logdir logs". Open the projector. Check the 4 data points. Check the labels 'a', 'b', 'c', 'd'
- Run:
import numpy as np import pandas as pd
metadata = pd.DataFrame({'label':np.array(['x', 'y'])}, ) embeddings = pd.DataFrame({'d1':np.array([1,0]), 'd2':np.array([0,0]), 'd3':np.array([1,1])})
embeddings.to_csv('logs/tensors.tsv', sep = '\t', header=False, index=False) metadata.to_csv('logs/metadata.tsv', sep = '\t')
- Refresh the projector page. The 4 old data points are there. The labels are new. Some points don't have labels. Error is displayed when after the refresh.
- Restart the tensorboard server
- Open the projector. The new 2 points are now shown with the new labels. The error has gone.
@fmgs31,
When trying to reproduce your issue, I get the message, "No Dashboards are Active"
on the Tensorboard
screen. Can you please help us to reproduce your issue by adding the relevant code in this Gist. Thanks!
Actually, can see the same error you are mention in Gist. There is actually no checkpoint there (this is not using tensorflow but pytorch). My environment there is tensorboard version 2.3.0. (Which version is the one in the notebook?)
I installed tensorboard via 'pip install tensorboard' Followed this instructions.
By the way, this is a another form for my previous code (the results are the same, but may help understanding the context).
import numpy as np
from torch.utils.tensorboard import SummaryWriter
# Data A
# 4 data points
embeddings = np.array([[10, 10, 10],
[20, 20, 20],
[30, 30, 30],
[40, 40, 40]])
metadata = ['a', 'b', 'c', 'd']
# Data B
# 2 data points
# embeddings = np.array([[1, 0, 1],
# [0, 0, 1]])
# metadata = ['x', 'y']
summary_writer = SummaryWriter('logs')
summary_writer.add_embedding(embeddings, metadata=metadata)
Environment information (required)
Diagnostics
Diagnostics output
`````` --- check: autoidentify INFO: diagnose_tensorboard.py version ad749c17953187cae68d6c455e8b3fabd3e69096 --- check: general INFO: sys.version_info: sys.version_info(major=3, minor=7, micro=6, releaselevel='final', serial=0) INFO: os.name: nt INFO: os.uname(): N/A INFO: sys.getwindowsversion(): sys.getwindowsversion(major=10, minor=0, build=18363, platform=2, service_pack='') --- check: package_management INFO: has conda-meta: True INFO: $VIRTUAL_ENV: None --- check: installed_packages INFO: installed: tensorboard==2.4.0 WARNING: no installation among: ['tensorflow', 'tensorflow-gpu', 'tf-nightly', 'tf-nightly-2.0-preview', 'tf-nightly-gpu', 'tf-nightly-gpu-2.0-preview'] WARNING: no installation among: ['tensorflow-estimator', 'tensorflow-estimator-2.0-preview', 'tf-estimator-nightly'] --- check: tensorboard_python_version INFO: tensorboard.version.VERSION: '2.4.0' --- check: tensorflow_python_version Traceback (most recent call last): File "diagnose_tensorboard.py", line 495, in main suggestions.extend(check()) File "diagnose_tensorboard.py", line 78, in wrapper result = fn() File "diagnose_tensorboard.py", line 278, in tensorflow_python_version import tensorflow as tf ModuleNotFoundError: No module named 'tensorflow' --- check: tensorboard_binary_path INFO: which tensorboard: b'C:\\Users\\Fran\\Anaconda3\\envs\\py37\\Scripts\\tensorboard.exe\r\n' --- check: addrinfos socket.has_ipv6 = True socket.AF_UNSPEC =System version:
Issue description
Tensor data not being refreshed in Projector. When the page is refreshed, tensorboard does not update the tensor data if it has changed. It only refreshes the metadata file. This is more obvious when the tensor data size changes. In that case, it shows a mismatch error in size ("Number of tensors do not match the number of lines in metadata") . The whole log folder can be even deleted and tensorboard still shows the old tensor data. It's catching the first tensor available after running the projector. The workaround is to close the server and running it again.