tensorflow / tensorboard

TensorFlow's Visualization Toolkit
Apache License 2.0
6.72k stars 1.66k forks source link

Support providing path to xplane.pb instead of having to provide log-dir #6940

Open samos123 opened 3 days ago

samos123 commented 3 days ago

Let's assume I have a xplane.pb file in my current directory. Then in order to load it in tensorboard, I would have to do something like this:

mkdir -p summaries/train_train/plugins/profile/2024_11_15_21_36_34/
mv *.xplane.pb summaries/train_train/plugins/profile/2024_11_15_21_36_34/
tensorboard --logdir summaries/train_train --load_fast=false

It would be really nice if tensorboard had a simple UX like this:

tensorboard --event_file mah-profile.xplane.pb

I tried using --event_file:

tensorboard --event_file gke-tpu-4eba1e59-9k6z.xplane.pb
Error: A logdir or db must be specified. For example `tensorboard --logdir mylogdir` or `tensorboard --db sqlite:~/.tensorboard.db`. Run `tensorboard --helpfull` for details and examples.
rileyajones commented 3 days ago

Based on the contents of your command I'm guessing you're particularly interested in the profiler plugin. The file structure is important to how tensorboard understands the data being read is profiler plugin data. Running tensorboard --logdir=. should start the tool but the profiler plugin will not be available.

Is there a reason you need to perform this action frequently? I imagine you could change there the files are written?