Embedding Projector: "Color by" drop-down not showing up on multi-column .tsv
See original GitHub issueMigrated from https://github.com/tensorflow/tensorflow/issues/9688
Describe the problem
Tensorboard does not display the
Color By
dropdown menu on multi-columnar data.Label by
andsearch by
displaying columns normally.Source code / logs
Sample of
metadata.tsv
file:Name Genre (Sandy) Alex G Alternative/Indie Rock *NSYNC Pop/Rock Acollective Pop/Rock Ahmet Özhan International Ahu Club/Dance Alex Ferreira Pop/Rock Alex Winston Pop/Rock Ali Azimi Pop/Rock Alphamama Pop/Rock Amaryllis International ... Yomo Toro Latin Youssou N'Dour International Zafra Negra Latin Zany Electronic Zeki Müren International iSHi Electronic
Code to generate embeddings and metadata:
def list_to_tsv(filenames, metadata_dir): with open(os.path.join(metadata_dir,'metadata.tsv'), 'w') as tsvfile: writer = csv.writer(tsvfile, delimiter = "\t") for record in filenames: writer.writerow(record) def save_down_tensors(tensor_dir, name_and_embedding): embeddings = [i[2] for i in name_and_embedding] names = [[i[0],i[1]] for i in name_and_embedding] names.insert(0,['Name','Genre']) with tf.Session() as sess: embeddings_tf = tf.Variable(np.array(embeddings), name = "embeddings") tf.global_variables_initializer().run() # save the tensor down saver = tf.train.Saver(tf.global_variables()) saver.save(sess, tensor_dir, 0) # associate metadata with the embedding summary_writer = tf.summary.FileWriter(tensor_dir) config = projector.ProjectorConfig() embedding = config.embeddings.add() embedding.tensor_name = embeddings_tf.name #save filenames to tsv list_to_tsv(names, metadata_dir) embedding.metadata_path = os.path.join(metadata_dir, "metadata.tsv") # save a configuration file that TensorBoard will read during startup. projector.visualize_embeddings(summary_writer, config)
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top Results From Across the Web
How to specify tensorboard projector embedding colors
I'd like to be able to specify the colors tensorboard choses to display. I've looked through the source code but have had trouble...
Read more >TensorBoard: Embedding Visualization · tfdocs - branyang
TensorBoard has a built-in visualizer, called the Embedding Projector, for interactive visualization and analysis of high-dimensional data like embeddings.
Read more >Embedding projector
Color by. No color map Metadata count gradient. Use categorical coloring. For metadata fields that have many unique values we use a gradient...
Read more >Omniscope User Guide
of the views not already showing. Each view has its own Toolbar and pick lists for selecting which fields (columns) to display. The...
Read more >odate.pdf - The Open Digital Archaeology Textbook
as a way of serving and running the notebooks online in a browser. ... Finally, if you'd rather not read this as a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The threshold is hard coded here: https://github.com/tensorflow/tensorboard/blob/master/tensorboard/plugins/projector/vz_projector/data-provider.ts#L21
I ran into the same issue. After taking a look at the code, it seems that the maximum number of unique values for a column to be used in
color-by
is 50. I tried to increase the threshold and run the projector on my data with ~100 unique values (10000 points non-evenly distributed with respect to thecolor-by
filter) and did not run in any performance issue on an average laptop. What would need to be done to be able to increase this threshold?