Skip to content

Commit 016ab58

Browse files
committed
Merge remote-tracking branch 'upstream/master' into polymer2
2 parents 4dd6113 + afecb68 commit 016ab58

File tree

255 files changed

+7844
-5179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

255 files changed

+7844
-5179
lines changed

.github/ISSUE_TEMPLATE.md

-15
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Bug report
3+
about: Report a problem in TensorBoard
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Consider Stack Overflow for getting support using TensorBoard—they have
11+
a larger community with better searchability:
12+
13+
https://stackoverflow.com/questions/tagged/tensorboard
14+
15+
Do not use this template for for setup, installation, or configuration
16+
issues. Instead, use the “installation problem” issue template:
17+
18+
https://github.com/tensorflow/tensorboard/issues/new?template=installation_problem.md
19+
20+
To report a problem with TensorBoard itself, please fill out the
21+
remainder of this template.
22+
23+
## Environment information (required)
24+
25+
Please run `diagnose_tensorboard.py` (link below) in the same
26+
environment from which you normally run TensorFlow/TensorBoard, and
27+
paste the output here:
28+
29+
https://raw.githubusercontent.com/tensorflow/tensorboard/master/tensorboard/tools/diagnose_tensorboard.py
30+
31+
For browser-related issues, please additionally specify:
32+
33+
- Browser type and version (e.g., Chrome 64.0.3282.140):
34+
- Screenshot, if it’s a visual issue:
35+
36+
## Issue description
37+
38+
Please describe the bug as clearly as possible. How can we reproduce the
39+
problem without additional resources (including external data files and
40+
proprietary Python modules)?
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: Feature request
3+
about: Suggest an enhancement to TensorBoard
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Please describe the problem that you’re facing and the enhancements that
11+
you’d like to see. Feel free to include screenshots or code samples.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Installation problem
3+
about: Report a problem installing or starting TensorBoard
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Use this template if you have a problem building, installing,
11+
configuring, or starting TensorBoard and you suspect that there is a
12+
problem with TensorBoard itself.
13+
14+
Consider first reaching out to Stack Overflow for support—they have a
15+
larger community with better searchability:
16+
17+
https://stackoverflow.com/questions/tagged/tensorboard
18+
19+
## Environment information (required)
20+
21+
Please run `diagnose_tensorboard.py` (link below) in the same
22+
environment from which you normally run TensorFlow/TensorBoard, and
23+
paste the output here:
24+
25+
https://raw.githubusercontent.com/tensorflow/tensorboard/master/tensorboard/tools/diagnose_tensorboard.py
26+
27+
## Steps to reproduce (required)
28+
29+
Please provide explicit commands to reproduce the problem in a fresh
30+
environment (virtualenv, Conda environment, …). Include any necessary
31+
configuration, such as Conda `environment.yml` files.

.travis.yml

+53-101
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
dist: trusty
2-
sudo: required
3-
42
language: python
53
python:
64
- "2.7"
75
- "3.6"
86

9-
os:
10-
- linux
11-
127
branches:
138
only:
149
- master
@@ -29,141 +24,98 @@ env:
2924
- TF_VERSION_ID= # Do not install TensorFlow in this case
3025

3126
cache:
27+
# Reuse the pip cache directory across build machines.
28+
pip: true
29+
# Cache directories for Bazel. See ci/bazelrc for details.
3230
directories:
33-
- $HOME/.bazel-output-base
31+
- $HOME/.cache/tb-bazel-repo
32+
- $HOME/.cache/tb-bazel-disk
3433

3534
# Each bullet point is displayed in the Travis log as one collapsed line, which
3635
# indicates how long it took. Travis will check the return code at the end. We
3736
# can't use `set -e` in the YAML file since it might impact Travis internals.
3837
# If inline scripts get too long, Travis surprisingly prints them twice.
3938

4039
before_install:
41-
# Travis pre-installs an old version of numpy. We uninstall it to
42-
# reduce the potential for strange behavior when upgrading in-place
43-
# for TensorFlow's numpy dependency.
44-
- pip uninstall -y numpy
45-
- pip freeze # print installed distributions, for debugging purposes
46-
- |
47-
# Download Bazel
48-
bazel_binary="$(mktemp)" &&
49-
bazel_checksum_file="$(mktemp)" &&
50-
printf >"${bazel_checksum_file}" \
51-
'%s %s\n' "${BAZEL_SHA256SUM}" "${bazel_binary}" &&
52-
for url in \
53-
"https://mirror.bazel.build/github.com/bazelbuild/bazel/releases/download/${BAZEL}/bazel-${BAZEL}-linux-x86_64" \
54-
"https://github.com/bazelbuild/bazel/releases/download/${BAZEL}/bazel-${BAZEL}-linux-x86_64" \
55-
; do
56-
if \
57-
wget -t 3 -O "${bazel_binary}" "${url}" &&
58-
shasum -a 256 --check "${bazel_checksum_file}"; then
59-
break
60-
else
61-
rm -f "${bazel_binary}"
62-
fi
63-
done &&
64-
rm "${bazel_checksum_file}" &&
65-
[ -f "${bazel_binary}" ]
66-
- chmod +x "${bazel_binary}"
67-
- sudo mv "${bazel_binary}" /usr/local/bin/bazel
68-
69-
# Fix Boto and Travis issue https://github.com/travis-ci/travis-ci/issues/7940
70-
- sudo rm -f /etc/boto.cfg
71-
72-
# Storing build artifacts in this directory helps Travis cache them. This
73-
# will sometimes cut latency in half, when we're lucky.
74-
- echo "startup --output_base=${HOME}/.bazel-output-base" >>~/.bazelrc
75-
76-
# Travis Trusty Sudo GCE VMs have 2 cores and 7.5 GB RAM. These settings
77-
# help Bazel go faster and not OOM the system.
78-
- echo "startup --host_jvm_args=-Xms500m" >>~/.bazelrc
79-
- echo "startup --host_jvm_args=-Xmx500m" >>~/.bazelrc
80-
- echo "startup --host_jvm_args=-XX:-UseParallelGC" >>~/.bazelrc
81-
- echo "build --local_resources=400,2,1.0" >>~/.bazelrc
82-
- echo "build --worker_max_instances=2" >>~/.bazelrc
83-
84-
# Make Bazel as strict as possible, so TensorBoard will build correctly
85-
# for users, regardless of their Bazel configuration.
86-
- echo "build --worker_verbose" >>~/.bazelrc
87-
- echo "build --worker_sandboxing" >>~/.bazelrc
88-
- echo "build --spawn_strategy=sandboxed" >>~/.bazelrc
89-
- echo "build --genrule_strategy=sandboxed" >>~/.bazelrc
90-
- echo "test --test_verbose_timeout_warnings" >>~/.bazelrc
91-
92-
# It's helpful to see the errors on failure.
93-
- echo "build --verbose_failures" >>~/.bazelrc
94-
- echo "test --test_output=errors" >>~/.bazelrc
95-
96-
# We need to pass the PATH from our virtualenv down into our tests,
97-
# which is non-hermetic and so disabled by default in Bazel 0.21.0+.
98-
- echo "test --action_env=PATH" >>~/.bazelrc
40+
- elapsed() { TZ=UTC printf "Time %(%T)T %s\n" "$SECONDS" "$1"; }
41+
- elapsed "before_install"
42+
- ci/download_bazel.sh "${BAZEL}" "${BAZEL_SHA256SUM}" ~/bazel
43+
- sudo mv ~/bazel /usr/local/bin/bazel
44+
- cp ci/bazelrc ~/.bazelrc
45+
- elapsed "before_install (done)"
9946

10047
install:
101-
- pip install boto3==1.9.86
48+
- elapsed "install"
49+
# Lint check deps.
10250
- pip install flake8==3.5.0
51+
- pip install yamllint==1.5.0
52+
# TensorBoard deps.
10353
- pip install futures==3.1.1
10454
- pip install grpcio==1.6.3
105-
- pip install moto==1.3.7
106-
- pip install yamllint==1.5.0
55+
# Uninstall older Travis numpy to avoid upgrade-in-place issues.
56+
- pip uninstall -y numpy
10757
- |
10858
# Install TensorFlow if requested
10959
if [ -n "${TF_VERSION_ID}" ]; then
11060
pip install -I "${TF_VERSION_ID}"
11161
else
112-
# Requirements typically found through TensorFlow
113-
pip install "absl-py>=0.7.0"
114-
pip install "numpy<2.0,>=1.14.5"
62+
# Requirements typically found through TensorFlow.
63+
pip install "absl-py>=0.7.0" \
64+
&& pip install "numpy<2.0,>=1.14.5"
11565
fi
66+
# Deps for gfile S3 test.
67+
- pip install boto3==1.9.86
68+
- pip install moto==1.3.7
69+
# Workaround for https://github.com/travis-ci/travis-ci/issues/7940
70+
- sudo rm -f /etc/boto.cfg
71+
- elapsed "install (done)"
11672

11773
before_script:
118-
# fail the build if there are Python syntax errors or undefined names
74+
- elapsed "before_script"
75+
# Do a fail-fast check for Python syntax errors or undefined names.
76+
# Use the comment '# noqa: <error code>' to suppress.
11977
- flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
120-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
121-
# a comment of '# noqa' or better yet '# noqa: <error code>' added to the code to silence flake8
122-
- flake8 . --count --exit-zero --ignore=E111,E114 --max-complexity=10 --max-line-length=127 --statistics
12378
# Lint .yaml docs files. Use '# yamllint disable-line rule:foo' to suppress.
12479
- yamllint -c docs/.yamllint docs docs/.yamllint
80+
# Make sure that IPython notebooks have valid Markdown.
81+
- tensorboard/tools/docs_list_format_test.sh
12582
# Make sure we aren't accidentally including work-in-progress code.
12683
- tensorboard/tools/do_not_submit_test.sh
12784
# Make sure all necessary files have the license information.
12885
- tensorboard/tools/license_test.sh
129-
# Make sure that IPython notebooks have valid Markdown.
130-
- tensorboard/tools/docs_list_format_test.sh
131-
132-
# Commands in this section should only fail if it's our fault. Travis will
133-
# categorize them as 'failed', rather than 'error' for other sections.
134-
script:
135-
# Note: bazel test implies fetch+build, but this gives us timing.
136-
- bazel fetch //tensorboard/...
137-
- bazel build //tensorboard/...
86+
# Make sure that build URLs are valid.
87+
- tensorboard/tools/mirror_urls_test.sh
88+
# Make sure that files have no trailing whitespace.
89+
- tensorboard/tools/whitespace_hygiene_test.py
13890
- |
139-
# When TensorFlow is not installed, run a restricted subset of tests.
91+
# Specify subset of tests to run depending on TF installation config.
92+
# We condition the value of --test_tag_filters so that we can run the
93+
# bazel test command unconditionally which produces nicer log output.
14094
if [ -z "${TF_VERSION_ID}" ]; then
14195
test_tag_filters=support_notf
14296
else
14397
test_tag_filters=
14498
fi
145-
- bazel test //tensorboard/... --test_tag_filters="${test_tag_filters}"
99+
- elapsed "before_script (done)"
100+
101+
# Commands in this section should only fail if it's our fault. Travis will
102+
# categorize them as 'failed', rather than 'error' for other sections.
103+
script:
104+
- elapsed "script"
105+
# Note: bazel test implies fetch+build, but this gives us timing.
106+
- elapsed && bazel fetch //tensorboard/...
107+
- elapsed && bazel build //tensorboard/...
108+
- elapsed && bazel test //tensorboard/... --test_tag_filters="${test_tag_filters}"
109+
- elapsed && bazel run //tensorboard/pip_package:test_pip_package -- --default-python-only --tf-version "${TF_VERSION_ID}"
146110
# Run manual S3 test
147-
- bazel test //tensorboard/compat/tensorflow_stub:gfile_s3_test
148-
- bazel run //tensorboard/pip_package:build_pip_package -- --tf-version "${TF_VERSION_ID}" --smoke
111+
- elapsed && bazel test //tensorboard/compat/tensorflow_stub:gfile_s3_test
112+
- elapsed && bazel test //tensorboard/summary/writer:event_file_writer_s3_test
113+
- elapsed "script (done)"
149114

150115
after_script:
151116
# Bazel launches daemons unless --batch is used.
117+
- elapsed "after_script"
152118
- bazel shutdown
153119

154-
before_cache:
155-
- |
156-
# Scrub tiny build artifacts not worth caching.
157-
find "${HOME}/.bazel-output-base" \
158-
-name \*.runfiles -print0 \
159-
-or -name \*.tar.gz -print0 \
160-
-or -name \*-execroot.json -print0 \
161-
-or -name \*-tsc.json -print0 \
162-
-or -name \*-params.pbtxt -print0 \
163-
-or -name \*-args.txt -print0 \
164-
-or -name \*.runfiles_manifest -print0 \
165-
-or -name \*.server_params.pbtxt -print0 \
166-
| xargs -0 rm -rf
167-
168120
notifications:
169121
email: false

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# TensorBoard [![Travis build status](https://www.travis-ci.com/tensorflow/tensorboard.svg?branch=master)](https://travis-ci.com/tensorflow/tensorboard/)
1+
# TensorBoard [![Travis build status](https://www.travis-ci.com/tensorflow/tensorboard.svg?branch=master)](https://travis-ci.com/tensorflow/tensorboard/) [![Compat check PyPI](https://python-compatibility-tools.appspot.com/one_badge_image?package=tensorboard)](https://python-compatibility-tools.appspot.com/one_badge_target?package=tensorboard)
22

33
TensorBoard is a suite of web applications for inspecting and understanding your
44
TensorFlow runs and graphs.
@@ -7,20 +7,20 @@ This README gives an overview of key concepts in TensorBoard, as well as how to
77
interpret the visualizations TensorBoard provides. For an in-depth example of
88
using TensorBoard, see the tutorial: [TensorBoard: Visualizing
99
Learning][].
10-
For in-depth information on the Graph Visualizer, see this tutorial:
10+
For in-depth information on the Graph Visualizer, see this tutorial:
1111
[TensorBoard: Graph Visualization][].
1212

1313
[TensorBoard: Visualizing Learning]: https://www.tensorflow.org/get_started/summaries_and_tensorboard
1414
[TensorBoard: Graph Visualization]: https://www.tensorflow.org/get_started/graph_viz
1515

1616
You may also want to watch
1717
[this video tutorial][] that walks
18-
through setting up and using TensorBoard. There's an associated
18+
through setting up and using TensorBoard. There's an associated
1919
[tutorial with an end-to-end example of training TensorFlow and using TensorBoard][].
2020

2121
[this video tutorial]: https://www.youtube.com/watch?v=eBbEDRsCmv4
2222

23-
[tutorial with an end-to-end example of training TensorFlow and using TensorBoard]: https://github.com/dandelionmane/tf-dev-summit-tensorboard-tutorial
23+
[tutorial with an end-to-end example of training TensorFlow and using TensorBoard]: https://github.com/martinwicke/tf-dev-summit-tensorboard-tutorial
2424

2525
# Usage
2626

@@ -33,7 +33,7 @@ directory by creating a summary writer:
3333
file_writer = tf.summary.FileWriter('/path/to/logs', sess.graph)
3434
```
3535

36-
For more details, see
36+
For more details, see
3737
[the TensorBoard tutorial](https://www.tensorflow.org/get_started/summaries_and_tensorboard).
3838
Once you have event files, run TensorBoard and provide the log directory. If
3939
you're using a precompiled TensorFlow package (e.g. you installed via pip), run:
@@ -66,7 +66,7 @@ work, but there may be bugs or performance issues.
6666
### Summary Ops: How TensorBoard gets data from TensorFlow
6767

6868
The first step in using TensorBoard is acquiring data from your TensorFlow run.
69-
For this, you need
69+
For this, you need
7070
[summary ops](https://www.tensorflow.org/api_docs/python/tf/summary).
7171
Summary ops are ops, like
7272
[`tf.matmul`](https://www.tensorflow.org/versions/r1.2/api_docs/python/tf/matmul)

0 commit comments

Comments
 (0)