Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7ea9258
program: add subcommand CLI support (#2793)
wchargin Oct 19, 2019
a4fb578
proto: enable compiling gRPC services (#2800)
wchargin Oct 21, 2019
50ab70c
program: don’t set default flags on base parser (#2807)
wchargin Oct 21, 2019
4d31a4b
proto: support build deps (#2809)
wchargin Oct 21, 2019
41458d2
util: add `grpc_util` with backoff helper (#2810)
wchargin Oct 22, 2019
3dcc4b2
Add uploader gRPC client (#2822)
wchargin Oct 24, 2019
088762d
Bump `grpcio` version to 1.24.3 (#2829)
wchargin Oct 24, 2019
7b036fe
uploader: add license directive to build file (#2828)
wchargin Oct 24, 2019
c7c6f7a
Backport `mock` assertions for Python 2 tests (#2837)
wchargin Oct 25, 2019
82081bd
Configure oauth for uploader client and make it required (#2836)
nfelt Oct 25, 2019
34c53dc
Set default --grpc_creds_type to ssl, not ssl_dev (#2838)
nfelt Oct 25, 2019
865b139
uploader: clarify that uploads run forever (#2841)
wchargin Oct 26, 2019
fe1e8e4
ci: unpin 2019-09-17 estimator nightlies (#2835)
wchargin Oct 26, 2019
5d88ea8
uploader: parse JSON from Unicode for Python 3.5 (#2845)
wchargin Oct 27, 2019
ca946bc
uploader: fix `auth revoke` help suggestion (#2842)
wchargin Oct 27, 2019
a00be9c
uploader: include TensorBoard version in RPCs (#2843)
wchargin Oct 27, 2019
6b0c015
uploader: fix export when outdir has no slash (#2847)
wchargin Oct 28, 2019
15cbf47
uploader: change request batch size to 128 KiB (#2849)
wchargin Oct 29, 2019
0ec6928
uploader: add TensorBoard.dev branding (#2851)
wchargin Oct 29, 2019
0a7dd7b
uploader: set default endpoint to production (#2856)
wchargin Oct 29, 2019
df5dc32
Fix comment in export.proto (#2853)
bileschi Oct 29, 2019
69ec245
Improve error handling for exporting large experiments (#2852)
bileschi Oct 29, 2019
c243b6d
uploader: link to `/policy/terms/`, not `terms.html`
wchargin Oct 29, 2019
6ab7f10
Add 2.0.1 relnotes to RELEASE.md
wchargin Oct 29, 2019
9278fdf
TensorBoard 2.0.1
wchargin Oct 29, 2019
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
12 changes: 4 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ install:
- pip install yamllint==1.17.0
# TensorBoard deps.
- pip install futures==3.1.1
- pip install grpcio==1.6.3
- pip install grpcio==1.24.3
- pip install grpcio-testing==1.24.3
- pip install 'google-auth >= 1.6.3, < 2'
- pip install 'google-auth-oauthlib >= 0.4.1, < 0.5'
- yarn install --ignore-engines
# Uninstall older Travis numpy to avoid upgrade-in-place issues.
- pip uninstall -y numpy
Expand All @@ -66,13 +69,6 @@ install:
pip install "absl-py>=0.7.0" \
&& pip install "numpy<2.0,>=1.14.5"
fi
- |
# On TF 1.x nightlies, downgrade estimator temporarily.
case "${TF_VERSION_ID}" in
tf-nightly|tf-nightly==*)
pip install tf-estimator-nightly==1.14.0.dev2019091701
;;
esac
# Deps for gfile S3 test.
- pip install boto3==1.9.86
- pip install moto==1.3.7
Expand Down
6 changes: 6 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Release 2.0.1

## Features
- Preview of TensorBoard.dev uploader! Check out <https://tensorboard.dev/> for
information and usage instructions.

# Release 2.0.0

The 2.0 minor series tracks TensorFlow 2.0.
Expand Down
43 changes: 43 additions & 0 deletions tensorboard/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ py_binary(
":program",
"//tensorboard:expect_tensorflow_installed",
"//tensorboard/plugins:base_plugin",
"//tensorboard/uploader:uploader_main_lib",
"//tensorboard/util:tb_logging",
],
)
Expand Down Expand Up @@ -150,6 +151,7 @@ py_library(
"//tensorboard:expect_absl_logging_installed",
"//tensorboard/backend:application",
"//tensorboard/backend/event_processing:event_file_inspector",
"//tensorboard/util:argparse_util",
"@org_pocoo_werkzeug",
"@org_pythonhosted_six",
],
Expand All @@ -169,6 +171,7 @@ py_test(
"//tensorboard/plugins:base_plugin",
"//tensorboard/plugins/core:core_plugin",
"@org_pocoo_werkzeug",
"@org_pythonhosted_mock",
],
)

Expand Down Expand Up @@ -274,6 +277,22 @@ py_library(
visibility = ["//visibility:public"],
)

py_library(
name = "expect_grpc_installed",
# This is a dummy rule used as a grpc dependency in open-source.
# We expect grpc to already be installed on the system, e.g. via
# `pip install grpcio`
visibility = ["//visibility:public"],
)

py_library(
name = "expect_grpc_testing_installed",
# This is a dummy rule used as a grpc_testing dependency in open-source.
# We expect grpc_testing to already be installed on the system, e.g. via
# `pip install grpcio_testing`
visibility = ["//visibility:public"],
)

py_library(
name = "expect_sqlite3_installed",
# This is a dummy rule used as a sqlite3 dependency in open-source.
Expand Down Expand Up @@ -306,6 +325,14 @@ py_library(
visibility = ["//visibility:public"],
)

py_library(
name = "expect_absl_flags_argparse_flags_installed",
# This is a dummy rule used as a absl-py dependency in open-source.
# We expect absl-py to already be installed on the system, e.g. via
# `pip install absl-py`
visibility = ["//visibility:public"],
)

py_library(
name = "expect_absl_logging_installed",
# This is a dummy rule used as a absl-py dependency in open-source.
Expand All @@ -322,6 +349,22 @@ py_library(
visibility = ["//visibility:public"],
)

py_library(
name = "expect_google_auth_installed",
# This is a dummy rule used as a google_auth dependency in open-source.
# We expect google_auth to already be installed on the system, e.g., via
# `pip install google-auth`.
visibility = ["//visibility:public"],
)

py_library(
name = "expect_google_auth_oauthlib_installed",
# This is a dummy rule used as a google_auth oauthlib_dependency in open-source.
# We expect google_auth_oauthlib to already be installed on the system, e.g., via
# `pip install google-auth-oauthlib`.
visibility = ["//visibility:public"],
)

py_library(
name = "expect_pkg_resources_installed",
# This is a dummy rule used as a pkg-resources dependency in open-source.
Expand Down
31 changes: 31 additions & 0 deletions tensorboard/defs/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package(default_visibility = ["//tensorboard:internal"])

load("//tensorboard/defs:protos.bzl", "tb_proto_library")

licenses(["notice"]) # Apache 2.0

filegroup(
Expand All @@ -13,4 +15,33 @@ filegroup(
visibility = ["//visibility:public"],
)

py_test(
name = "tb_proto_library_test",
srcs = ["tb_proto_library_test.py"],
deps = [
":test_base_py_pb2",
":test_base_py_pb2_grpc",
":test_downstream_py_pb2",
":test_downstream_py_pb2_grpc",
"//tensorboard:test",
],
)

tb_proto_library(
name = "test_base",
srcs = ["test_base.proto"],
has_services = True,
testonly = True,
)

tb_proto_library(
name = "test_downstream",
srcs = ["test_downstream.proto"],
deps = [
":test_base",
],
has_services = True,
testonly = True,
)

exports_files(["web_test_python_stub.template.py"])
64 changes: 52 additions & 12 deletions tensorboard/defs/protos.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,56 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@com_google_protobuf//:protobuf.bzl", "py_proto_library")
load("@com_google_protobuf//:protobuf.bzl", "proto_gen")

def tb_proto_library(name, srcs=None, visibility=None, testonly=None):
py_proto_library(
name = name + "_py_pb2",
srcs = srcs,
srcs_version = "PY2AND3",
deps = ["@com_google_protobuf//:protobuf_python"],
protoc = "@com_google_protobuf//:protoc",
visibility = visibility,
default_runtime = "@com_google_protobuf//:protobuf_python",
testonly = testonly,
)
def tb_proto_library(
name,
srcs = None,
deps = [],
visibility = None,
testonly = None,
has_services = False):
outs_proto = _PyOuts(srcs, grpc = False)
outs_grpc = _PyOuts(srcs, grpc = True) if has_services else []
outs_all = outs_proto + outs_grpc

runtime = "@com_google_protobuf//:protobuf_python"

proto_gen(
name = name + "_genproto",
srcs = srcs,
deps = [s + "_genproto" for s in deps] + [runtime + "_genproto"],
includes = [],
protoc = "@com_google_protobuf//:protoc",
gen_py = True,
outs = outs_all,
visibility = ["//visibility:public"],
plugin = "//external:grpc_python_plugin" if has_services else None,
plugin_language = "grpc",
)

py_deps = [s + "_py_pb2" for s in deps] + [runtime]
native.py_library(
name = name + "_py_pb2",
srcs = outs_proto,
imports = [],
srcs_version = "PY2AND3",
deps = py_deps,
testonly = testonly,
visibility = visibility,
)
if has_services:
native.py_library(
name = name + "_py_pb2_grpc",
srcs = outs_grpc,
imports = [],
srcs_version = "PY2AND3",
deps = [name + "_py_pb2"] + py_deps,
testonly = testonly,
visibility = visibility,
)

def _PyOuts(srcs, grpc):
# Adapted from @com_google_protobuf//:protobuf.bzl.
ext = "_pb2.py" if not grpc else "_pb2_grpc.py"
return [s[:-len(".proto")] + ext for s in srcs]
44 changes: 44 additions & 0 deletions tensorboard/defs/tb_proto_library_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Tests for the `tb_proto_library` build macro."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from tensorboard import test as tb_test
from tensorboard.defs import test_base_pb2
from tensorboard.defs import test_base_pb2_grpc
from tensorboard.defs import test_downstream_pb2
from tensorboard.defs import test_downstream_pb2_grpc


class TbProtoLibraryTest(tb_test.TestCase):
"""Tests for `tb_proto_library`."""

def tests_with_deps(self):
foo = test_base_pb2.Foo()
foo.foo = 1
bar = test_downstream_pb2.Bar()
bar.foo.foo = 1
self.assertEqual(foo, bar.foo)

def test_service_deps(self):
self.assertIsInstance(test_base_pb2_grpc.FooServiceServicer, type)
self.assertIsInstance(test_downstream_pb2_grpc.BarServiceServicer, type)


if __name__ == "__main__":
tb_test.main()
33 changes: 33 additions & 0 deletions tensorboard/defs/test_base.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

syntax = "proto3";

message Foo {
int32 foo = 1;
}

service FooService {
// Loads some objects.
rpc GetFoo(GetFooRequest) returns (GetFooResponse);
}

message GetFooRequest {
int32 count = 1;
}

message GetFooResponse {
repeated Foo foo = 1;
}
36 changes: 36 additions & 0 deletions tensorboard/defs/test_downstream.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

syntax = "proto3";

import "tensorboard/defs/test_base.proto";

message Bar {
Foo foo = 1;
int32 bar = 2;
}

service BarService {
// Loads some objects.
rpc GetBar(GetBarRequest) returns (GetBarResponse);
}

message GetBarRequest {
int32 count = 1;
}

message GetBarResponse {
repeated Bar bar = 1;
}
4 changes: 3 additions & 1 deletion tensorboard/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
from tensorboard import program
from tensorboard.compat import tf
from tensorboard.plugins import base_plugin
from tensorboard.uploader import uploader_main
from tensorboard.util import tb_logging


Expand All @@ -56,7 +57,8 @@ def run_main():

tensorboard = program.TensorBoard(
default.get_plugins() + default.get_dynamic_plugins(),
program.get_default_assets_zip_provider())
program.get_default_assets_zip_provider(),
subcommands=[uploader_main.UploaderSubcommand()])
try:
from absl import app
# Import this to check that app.run() will accept the flags_parser argument.
Expand Down
4 changes: 3 additions & 1 deletion tensorboard/pip_package/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
'absl-py >= 0.4',
# futures is a backport of the python 3.2+ concurrent.futures module
'futures >= 3.1.1; python_version < "3"',
'grpcio >= 1.6.3',
'grpcio >= 1.24.3',
'google-auth >= 1.6.3, < 2',
'google-auth-oauthlib >= 0.4.1, < 0.5',
'markdown >= 2.6.8',
'numpy >= 1.12.0',
'protobuf >= 3.6.0',
Expand Down
Loading