Skip to content

Commit 4453c80

Browse files
committed
Merge branch 'master' into hparam_redux_final
2 parents 9ada47a + 28be621 commit 4453c80

27 files changed

+46
-5342
lines changed

tensorboard/BUILD

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ py_binary(
3434
":program",
3535
"//tensorboard:expect_tensorflow_installed",
3636
"//tensorboard/plugins:base_plugin",
37-
"//tensorboard/uploader:uploader_subcommand",
3837
"//tensorboard/util:tb_logging",
3938
"//tensorboard/util:timing", # non-strict dep, for patching convenience
4039
],
@@ -62,7 +61,6 @@ py_binary(
6261
":lib",
6362
":main_lib",
6463
":program",
65-
"//tensorboard/uploader:uploader_subcommand",
6664
],
6765
)
6866

@@ -442,11 +440,6 @@ py_library(name = "expect_absl_app_installed")
442440
# `pip install absl-py`
443441
py_library(name = "expect_absl_flags_installed")
444442

445-
# This is a dummy rule used as a absl-py dependency in open-source.
446-
# We expect absl-py to already be installed on the system, e.g. via
447-
# `pip install absl-py`
448-
py_library(name = "expect_absl_flags_argparse_flags_installed")
449-
450443
# This is a dummy rule used as a absl-py dependency in open-source.
451444
# We expect absl-py to already be installed on the system, e.g. via
452445
# `pip install absl-py`
@@ -457,26 +450,11 @@ py_library(name = "expect_absl_logging_installed")
457450
# `pip install absl-py`
458451
py_library(name = "expect_absl_testing_absltest_installed")
459452

460-
# This is a dummy rule used as a google_auth dependency in open-source.
461-
# We expect google_auth to already be installed on the system, e.g., via
462-
# `pip install google-auth`.
463-
py_library(name = "expect_google_auth_installed")
464-
465-
# This is a dummy rule used as a google_auth oauthlib_dependency in open-source.
466-
# We expect google_auth_oauthlib to already be installed on the system, e.g., via
467-
# `pip install google-auth-oauthlib`.
468-
py_library(name = "expect_google_auth_oauthlib_installed")
469-
470453
# This is a dummy rule used as a pkg-resources dependency in open-source.
471454
# We expect pkg-resources to already be installed on the system, e.g., via
472455
# `pip install setuptools`.
473456
py_library(name = "expect_pkg_resources_installed")
474457

475-
# This is a dummy rule used as a requests dependency in open-source.
476-
# We expect requests to already be installed on the system, e.g., via
477-
# `pip install requests`.
478-
py_library(name = "expect_requests_installed")
479-
480458
# This is a dummy rule used as a pandas dependency in open-source.
481459
# We expect pandas to already be installed on the system, e.g. via
482460
# `pip install pandas`.

tensorboard/main.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
from tensorboard import main_lib
2929
from tensorboard import program
3030
from tensorboard.plugins import base_plugin
31-
from tensorboard.uploader import uploader_subcommand
3231
from tensorboard.util import tb_logging
3332

3433
logger = tb_logging.get_logger()
@@ -37,11 +36,7 @@
3736
def run_main():
3837
"""Initializes flags and calls main()."""
3938
main_lib.global_init()
40-
41-
tensorboard = program.TensorBoard(
42-
plugins=default.get_plugins(),
43-
subcommands=[uploader_subcommand.UploaderSubcommand()],
44-
)
39+
tensorboard = program.TensorBoard(plugins=default.get_plugins())
4540
try:
4641
app.run(tensorboard.main, flags_parser=tensorboard.configure)
4742
except base_plugin.FlagsError as e:

tensorboard/main_dev.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from tensorboard import main_lib
2323
from tensorboard import program
2424
from tensorboard.plugins import base_plugin
25-
from tensorboard.uploader import uploader_subcommand
2625

2726

2827
def run_main():
@@ -33,7 +32,6 @@ def run_main():
3332
tensorboard = program.TensorBoard(
3433
plugins=default.get_plugins(),
3534
assets_zip_provider=lambda: open(path, "rb"),
36-
subcommands=[uploader_subcommand.UploaderSubcommand()],
3735
)
3836

3937
try:

tensorboard/main_lib.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@
2222
from tensorboard.compat import tf
2323

2424

25+
_TBDEV_SHUTDOWN_MESSAGE = """\
26+
======================================================================
27+
ERROR: The `tensorboard dev` command is no longer available.
28+
29+
TensorBoard.dev has been shut down. For further information,
30+
see the FAQ at <https://tensorboard.dev/>.
31+
======================================================================
32+
"""
33+
34+
2535
def global_init():
2636
"""Modifies the global environment for running TensorBoard as main.
2737
@@ -45,3 +55,9 @@ def global_init():
4555

4656
# Only emit log messages at WARNING and above by default to reduce spam.
4757
absl.logging.set_verbosity(absl.logging.WARNING)
58+
59+
# Intercept attempts to invoke `tensorboard dev` and print turndown message.
60+
if sys.argv[1:] and sys.argv[1] == "dev":
61+
sys.stderr.write(_TBDEV_SHUTDOWN_MESSAGE)
62+
sys.stderr.flush()
63+
sys.exit(1)

tensorboard/pip_package/requirements.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,13 @@
1818
absl-py >= 0.4
1919
# NOTE: this version should be >= the grpc version in our WORKSPACE file.
2020
grpcio >= 1.48.2
21-
google-auth >= 1.6.3, < 3
22-
google-auth-oauthlib >= 0.5, < 2
2321
markdown >= 2.6.8
2422
numpy >= 1.12.0
2523
# NOTE: this version must be >= the protoc version in our WORKSPACE file.
2624
# At the same time, any constraints we specify here must allow at least some
2725
# version to be installed that is also compatible with TensorFlow's constraints:
2826
# https://github.com/tensorflow/tensorflow/blob/9d22f4a0a9499c8e10a4312503e63e0da35ccd94/tensorflow/tools/pip_package/setup.py#L100-L107
2927
protobuf >= 3.19.6
30-
requests >= 2.21.0, < 3
3128
setuptools >= 41.0.0 # Note: provides pkg_resources as well as setuptools
3229
# A dependency of our vendored packages. This lower bound has not been correctly
3330
# vetted, but I wanted to be the least restrictive we can, since it's not a new

tensorboard/plugins/hparams/get_experiment.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
# ==============================================================================
1515
"""Classes and functions for handling the GetExperiment API call."""
1616

17+
from tensorboard.plugins.hparams import api_pb2
18+
1719

1820
class Handler:
1921
"""Handles a GetExperiment request."""
@@ -27,7 +29,7 @@ def __init__(
2729
request_context: A tensorboard.context.RequestContext.
2830
backend_context: A backend_context.Context instance.
2931
experiment_id: A string, as from `plugin_util.experiment_id`.
30-
request: A api_pb2.GetExperimentRequest instance.
32+
request: A request proto.
3133
"""
3234
self._request_context = request_context
3335
self._backend_context = backend_context
@@ -38,7 +40,11 @@ def __init__(
3840
not request.HasField("include_metrics")
3941
or request.include_metrics
4042
)
41-
self._hparams_limit = request.hparams_limit
43+
self._hparams_limit = (
44+
request.hparams_limit
45+
if isinstance(request, api_pb2.GetExperimentRequest)
46+
else None
47+
)
4248

4349
def run(self):
4450
"""Handles the request specified on construction.

tensorboard/plugins/hparams/hparams_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def download_data_route(self, request):
9393
ctx, self._context, experiment_id, request_proto
9494
).run()
9595
experiment = get_experiment.Handler(
96-
ctx, self._context, experiment_id
96+
ctx, self._context, experiment_id, request_proto
9797
).run()
9898
body, mime_type = download_data.Handler(
9999
self._context,

0 commit comments

Comments
 (0)