GithubHelp home page GithubHelp logo

tensorflow / tensorboard Goto Github PK

View Code? Open in Web Editor NEW
6.6K 193.0 1.6K 116.15 MB

TensorFlow's Visualization Toolkit

License: Apache License 2.0

Python 27.12% HTML 1.45% TypeScript 60.85% Java 0.21% JavaScript 0.12% Shell 0.38% Jupyter Notebook 0.08% CSS 0.16% Starlark 5.15% SCSS 1.35% Rust 3.12% Dockerfile 0.01%

tensorboard's Introduction

TensorBoard GitHub Actions CI GitHub Actions Nightly CI PyPI

TensorBoard is a suite of web applications for inspecting and understanding your TensorFlow runs and graphs.

This README gives an overview of key concepts in TensorBoard, as well as how to interpret the visualizations TensorBoard provides. For an in-depth example of using TensorBoard, see the tutorial: TensorBoard: Getting Started. Documentation on how to use TensorBoard to work with images, graphs, hyper parameters, and more are linked from there, along with tutorial walk-throughs in Colab.

TensorBoard is designed to run entirely offline, without requiring any access to the Internet. For instance, this may be on your local machine, behind a corporate firewall, or in a datacenter.

Usage

Before running TensorBoard, make sure you have generated summary data in a log directory by creating a summary writer:

# sess.graph contains the graph definition; that enables the Graph Visualizer.

file_writer = tf.summary.FileWriter('/path/to/logs', sess.graph)

For more details, see the TensorBoard tutorial. Once you have event files, run TensorBoard and provide the log directory. If you're using a precompiled TensorFlow package (e.g. you installed via pip), run:

tensorboard --logdir path/to/logs

Or, if you are building from source:

bazel build tensorboard:tensorboard
./bazel-bin/tensorboard/tensorboard --logdir path/to/logs

# or even more succinctly
bazel run tensorboard -- --logdir path/to/logs

This should print that TensorBoard has started. Next, connect to http://localhost:6006.

TensorBoard requires a logdir to read logs from. For info on configuring TensorBoard, run tensorboard --help.

TensorBoard can be used in Google Chrome or Firefox. Other browsers might work, but there may be bugs or performance issues.

Key Concepts

Summary Ops: How TensorBoard gets data from TensorFlow

The first step in using TensorBoard is acquiring data from your TensorFlow run. For this, you need summary ops. Summary ops are ops, just like tf.matmul and tf.nn.relu, which means they take in tensors, produce tensors, and are evaluated from within a TensorFlow graph. However, summary ops have a twist: the Tensors they produce contain serialized protobufs, which are written to disk and sent to TensorBoard. To visualize the summary data in TensorBoard, you should evaluate the summary op, retrieve the result, and then write that result to disk using a summary.FileWriter. A full explanation, with examples, is in the tutorial.

The supported summary ops include:

Tags: Giving names to data

When you make a summary op, you will also give it a tag. The tag is basically a name for the data recorded by that op, and will be used to organize the data in the frontend. The scalar and histogram dashboards organize data by tag, and group the tags into folders according to a directory/like/hierarchy. If you have a lot of tags, we recommend grouping them with slashes.

Event Files & LogDirs: How TensorBoard loads the data

summary.FileWriters take summary data from TensorFlow, and then write them to a specified directory, known as the logdir. Specifically, the data is written to an append-only record dump that will have "tfevents" in the filename. TensorBoard reads data from a full directory, and organizes it into the history of a single TensorFlow execution.

Why does it read the whole directory, rather than an individual file? You might have been using supervisor.py to run your model, in which case if TensorFlow crashes, the supervisor will restart it from a checkpoint. When it restarts, it will start writing to a new events file, and TensorBoard will stitch the various event files together to produce a consistent history of what happened.

Runs: Comparing different executions of your model

You may want to visually compare multiple executions of your model; for example, suppose you've changed the hyperparameters and want to see if it's converging faster. TensorBoard enables this through different "runs". When TensorBoard is passed a logdir at startup, it recursively walks the directory tree rooted at logdir looking for subdirectories that contain tfevents data. Every time it encounters such a subdirectory, it loads it as a new run, and the frontend will organize the data accordingly.

For example, here is a well-organized TensorBoard log directory, with two runs, "run1" and "run2".

/some/path/mnist_experiments/
/some/path/mnist_experiments/run1/
/some/path/mnist_experiments/run1/events.out.tfevents.1456525581.name
/some/path/mnist_experiments/run1/events.out.tfevents.1456525585.name
/some/path/mnist_experiments/run2/
/some/path/mnist_experiments/run2/events.out.tfevents.1456525385.name
/tensorboard --logdir /some/path/mnist_experiments

Logdir & Logdir_spec (Legacy Mode)

You may also pass a comma separated list of log directories, and TensorBoard will watch each directory. You can also assign names to individual log directories by putting a colon between the name and the path, as in

tensorboard --logdir_spec name1:/path/to/logs/1,name2:/path/to/logs/2

This flag (--logdir_spec) is discouraged and can usually be avoided. TensorBoard walks log directories recursively; for finer-grained control, prefer using a symlink tree. Some features may not work when using --logdir_spec instead of --logdir.

The Visualizations

Scalar Dashboard

TensorBoard's Scalar Dashboard visualizes scalar statistics that vary over time; for example, you might want to track the model's loss or learning rate. As described in Key Concepts, you can compare multiple runs, and the data is organized by tag. The line charts have the following interactions:

  • Clicking on the small blue icon in the lower-left corner of each chart will expand the chart

  • Dragging a rectangular region on the chart will zoom in

  • Double clicking on the chart will zoom out

  • Mousing over the chart will produce crosshairs, with data values recorded in the run-selector on the left.

Additionally, you can create new folders to organize tags by writing regular expressions in the box in the top-left of the dashboard.

Histogram Dashboard

The Histogram Dashboard displays how the statistical distribution of a Tensor has varied over time. It visualizes data recorded via tf.summary.histogram. Each chart shows temporal "slices" of data, where each slice is a histogram of the tensor at a given step. It's organized with the oldest timestep in the back, and the most recent timestep in front. By changing the Histogram Mode from "offset" to "overlay", the perspective will rotate so that every histogram slice is rendered as a line and overlaid with one another.

Distribution Dashboard

The Distribution Dashboard is another way of visualizing histogram data from tf.summary.histogram. It shows some high-level statistics on a distribution. Each line on the chart represents a percentile in the distribution over the data: for example, the bottom line shows how the minimum value has changed over time, and the line in the middle shows how the median has changed. Reading from top to bottom, the lines have the following meaning: [maximum, 93%, 84%, 69%, 50%, 31%, 16%, 7%, minimum]

These percentiles can also be viewed as standard deviation boundaries on a normal distribution: [maximum, μ+1.5σ, μ+σ, μ+0.5σ, μ, μ-0.5σ, μ-σ, μ-1.5σ, minimum] so that the colored regions, read from inside to outside, have widths [σ, 2σ, 3σ] respectively.

Image Dashboard

The Image Dashboard can display pngs that were saved via a tf.summary.image. The dashboard is set up so that each row corresponds to a different tag, and each column corresponds to a run. Since the image dashboard supports arbitrary pngs, you can use this to embed custom visualizations (e.g. matplotlib scatterplots) into TensorBoard. This dashboard always shows you the latest image for each tag.

Audio Dashboard

The Audio Dashboard can embed playable audio widgets for audio saved via a tf.summary.audio. The dashboard is set up so that each row corresponds to a different tag, and each column corresponds to a run. This dashboard always embeds the latest audio for each tag.

Graph Explorer

The Graph Explorer can visualize a TensorBoard graph, enabling inspection of the TensorFlow model. To get best use of the graph visualizer, you should use name scopes to hierarchically group the ops in your graph - otherwise, the graph may be difficult to decipher. For more information, including examples, see the examining the TensorFlow graph tutorial.

Embedding Projector

The Embedding Projector allows you to visualize high-dimensional data; for example, you may view your input data after it has been embedded in a high- dimensional space by your model. The embedding projector reads data from your model checkpoint file, and may be configured with additional metadata, like a vocabulary file or sprite images. For more details, see the embedding projector tutorial.

Text Dashboard

The Text Dashboard displays text snippets saved via tf.summary.text. Markdown features including hyperlinks, lists, and tables are all supported.

Time Series Dashboard

The Time Series Dashboard shows a unified interface containing all your Scalars, Histograms, and Images saved via tf.summary.scalar, tf.summary.image, or tf.summary.histogram. It enables viewing your 'accuracy' line chart side by side with activation histograms and training example images, for example.

Features include:

  • Custom run colors: click on the colored circles in the run selector to change a run's color.

  • Pinned cards: click the 'pin' icon on any card to add it to the pinned section at the top for quick comparison.

  • Settings: the right pane offers settings for charts and other visualizations. Important settings will persist across TensorBoard sessions, when hosted at the same URL origin.

  • Autocomplete in tag filter: search for specific charts more easily.

Frequently Asked Questions

My TensorBoard isn't showing any data! What's wrong?

First, check that the directory passed to --logdir is correct. You can also verify this by navigating to the Scalars dashboard (under the "Inactive" menu) and looking for the log directory path at the bottom of the left sidebar.

If you're loading from the proper path, make sure that event files are present. TensorBoard will recursively walk its logdir, it's fine if the data is nested under a subdirectory. Ensure the following shows at least one result:

find DIRECTORY_PATH | grep tfevents

You can also check that the event files actually have data by running tensorboard in inspect mode to inspect the contents of your event files.

tensorboard --inspect --logdir DIRECTORY_PATH

The output for an event file corresponding to a blank TensorBoard may still sometimes show a few steps, representing a few initial events that aren't shown by TensorBoard (for example, when using the Keras TensorBoard callback):

tensor
   first_step           0
   last_step            2
   max_step             2
   min_step             0
   num_steps            2
   outoforder_steps     [(2, 0), (2, 0), (2, 0)]

In contrast, the output for an event file with more data might look like this:

tensor
   first_step           0
   last_step            55
   max_step             250
   min_step             0
   num_steps            60
   outoforder_steps     [(2, 0), (2, 0), (2, 0), (2, 0), (50, 9), (100, 19), (150, 29), (200, 39), (250, 49)]

TensorBoard is showing only some of my data, or isn't properly updating!

Update: After 2.3.0 release, TensorBoard no longer auto reloads every 30 seconds. To re-enable the behavior, please open the settings by clicking the gear icon in the top-right of the TensorBoard web interface, and enable "Reload data".

Update: the experimental --reload_multifile=true option can now be used to poll all "active" files in a directory for new data, rather than the most recent one as described below. A file is "active" as long as it received new data within --reload_multifile_inactive_secs seconds ago, defaulting to 86400.

This issue usually comes about because of how TensorBoard iterates through the tfevents files: it progresses through the events file in timestamp order, and only reads one file at a time. Let's suppose we have files with timestamps a and b, where a<b. Once TensorBoard has read all the events in a, it will never return to it, because it assumes any new events are being written in the more recent file. This could cause an issue if, for example, you have two FileWriters simultaneously writing to the same directory. If you have multiple summary writers, each one should be writing to a separate directory.

Does TensorBoard support multiple or distributed summary writers?

Update: the experimental --reload_multifile=true option can now be used to poll all "active" files in a directory for new data, defined as any file that received new data within --reload_multifile_inactive_secs seconds ago, defaulting to 86400.

No. TensorBoard expects that only one events file will be written to at a time, and multiple summary writers means multiple events files. If you are running a distributed TensorFlow instance, we encourage you to designate a single worker as the "chief" that is responsible for all summary processing. See supervisor.py for an example.

I'm seeing data overlapped on itself! What gives?

If you are seeing data that seems to travel backwards through time and overlap with itself, there are a few possible explanations.

  • You may have multiple execution of TensorFlow that all wrote to the same log directory. Please have each TensorFlow run write to its own logdir.

    Update: the experimental --reload_multifile=true option can now be used to poll all "active" files in a directory for new data, defined as any file that received new data within --reload_multifile_inactive_secs seconds ago, defaulting to 86400.

  • You may have a bug in your code where the global_step variable (passed to FileWriter.add_summary) is being maintained incorrectly.

  • It may be that your TensorFlow job crashed, and was restarted from an earlier checkpoint. See How to handle TensorFlow restarts, below.

As a workaround, try changing the x-axis display in TensorBoard from steps to wall_time. This will frequently clear up the issue.

How should I handle TensorFlow restarts?

TensorFlow is designed with a mechanism for graceful recovery if a job crashes or is killed: TensorFlow can periodically write model checkpoint files, which enable you to restart TensorFlow without losing all your training progress.

However, this can complicate things for TensorBoard; imagine that TensorFlow wrote a checkpoint at step a, and then continued running until step b, and then crashed and restarted at timestamp a. All of the events written between a and b were "orphaned" by the restart event and should be removed.

To facilitate this, we have a SessionLog message in tensorflow/core/util/event.proto which can record SessionStatus.START as an event; like all events, it may have a step associated with it. If TensorBoard detects a SessionStatus.START event with step a, it will assume that every event with a step greater than a was orphaned, and it will discard those events. This behavior may be disabled with the flag --purge_orphaned_data false (in versions after 0.7).

How can I export data from TensorBoard?

The Scalar Dashboard supports exporting data; you can click the "enable download links" option in the left-hand bar. Then, each plot will provide download links for the data it contains.

If you need access to the full dataset, you can read the event files that TensorBoard consumes by using the summary_iterator method.

Can I make my own plugin?

Yes! You can clone and tinker with one of the examples and make your own, amazing visualizations. More documentation on the plugin system is described in the ADDING_A_PLUGIN guide. Feel free to file feature requests or questions about plugin functionality.

Once satisfied with your own groundbreaking new plugin, see the distribution section on how to publish to PyPI and share it with the community.

Can I customize which lines appear in a plot?

Using the custom scalars plugin, you can create scalar plots with lines for custom run-tag pairs. However, within the original scalars dashboard, each scalar plot corresponds to data for a specific tag and contains lines for each run that includes that tag.

Can I visualize margins above and below lines?

Margin plots (that visualize lower and upper bounds) may be created with the custom scalars plugin. The original scalars plugin does not support visualizing margins.

Can I create scatterplots (or other custom plots)?

This isn't yet possible. As a workaround, you could create your custom plot in your own code (e.g. matplotlib) and then write it into an SummaryProto (core/framework/summary.proto) and add it to your FileWriter. Then, your custom plot will appear in the TensorBoard image tab.

Is my data being downsampled? Am I really seeing all the data?

TensorBoard uses reservoir sampling to downsample your data so that it can be loaded into RAM. You can modify the number of elements it will keep per tag by using the --samples_per_plugin command line argument (ex: --samples_per_plugin=scalars=500,images=20). See this Stack Overflow question for some more information.

I get a network security popup every time I run TensorBoard on a mac!

Versions of TensorBoard prior to TensorBoard 2.0 would by default serve on host 0.0.0.0, which is publicly accessible. For those versions of TensorBoard, you can stop the popups by specifying --host localhost at startup.

In TensorBoard 2.0 and up, --host localhost is the default. Use --bind_all to restore the old behavior of serving to the public network on both IPv4 and IPv6.

Can I run tensorboard without a TensorFlow installation?

TensorBoard 1.14+ can be run with a reduced feature set if you do not have TensorFlow installed. The primary limitation is that as of 1.14, only the following plugins are supported: scalars, custom scalars, image, audio, graph, projector (partial), distributions, histograms, text, PR curves, mesh. In addition, there is no support for log directories on Google Cloud Storage.

How can I contribute to TensorBoard development?

See DEVELOPMENT.md.

I have a different issue that wasn't addressed here!

First, try searching our GitHub issues and Stack Overflow. It may be that someone else has already had the same issue or question.

General usage questions (or problems that may be specific to your local setup) should go to Stack Overflow.

If you have found a bug in TensorBoard, please file a GitHub issue with as much supporting information as you can provide (e.g. attaching events files, including the output of tensorboard --inspect, etc.).

tensorboard's People

Contributors

arcra avatar benoitsteiner avatar bileschi avatar bmd3k avatar caisq avatar chihuahua avatar davidsoergel avatar dependabot[bot] avatar dsmilkov avatar erzel avatar groszewn avatar gunan avatar hoonji avatar jameshollyer avatar jameswex avatar japie1235813 avatar jart avatar martinwicke avatar nfelt avatar psybuzz avatar qiuminxu avatar renatoutsch avatar rileyajones avatar sparkier avatar stephanwlee avatar teamdandelion avatar tensorboard-gardener avatar tensorflower-gardener avatar wchargin avatar yatbear avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tensorboard's Issues

Embedding Projector: "Color by" drop-down not showing up on multi-column .tsv

Migrated from tensorflow/tensorflow#9688

Describe the problem

Tensorboard does not display the Color By dropdown menu on multi-columnar data. Label by and search by displaying columns normally.

tensorboard dropdown issue

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)

Audio thumbnails/summaries in the embedding visualization

Migrated from tensorflow/tensorflow#7106

We (@PFCM and I) have been working with audio data (bird songs) and would like a way to inspect (via listening) embeddings of small chunks of audio files. The main use would be to help us to validate and explore our data. In our setting we have few labels, so we are especially interested in using it to inspect clusters and validate (with humans) their accuracy/reliability/clusteryness.

We would like to know;

  • Are you guys planning on adding this sort of feature to tensorflow? If so, can we help to speed it up?
  • If we were do it how would you recommend that we implement it so that it is supported in the future?

We would like audio summaries to work with the embedding visualiser. Much like there are thumbnails of each mnist image (see link), we would like to be able to click on an embedded datapoint; to listen to it (currently we are just using the spectrograms as image thumbnails) and to figure out where it came from (which part of which audio recording).

[DASHBOARD] Static Variable Display Tab

Migrated from tensorflow/tensorflow#4714

I do a lot of different runs which contain descriptions as well as different meta parameters. It would be nice to have a tab on TensorBoard so I can tell which experiment I am viewing.

My thought would be to simply add static variables from the Graph which might include Strings, Ints, Floats, (maybe matrix in table format if possible, like PCA parameters, maybe confusion matrix, etc). These may include a text description, current learning rate, network meta parameters, etc. It would be good to simple present the "current" value of these variables so if there is a search on Discount Rates for RL or variation such as learning rate, those can be viewed. This would be different from simply graphing the Learning rate as that shows the history rather than "current". I think of this as a TensorFlow "Dashboard" that I can setup.

Something like:
tf.dashboard_summary(tags, tensor/value, collections=None, name=None)

eg:
tf.dashboard_summary("Description:",description_string_tensor_or_python_string)
tf.dashboard_summary("Learning Rate:",lr_tensor)
tf.dashboard_summary("DiscountRate:",discountRate_python_variable)

In this case, a "DASHBOARD" tab on tensorflow would contain the 3 labels above and the tensor/value. If the value is a python variable, then it should be considered constant and will not change over the graph lifecycle. If it is a tensor/variable, then it should be pulled from the graph at each iteration.

I can help but not sure where to jump in to get this started.

[Windows] TensorBoard doesn't work

This issue is migrated from tensorflow/tensorflow#5983.

I installed the tensorflow for windows with
pip install --upgrade --ignore-installed https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.0rc0-cp35-cp35m-win_amd64.whl
(I added the '--ignore-installed', for the official one didn't work on my pc)

Then I tried some code and ran tensorboard, however the browser shows nothing
When running with '--debug' there appears some 404.
I also tried tensorboard on mac os, it worked well, so the problem is not caused by the .tfevent file
I've read through a bunch of related issues, and found that maybe the pip install didn't install tensorflow completely. And I searched the tensorflow file and did not found some certain files appears in mac os tensorflow, such as 'paper-toolkit'

load data from relative path with the projector plugin

Migrated from tensorflow/tensorflow#8342

This is a problem similar with issue #7382 but it has been closed.

@dandelionmane
Another place that still has the similar problem in #7382 is the request of project plugin data in Embeddings panel, e.g. /data/plugin/projector/runs still requests in a absolute path.
I found the code here , there is a leading slash for the route-prefix property in vz-projector-dashboard.
If that is correct, I will submit a PR. Thanks!

Another question is when will the tensorboard be recompiled. As now in version 1.0 these features are not included.

tensorboard not able to read large event file (~600MB)

This issue had been migrated from tensorflow/tensorflow#836.

I am training a network on 4 GPUs. The event file is too large to be parsed by tensorboard. How can I increase the limit?

RNING:tensorflow:IOError [Errno 2] No such file or directory: '/home/pc/anaconda2/lib/python2.7/site-packages/tensorflow/tensorboard/TAG' on path /home/pc/anaconda2/lib/python2.7/site-packages/tensorflow/tensorboard/TAG
WARNING:tensorflow:Unable to read TensorBoard tag
Starting TensorBoard on port 6006
(You can navigate to http://0.0.0.0:6006)
[libprotobuf ERROR google/protobuf/src/google/protobuf/io/coded_stream.cc:207] A protocol message was rejected because it was too big (more than 67108864 bytes). To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
Exception in thread Thread-2:
Traceback (most recent call last):
File "/home/pc/anaconda2/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/home/pc/anaconda2/lib/python2.7/threading.py", line 1073, in run
self.function(*self.args, **self.kwargs)
File "/home/pc/anaconda2/lib/python2.7/site-packages/tensorflow/python/summary/event_accumulator.py", line 242, in Update
self.Reload()
File "/home/pc/anaconda2/lib/python2.7/site-packages/tensorflow/python/summary/event_accumulator.py", line 175, in Reload
for event in self._generator.Load():
File "/home/pc/anaconda2/lib/python2.7/site-packages/tensorflow/python/summary/impl/directory_watcher.py", line 82, in Load
for event in self._loader.Load():
File "/home/pc/anaconda2/lib/python2.7/site-packages/tensorflow/python/summary/impl/event_file_loader.py", line 53, in Load
event.ParseFromString(self._reader.record())
DecodeError: Error parsing message

Feature Request: Add an optional command-line argument for a prefix URL

(I've migrated this issue from tensorflow/tensorflow#10655. It was originally posted by @mebersole. It had four thumbs up emoji there.)

Would like to add a command-line argument that allows TensorBoard to run at a different URL location than the root domain. So for example:

  • command-line: --base_url runhere
  • URL location: http://<address>:6006/runhere/

Motivation for request: There are locations where only minimal ports are open and it would be great to use nginx (or similar) to route TensorBoard through port 80.

Hide empty panes in TensorBoard

Migrated from tensorflow/tensorflow#6768 (there is some addl. discussion there)

When filtering runs, empty panes show up if a hidden run has a summary in a scope that the visible runs don't have. This makes TensorBoard very messy when comparing different machine learning models with different variable scopes, and so on. Could an option to hide empty panes be added?

Example (note the empty LSTM scope):
image

TensorBoard Streaming Mode

Migrated from tensorflow/tensorflow#2603

There's some discussion on the original request, here is the parent comment:

The new Tensorboard refresh button looks great, and will certainly be a bit more civilized than rapidly swapping the horizontal axis view to update the data. :)

But what if Tensorboard could be optionally updated in real time, whenever a summary writer was flushed? I've written systems before where past data is loaded along with the page, and new data is added continuously via a web socket. Would this work in Tensorboard's current architecture?

If my understanding is correct, Tensorboard currently updates itself every 120 seconds by reading the event files in the log directory. Could Tensorboard also open a local socket and bounce summary updates from a connected Tensorflow process to websocket clients?

I was thinking of hacking a streaming system together on my branch, but I figured I should reach out first to see if this is already in the roadmap. If it isn't, is this feature something you might like to merge if I can get it to work robustly?
👍 8

Shouldn't tensorboard warn you that not all summaries have loaded yet?

Migrated from tensorflow/tensorflow#1405

Hi,

since I started using Tensorboard, I noticed some odd behavior that sometimes I'd open it and it seemed like a lot of the summary values were missing, i.e, even though it's already at 10k steps, the summary only shows 2k steps or so. Today I actually finally noticed that it simply meant that it was just still being loaded. I refreshed the page after a minute or so and all data was there. My PC is not bad (i5-2500k) so this was quite surprising. Any reason why the summaries sometimes take so long to load? Also can we get some sort of warning that not all summaries have been completely loaded yet?
👍 1

FR: support for x-axis semantics other than "step"

This issue had been migrated from tensorflow/tensorflow#10292.

Often I log scalar summaries at intervals that are meaningful in their own right — e.g. at epochs or min-batch boundaries — and report this, rather than the global step, as the x-value with something like

some_writer.add_summary(a_value, epoch_number)

or

some_writer.add_summary(a_value, batch_number)

But the API has no way of indicating that these x-values are not "steps", and reports them in the TensorBoard UI as "Steps", which they are not.

It would be nice to have a way of changing the "Steps" label to some other string (here, for example "Epoch" or "Batch").

Improve TensorBoard embeddings search

Migrated from tensorflow/tensorflow#10106

Currently, when making a search query using a custom variable, let's say a relevance score, then results display relevance scores. This is not always helpful. In my application, I have word embeddings that I would like to filter by a custom variable (relevance score), and I can't see what word is corresponding to each relevance score (see screenshot).

It would be better to have a separate field so that users can define how they would like to see the results of their search query.
screen shot 2017-05-22 at 11 54 44

Video summary support

Migrated from tensorflow/tensorflow#3936

Just wondering if there are any plans to add video summaries to tensorboard??

@falcondai offered to implement it as a plugin. @falcondai, I think we are almost at the point where we're ready to accept a plugin like that. Give us a few more weeks to clean up the plugin API and get some good examples you can work off of.

Warn on the frontend when the backend is not finished loading summaries

Migrated from tensorflow/tensorflow#1405.

@bernardopires says:

Since I started using Tensorboard, I noticed some odd behavior that sometimes I'd open it and it seemed like a lot of the summary values were missing, i.e, even though it's already at 10k steps, the summary only shows 2k steps or so. Today I actually finally noticed that it simply meant that it was just still being loaded. I refreshed the page after a minute or so and all data was there. My PC is not bad (i5-2500k) so this was quite surprising. Any reason why the summaries sometimes take so long to load? Also can we get some sort of warning that not all summaries have been completely loaded yet?

Re-enable explicit control of summary tag

Migrated from tensorflow/tensorflow#6150

The basic issue is:
It used to be possible to precisely control the display name (or tag) of summary data in TensorBoard, because users had direct control over the tag field.

However, this meant that summary code ignored tf name scopes when generating summaries and tags. This was frustrating because it meant the following code was broken:

def layer(input):
  W = get_weights_variable(somehow)
  b = get_bias_variable(somehow)
  activation = tf.nn.relu(input * W + b)
  s = tf.summary.histogram("activation_histogram", activation)
  return activation

input = tf.placeholder(...)
layer1 = layer(input)
layer2 = layer(layer1)
...
merged = tf.summary.merge_all()
....

This code would be broken because the tag "activation_histogram" would be used twice, creating a conflict.

To fix this, the summary module (which was added in tf1.0) removes explicit control of the tag from the user. Instead, the first argument to the summary is the "name", and the generated node_name is used as the summary tag. As discussed in the linked issue, however, this creates its own set of frustrations and headaches.

I think a robust solution would be to add a display_name argument to summaries, which is used to create a SummaryMetadata that TensorBoard parses. Then, TensorBoard can use the display_name as the default name in tb, and fall back to the tag in case of conflicts.

I'm not sure how to implement this in a way that generalizes to the plugin system, though. I don't want to fix it just for individual plugins. We also need to continue to support the case where users manually generate the summary proto with an explicit tag.

@jart @wchargin @chihuahua thoughts?

Allow programmatically configuring the graph visualization

Migrated from tensorflow/tensorflow#5305.

@eamartin says:

I'm repeatedly making small tweaks to graphs and visualizing them in TensorBoard.
Here are two feature requests for TensorBoard that would make this workflow significantly smoother:

(1)
Allow the user to specify that a node should always be drawn in the main graph or as an auxiliary node. Alternatively, add an option to draw all nodes in main graph.

Currently, TensorBoard chooses to put nodes in a subgraph as auxiliary nodes (within the subgraph). Adding a node to the main graph consists of "open subgraph, click auxiliary node to add to main graph", which needs to be repeated for each auxiliary node to move because "add to main graph" collapses all subgraphs. This pain could also be partially alleviated by an option to "Shift + Click" to add/remove multiple nodes from the main graph at once.

(2)
Allow the user to force edges to be drawn when both nodes are in the main graph.

Example case:
Let op X be in the top level graph. Let SG be a subgraph and let SG contain 10 subgraphs F_i for i=1,...,10 that all take X as input.
TensorBoard will draw an edge from X to SG, but each F_i will have it's dependence on X noted as an auxiliary input. There is no way to add X to the main graph because it is already in the main graph (but visualized as an aux input).
It would nice for there to be a way for there to be one edge from X to SG, and then 10 edges connecting the entry point of X into SG with each of the F_i. Ideally this option would also have a programmatic interface or at least a default to set.

Embedding Projector: some metadata unsearchable

Migrated from tensorflow/tensorflow#8177

There's a lot of additional conversation there.

Potential Bug

I'm using Tensorboard's embedding projector to perform PCA/t-SNE on a dataset of features I've extracted from ~4K MIDI files. I've created a metadata TSV and pointed my Tensorflow application to it as instructed in the documentation. The metadata parses correctly in Tensorboard, however, when I use the inspector on the right-most panel, many of the fields seem to be unsearchable, or at least yield zero results for any valid query. Searching the first 13 fields (columns) works correctly, however 3 of the last fields are unsearchable, specifically artist_terms, artist_mbtags, and artist_location in embedding_logdir/metadata.tsv.

I'm finding this to be the case independent of whether regex mode is enabled or disabled. I can also confirm that these fields are being parsed correctly as I can select a data point and view the values for these problematic fields. I've also tried creating a metadata file with only those three problematic fieldnames and they continue to misbehave in this test as well.

Reproducing

I've attached my logdir complete with a checkpoint and metadata.tsv. To reproduce my results, extract the folder and launch Tensorboard from inside embedding_logdir's parent directory like so:

tensorboard --logdir embedding_logdir

Tensorboard must be run from the parent directory of embedding_logdir to maintain the correct filepath I specified for the metadata.tsv file in my TF program.

embedding_logdir.tar.gz

TensorBoard Embeddings fail if a "+" character is in LOG_DIR subdirectory filename

@austinstover said seventeen days ago in tensorflow/tensorflow#10301:

System information

  • Occurs in Tutorial: DandelionMane's TF Dev Summit 2017 TensorBoard Tutorial
    • If learning_rate >= 1 (not that you would want to do that)
  • OS Platform: Windows 10
  • TensorFlow install: Binary
  • TensorFlow version: 1.1.0
  • Exact command to reproduce: Use a plus sign in the filename of one of LOG_DIR's subdirectories

Problem

The tensorboard embeddings tab throws an "Error fetching projector config" if a + sign is used in a log_dir subdirectory; that is, if the projector_config.pbtxt is in that subdirectory.

PIP: Don't lock markdown version to 2.2.0

tensorflow/tensorflow#10744

This markdown version lock could cause versioning conflict for downstream (e.g. if requirements are compiled and resolved by pip-compile). Wondering If there's a reason to lock this version. And it's already not sync with the CI install script (those --upgrade with locked version also doesn't seem right to me).

TensorBoard doesn't respect drive names on Windows

Migrated from tensorflow/tensorflow#7856

@enpasos

OS: Windows 10 (64 bit)
TensorFlow Version: 1.0.0
CUDA: 8.0
GPU: yes

Problem:
C:>tensorboard --logdir=E:\tmp\tensorflow\mnist\logs
=> tensorboard starts without loading data (not working and difficult to detect reason)

E:>tensorboard --logdir=E:\tmp\tensorflow\mnist\logs
=> tensorboard starts with loading data (works perfectly)

@mrry

Unfortunately TensorBoard uses a colon as the separator between the optional "run name" and the path in the --logdir flag. That means that --logdir=E:\tmp\tensorflow\mnist\logs is interpreted as a run named E with path \tmp\tensorflow\mnist\logs, which explains why it's sensitive to the current working directory.

As a quick workaround, you could avoid this problem by always specifying an explicit run name as part of the --logdir flag, e.g.:

tensorboard --logdir=training:E:\tmp\tensorflow\mnist\logs

(Reassigning to @dandelionmane, who shows up on the blame for the relevant code.)

Make TensorBoard aware of hyperparameters

Migrated from tensorflow/tensorflow#7708.

@mmuneebs says:

I am wondering if it's possible to store the arguments that we pass to the training script to be stored as part of other summaries, and have a way to see those arguments/parameters as notes in a separate tab in Tensorboard.
Reason: It's often hard to track individual training runs and relate them to the training/network config if you change training and network parameters frequently which always happens during hyperparameter search. We can do it manually too but if included in Tensorboard, it would make it one go-to visualizer and comparison tool for everything.
One method of doing this that comes to mind is using the tf.app.flags.FLAGS arguments. This would keep everything standardized. Or we could also support argparse directly.
Is this something in line with Tensorboard's philosophy or is it too straightforward to be a special feature?

tensorboard server: base_url support

This issue had been migrated from tensorflow/tensorflow#2602.

What have you tried?

Running the tensorboard service through a proxy server, which does map a subdirectory to the tensorboard server' root.

Desired outcome

By providing a way to specify a base_url, the server would understand how to treat incoming requests in such a situation. e.g. ://server/subdir/tensorboard/://server/

Compress audio summaries with OGG or similar

Migrated from tensorflow/tensorflow#4207.

@carlthome says:

When logging an AudioSummary every couple of epochs, the logs grow quickly (as in several gigabytes), and checking TensorBoard remotely (as in not on the same LAN) also becomes very slow. Would it be possible to have builtin support for Ogg compression or an equivalent lossy format? There are multiple use cases where this would be beneficial.

Tensorboard has wrong logdir on Windows

This issue had been migrated from tensorflow/tensorflow#6313. The thread mentions a workaround, but the root problem of unsupported logdir paths on windows is unresolved.

I use Tensorflow 0.12rc1 on Windows. "Tensorboard" has problems parsing the logdir. My log-directory is at E:\tmp\tflogs. When I start tensorboard from the windows shell (cmd.exe) with:

tensorboard --logdir=E:\tmp\tflogs

it depends on the current directory / drive if it works or not (i.e., if tensorboard finds the runs and shows the data). If the current directory is, e.g., on the C:\ drive, tensorboard tries to add runs from c:\tmp\tflogs instead of E:\tmp\tflogs.

Example:
C:\Users\wrammer>tensorboard --logdir=E:\tmp\tflearn_logs --debug
The log contains lines such as:
INFO:tensorflow:Starting AddRunsFromDirectory: C:\tmp\tflearn_logs

Unexpected categorizer output regarding underscores

Migrated from tensorflow/tensorflow#9053.

The following script reproduces:

import tensorflow as tf

def main():
  k = tf.constant(0)
  tf.summary.scalar('loss', k)
  tf.summary.scalar('loss/regularization', k)
  tf.summary.scalar('loss_extra_stuff', k)
  summ = tf.summary.merge_all()

  sess = tf.Session()
  writer = tf.summary.FileWriter('/tmp/cat2')
  writer.add_graph(sess.graph)
  writer.add_summary(sess.run(summ))
  writer.close()

if __name__ == '__main__':
  main()

In TensorBoard, the categorizer emits two categories called "loss", one with tag "loss" and one with "loss/regularization". This should not happen. It does not occur if the third summary is removed.

Polarized gradient in tensorboard embeddings

This issue had been migrated from tensorflow/tensorflow#10105.

Currently, default tensorboard color gradient goes from light yellow to dark blue (see screenshot), which works great for highlighting positive values (yellow dots become nearly invisible).

But it doesn't work well for displaying, let's say, sentiment scales (going from -1 to +1). The ability to choose a gradient going from red to blue would be helpful for visualizing polarized scales.

Document events file format

tensorflow/tensorflow#4181

@malmaud says:

Hello,
In the documentation for Tensorboard, I can't find a description for the format of the events file beyond that it contains Event protobufs. Is it recordio? Are there any tools for writing event files for 3rd-party Tensorflow clients that aren't using the Python API?

Support SVGs on the image dashboard

Migrated from tensorflow/tensorflow#10207.

@thinxer says:

TensorBoard supports image summaries, which is great for visualization. However, TensorFlow doesn't have rich operators for drawing, and people have to rely on Python libraries like PIL or cv2 for rendering. Those libraries typically use software rendering and are not very fast.

Considering TensorBoard is a web app, and browsers already have rich support for rendering, why don't we offload the rendering to browsers? For example, SVG is a simple XML format, which supports vector graphics, text and embedded bitmap images. Outputting an SVG seems to be a fairly easy job with some text templates.

Can't load >5 Audio summaries, Broken pipe error

Migrated from tensorflow/tensorflow#8055.

There's a bunch more discussion on the original thread, plus some repro files from @lemonzi

Possibly related: tensorflow/tensorflow#4207
Setup: OSX 10.10, TF nightly build of 2017-03-02 without GPU, Python 2.7.13. Affects both Chrome 56.0 and Safari 10.0. I think the official 1.0.0 release also had this issue.

My model logs relatively long audio summaries (~3 minutes long at 16 kHz), and created around 60 of them overnight. The issue also appears with fewer summaries created, at least on Chrome.

When using Chrome, they only load upon playback. Only the first 5 or so that I play will work; after that (even if I pause them) I can't get the others to play unless I restart TensorBoard. When using Safari, all of them try to load at once and nothing works.

On the TensorBoard side, I see a bunch of error: [Errno 32] Broken pipe, which could mean the browser tries to manage the incoming streams and TensorBoard doesn't know how to defer the transfers (see this post).

For Chrome, there is a limit of 6 concurrent audio downloads. I think in my case the audio keeps the connection open even after I pause it, and instead of downloading the whole file it streams it, so it never closes and I can't play other files. I may need to restart TensorBoard to clear the browser cache, or maybe TensorBoard itself has a limit on the concurrent streams and they don't close even after a page reload. For Safari, I think it doesn't wait until playback to download the files, so all 60 players start the download concurrently and only the first ones survive.

If it's not a bug on the TensorBoard server and the summaries can't be prevented from keeping the connection open on pause or stop, I guess a possible solution could be to have a global player and load the audio files to it on-demand when requesting a summary, rather than each summary having its own player.

Embedding projector forces square aspect ratio

Migrated from tensorflow/tensorflow#8610.

@jongchyisu says:

I tried to use tensorboard embedding visualization with sprite images.
It works well except two things:

  1. Even though I set the image width and height as:
    embedding.sprite.single_image_dim.extend([my_width, my_height])
    and the projector_config.pbtxt file has:
    sprite {
    image_path: "sprite.png"
    single_image_dim: my_width
    single_image_dim: my_height
    }
    Tensorboard resizes the images to be square, though it can get correct part from the sprite image, except that:
  2. Every last image of each row is not correct. This happens when I have lots of images (like 200 images with size 70*100).

Seems like it only support square images?

@appierys says:

I can confirm that indeed Tensorboard resizes the images to be square.

Make TensorBoard side bar resizable?

This issue had been migrated from tensorflow/tensorflow#1464.

There's often a bunch of unused space on the right side of the TensorBoard interface, and if we have long directory names on the left (for example listing parameters during validation), they end up getting wrapped to multiple lines. Right now it's possible to adjust the sidebar width with Chrome's developer tools, but it seems natural for it to be resizable in the first place.

Backslash-separated logdir paths have issues on Windows

Migrated from tensorflow/tensorflow#9854.

@DarrellThomas says:

[After running tensorboard --logdir='D:\logs_dt'] I'm not seeing anything on the tensorboard at all. I can see where the log director(ies) is/are created by the tutorial script, and the subdirectories /test and /train are there with the event data present. I point the tensorboard to the populated log directory with the following command, but it cannot see the event files. Nothing is present in tensorboard, and I'm redirected back to the tutorials.

Tensorboard Graph vizualisation crashes with Chrome/Safari

Migrating tensorflow/tensorflow#9681

Describe the problem

I'm running Tensorboard on a server and visualizing the graph on my local machine.

With the attached file that I generated using a custom script, Tensorboard crashes after a while of just moving the graph around or when I try to remove some modules from the main graph (100% crash after 4 modules removed).

More specifically:

  • In Safari only the browser freezes but I can still close it.
  • In Chrome the browser freezes and then the whole OS, I don't even have haptic feedback anymore. On the otherhand Tensorboard is still running on the server and the Tensorboard webpage can be accessed by other computers.

Source code / logs

Here is the log-file containing just the graph that reproduces this issue 100% time on my end.
events.out.tfevents.1493971052.c941b31be93a.zip

TensorBoard feature request: Search for Node.

This issue had been migrated from tensorflow/tensorflow#2730.

I have been trying to retrain the inception v3 network and TensorBoard has been the only real way to introspect the network and it's implementation so far.

It would be very useful to be able to find nodes in the graph, by name or other properties. E.g. in my case I am interested in seeing the total_loss node that is being defined here: https://github.com/tensorflow/models/blob/master/inception/inception/inception_train.py#L120 To get a greater idea of what it is linked to.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.