Open Louagyd opened 2 months ago
Embeddings are treated differently than other logs as they are really part of the projector plugin. As a result they are written to a separate file projector_config.pbtxt
and only read in by the projector plugin.
I'm not sure exactly what you're trying to read out, but you may find success using something like this.
import os
import tensorflow as tf
from google.protobuf import text_format
from tensorboard.plugins import projector
with tf.io.gfile.GFile(
os.path.join(logdir, "projector_config.pbtxt")
) as f:
config2 = projector.ProjectorConfig()
text_format.Parse(f.read(), config2)
print(config2)
I am encountering difficulties in retrieving embedding arrays that were logged using add_embedding from TensorBoard logs. I am unable to locate the actual embedding arrays. Below is a detailed description of the issue and the steps I have taken so far.
Steps to Reproduce Logging Embeddings:
I used add_embedding to log embeddings in TensorBoard. Example code for logging embeddings:
I tried using EventAccumulator to load and parse the event files but was unable to locate the embedding arrays. Example code for extracting embeddings:
I would appreciate any guidance or suggestions on how to properly retrieve the embedding arrays logged using add_embedding. Specifically, I am looking for:
Environment Details Framework: PyTorch Logging Library: TensorBoard TensorBoard Version: 2.16.2 Python Version: 3.10 Operating System: Ubuntu 22.04
Thank you for your assistance.