Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup: fix all remaining trailing whitespace #2381

Merged
merged 2 commits into from
Jun 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ 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: Visualizing
Learning][].
For in-depth information on the Graph Visualizer, see this tutorial:
For in-depth information on the Graph Visualizer, see this tutorial:
[TensorBoard: Graph Visualization][].

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

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

[this video tutorial]: https://www.youtube.com/watch?v=eBbEDRsCmv4
Expand All @@ -33,7 +33,7 @@ directory by creating a summary writer:
file_writer = tf.summary.FileWriter('/path/to/logs', sess.graph)
```

For more details, see
For more details, see
[the TensorBoard tutorial](https://www.tensorflow.org/get_started/summaries_and_tensorboard).
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:
Expand Down Expand Up @@ -66,7 +66,7 @@ work, but there may be bugs or performance issues.
### 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
For this, you need
[summary ops](https://www.tensorflow.org/api_docs/python/tf/summary).
Summary ops are ops, like
[`tf.matmul`](https://www.tensorflow.org/versions/r1.2/api_docs/python/tf/matmul)
Expand Down
8 changes: 4 additions & 4 deletions docs/r1/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ TensorFlow runs and graphs.
This overview covers the key concepts in TensorBoard, as well as how to
interpret the visualizations TensorBoard provides. For an in-depth example of
using TensorBoard, see the [summaries guide][summaries.md].
For in-depth information on the Graph Visualizer, see the [graphs guide](graphs.md).
For in-depth information on the Graph Visualizer, see the [graphs guide](graphs.md).

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

[this video tutorial]: https://www.youtube.com/watch?v=eBbEDRsCmv4
Expand All @@ -28,7 +28,7 @@ directory by creating a summary writer:
file_writer = tf.summary.FileWriter('/path/to/logs', sess.graph)
```

For more details, see
For more details, see
[the TensorBoard tutorial](https://www.tensorflow.org/get_started/summaries_and_tensorboard).
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:
Expand Down Expand Up @@ -61,7 +61,7 @@ work, but there may be bugs or performance issues.
### 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
For this, you need
[summary ops](https://www.tensorflow.org/api_docs/python/tf/summary).
Summary ops are ops, like
[`tf.matmul`](https://www.tensorflow.org/versions/r1.2/api_docs/python/tf/matmul)
Expand Down
4 changes: 2 additions & 2 deletions tensorboard/components/tf_color_scale/palettes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ export const palettes = {
// (https://personal.sron.nl/~pault/).
tensorboardColorBlindAssist: [
'#ff7043', // orange
'#0077bb', // blue
'#0077bb', // blue
'#cc3311', // red
'#33bbee', // cyan
'#33bbee', // cyan
'#ee3377', // magenta
'#009988', // teal
'#bbbbbb', // grey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ <h3>The custom scalars dashboard is inactive.</h3>
this._requestManager.request(url).then(handlePluginsListingResponse);
},
_reloadCharts() {
const charts =
this.querySelectorAll('tf-custom-scalar-margin-chart-card, ' +
const charts =
this.querySelectorAll('tf-custom-scalar-margin-chart-card, ' +
'tf-custom-scalar-multi-line-chart-card');
charts.forEach(chart => {
chart.reload();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
transform: translate(-50%, -50%);
}

/** This block prevents the bars rotator from having a height that is
/** This block prevents the bars rotator from having a height that is
the entire viewport, thus occluding it and giving it an undesired cursor
value. */
.bars-rotator {
Expand Down
2 changes: 1 addition & 1 deletion tensorboard/plugins/graph/tf_graph_common/edge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ export function appendEdge(edgeGroup, d: EdgeData,
// Give the path a unique id, which will be used to link
// the textPath (edge label) to this path.
let pathId = 'path_' + getEdgeKey(d);

let strokeWidth;
if (sceneElement.renderHierarchy.edgeWidthFunction) {
// Compute edge thickness based on the user-specified method.
Expand Down
6 changes: 3 additions & 3 deletions tensorboard/plugins/hparams/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ limitations under the License.
* Contains TypeScript type definitions for the JSON-representation of the
* protocol buffers defined in api.proto
*
* TODO(erez): Add the rest of the definitions once these are needed.
* TODO(erez): Add the rest of the definitions once these are needed.
*/
declare namespace tf.hparams {
export interface MetricName {
group: string,
tag: string,
}

export interface MetricValue {
name: MetricName,
value: number,
trainingStep: number,
wallTimeSecs: number,
}

export interface SessionGroup {
name: string,
hparams: {
Expand Down
6 changes: 3 additions & 3 deletions tensorboard/plugins/hparams/http_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ HParams backend supports calling requests with both HTTP POST and GET.
Each method below has an associated 'request' protocol buffer and returns
a 'response' protocol buffer. The 'request' is expected to be encoded in JSON
format and the response will be returned encoded in JSON format. Encoding protos
to JSON format is described
to JSON format is described
[here](https://developers.google.com/protocol-buffers/docs/proto3#json)).

For POST the request is expected to be passed in the request body. For GET the
request is expected to be passed (properly escaped) in a URL query parameter
named 'request'.
request is expected to be passed (properly escaped) in a URL query parameter
named 'request'.

### Notes:
1. Per Tensorboard's conventions, each end-point has a "data/plugin/hparams"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
tf-hparams-google-analytics-tracker is an element with no-op methods
and thus doesn't need tests. We keep this file here instead of deleting
it entirely, so that we don't need to change the sites where its used
as well, when syncing the code back to Google's internal repo.
as well, when syncing the code back to Google's internal repo.
-->
<html>
<head>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
}
const configuration = this.options.configuration;
// See if we need to redraw from scratch. We redraw from scratch if
// this is initialization or if configuration.schema has changed.
// this is initialization or if configuration.schema has changed.
if (this._interactionManager === undefined ||
!_.isEqual(this._interactionManager.schema(),
configuration.schema)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
// The URL to use for the bug-report button.
bugReportUrl: String,
experimentName: String,
// See the comments in tf-hparams-query-pane.html for details.
// See the comments in tf-hparams-query-pane.html for details.
configuration: Object,
sessionGroups: Array,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ sh_binary(
"local",
"manual",
],
)
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# To release a new version of witwidget on PyPI and NPM:

1. Ensure updated version numbers have been merged to the master branch in
tensorboard/plugins/interactive_inference/witwidget/version.py
and tensorboard/plugins/interactive_inference/witwidget/notebook/jupyter/js/package.json
Expand Down
14 changes: 7 additions & 7 deletions tensorboard/plugins/mesh/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ py_test(
srcs = ["metadata_test.py"],
srcs_version = "PY2AND3",
deps = [
":metadata",
":metadata",
"//tensorboard:expect_tensorflow_installed",
"//tensorboard/util:test_util",
"@org_pythonhosted_mock",
Expand All @@ -48,9 +48,9 @@ py_library(
deps = [
":metadata",
":protos_all_py_pb2",
"//tensorboard:expect_numpy_installed",
"//tensorboard:expect_numpy_installed",
"//tensorboard:plugin_util",
"//tensorboard/backend:http_util",
"//tensorboard/backend:http_util",
"//tensorboard/plugins:base_plugin",
"//tensorboard/util:tensor_util",
"@org_pythonhosted_six",
Expand All @@ -65,7 +65,7 @@ py_library(
srcs_version = "PY2AND3",
deps = [
":summary",
"//tensorboard:expect_tensorflow_installed",
"//tensorboard:expect_tensorflow_installed",
"//tensorboard/backend:application",
"//tensorboard/backend/event_processing:event_multiplexer",
"@org_pocoo_werkzeug",
Expand All @@ -81,8 +81,8 @@ py_test(
":mesh_plugin",
":summary",
":test_utils",
"//tensorboard:expect_numpy_installed",
"//tensorboard:expect_tensorflow_installed",
"//tensorboard:expect_numpy_installed",
"//tensorboard:expect_tensorflow_installed",
"//tensorboard/backend:application",
"//tensorboard/backend/event_processing:event_multiplexer",
"//tensorboard/plugins:base_plugin",
Expand Down Expand Up @@ -114,7 +114,7 @@ py_test(
srcs_version = "PY2AND3",
deps = [
":summary",
":test_utils",
":test_utils",
"//tensorboard:expect_tensorflow_installed",
"//tensorboard/util:test_util",
],
Expand Down
14 changes: 7 additions & 7 deletions tensorboard/plugins/mesh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Overview

Meshes and point clouds are important and powerful types of data to represent
3D shapes and widely studied in the field of computer vision and computer
Meshes and point clouds are important and powerful types of data to represent
3D shapes and widely studied in the field of computer vision and computer
graphics.

3D data is becoming more ubiquitous and researchers attack new problems like
Expand All @@ -22,8 +22,8 @@ interact with the rendered objects.
## Summary API

Meshes and point clouds can be represented by a set of tensors. For
example, one can view a point cloud as a set of 3D coordinates of the points
and some colors associated with each point. Check out a simple example with
example, one can view a point cloud as a set of 3D coordinates of the points
and some colors associated with each point. Check out a simple example with
static mesh:

```python
Expand All @@ -36,7 +36,7 @@ point_colors = tf.constant([[[128, 104, 227], ...]], shape=[1, 1064, 3])
summary = mesh_summary.op('point_cloud', vertices=point_cloud, colors=point_colors)
```

**NOTE:** The `colors` tensor is optional in this case but can be useful to
**NOTE:** The `colors` tensor is optional in this case but can be useful to
show different semantics of the points.

A mesh can be represented by a point cloud together with a set of faces,
Expand Down Expand Up @@ -89,7 +89,7 @@ camera_config = {
...
```

Keep in mind that scene configuration is not a trainable variable (i.e., it is
Keep in mind that scene configuration is not a trainable variable (i.e., it is
a static attribute) and is fixed at summary-creation time.

## Example
Expand All @@ -107,7 +107,7 @@ bazel run tensorboard/plugins/mesh:mesh_demo -- --mesh_path=path/to/ply/file

## How to install

The mesh plugin isn’t yet part of stable TensorBoard, so you’ll need to
The mesh plugin isn’t yet part of stable TensorBoard, so you’ll need to
install the latest TensorBoard nightly build to use it.

### Colab
Expand Down
42 changes: 21 additions & 21 deletions tensorboard/plugins/mesh/http_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,49 +18,49 @@ Here is an example:
"train_run": {
"mesh_color_tensor": {
"samples": 1
},
},
"point_cloud": {
"samples": 1
}
}
}
```
Note that runs without any mesh tags are included as keys with value the empty
Note that runs without any mesh tags are included as keys with value the empty
dictionary.


## `/data/plugin/mesh/meshes?tag=mesh_color_tensor&run=train_run&sample=0`

Retrieves all necessary metadata to render a mesh with particular tag.

Returns list of metadata for each data (tensor) that should be retrieved next.
This includes content type (i.e. vertices, faces or colors), shape of the
data, scene configuration, wall time etc. Type of the content maps directly to
underlying binary data type, i.e. `float32`, `int32` or `uint8`. Content type
mapping to their enum constant representations is given by a
Returns list of metadata for each data (tensor) that should be retrieved next.
This includes content type (i.e. vertices, faces or colors), shape of the
data, scene configuration, wall time etc. Type of the content maps directly to
underlying binary data type, i.e. `float32`, `int32` or `uint8`. Content type
mapping to their enum constant representations is given by a
[proto definition](https://github.com/tensorflow/tensorboard/plugins/mesh/plugin_data.proto).

Here is an example:
```json
[
{
"config": "{\"camera\": {\"cls\": \"PerspectiveCamera\", \"fov\":
{
"config": "{\"camera\": {\"cls\": \"PerspectiveCamera\", \"fov\":
75}}",
"data_shape": [1, 17192, 3],
"step": 0,
"content_type": 2,
"wall_time": 1556678491.836787
},
{
"config": "{\"camera\": {\"cls\": \"PerspectiveCamera\", \"fov\":
{
"config": "{\"camera\": {\"cls\": \"PerspectiveCamera\", \"fov\":
75}}",
"data_shape": [1, 9771, 3],
"step": 0,
"content_type": 3,
"wall_time": 1556678491.836787
},
{
"config": "{\"camera\": {\"cls\": \"PerspectiveCamera\", \"fov\":
{
"config": "{\"camera\": {\"cls\": \"PerspectiveCamera\", \"fov\":
75}}",
"data_shape": [1, 9771, 3],
"step": 0,
Expand All @@ -69,19 +69,19 @@ Here is an example:
}
]
```
Scene configuration is a JSON string passed to `config_dict` during summary
creation and may contain the following high-level keys: `camera`, `lights` and
`material`. Each such key must correspond to an object with `cls` property
which must be a valid THREE.js class. The rest of the keys of the object will
be used as parameters to the class constructor and should also be valid
Scene configuration is a JSON string passed to `config_dict` during summary
creation and may contain the following high-level keys: `camera`, `lights` and
`material`. Each such key must correspond to an object with `cls` property
which must be a valid THREE.js class. The rest of the keys of the object will
be used as parameters to the class constructor and should also be valid
THREE.js options. Invalid keys will be ignored by the library.


## `/data/plugin/mesh/data?tag=mesh_color_tensor&run=train_run&content_type=VERTEX&sample=0`

Retrieves binary data of particular type representing some part of the mesh,
Retrieves binary data of particular type representing some part of the mesh,
for example vertices with 3D coordinates.

Returns stream of binary data, which will represent either mesh vertices,
faces or RGB colors. Response type of this request is set to `arraybuffer`
Returns stream of binary data, which will represent either mesh vertices,
faces or RGB colors. Response type of this request is set to `arraybuffer`
therefore Typed Array will be received instead of a JSON string.
2 changes: 1 addition & 1 deletion tensorboard/plugins/mesh/mesh_plugin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import mock # pylint: disable=g-import-not-at-top,unused-import


@tensorboard_test_util.run_v1_only('requires tf.Session')
@tensorboard_test_util.run_v1_only('requires tf.Session')
class MeshPluginTest(tf.test.TestCase):
"""Tests for mesh plugin server."""

Expand Down
Loading