Skip to content

Commit 2c372be

Browse files
authored
Fix --one_shot for remote file system. (#4909)
Fixes uploads to TensorBoard.dev in the case where the logdir was not local.
1 parent 3032624 commit 2c372be

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tensorboard/uploader/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ py_library(
7676
"//tensorboard:expect_absl_logging_installed",
7777
"//tensorboard:expect_grpc_installed",
7878
"//tensorboard:program",
79+
"//tensorboard/compat:tensorflow",
7980
"//tensorboard/plugins:base_plugin",
8081
"//tensorboard/uploader/proto:protos_all_py_pb2_grpc",
8182
],

tensorboard/uploader/uploader_subcommand.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
from absl import logging
2525
import grpc
26+
from tensorboard.compat import tf
2627

2728
from tensorboard.uploader.proto import experiment_pb2
2829
from tensorboard.uploader.proto import export_service_pb2_grpc
@@ -416,7 +417,7 @@ def execute(self, server_info, channel):
416417
verbosity=self.verbosity,
417418
one_shot=self.one_shot,
418419
)
419-
if self.one_shot and not os.path.isdir(self.logdir):
420+
if self.one_shot and not tf.io.gfile.isdir(self.logdir):
420421
print("%s: No such directory." % self.logdir)
421422
print(
422423
"User specified `one_shot` mode with an unavailable "

0 commit comments

Comments
 (0)