Skip to content

Commit 35d735f

Browse files
authored
Expand tilde at the beginning of paths (#6292)
* Motivation for features / changes Executing event_exporter with `--root_dir=~/tensorboard-logdirs/my_test_dir` fails because gfile does not automatically expand the homedir tilde. * Technical description of changes Explicitly expands the user directory before scanning subdirs. * Detailed steps to verify changes work correctly (as executed by you) Ran tests and attempted uploads using both alias and unaliased dir. Played around with unit tests and gave up. All our other tests put files in a tempdir, which is different from the homedir by definition. Decided it wasn't worth playing with the tester's homedir or mocking it out.
1 parent d07c2c0 commit 35d735f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tensorboard/backend/event_processing/plugin_event_multiplexer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ def AddRunsFromDirectory(self, path, name=None):
201201
Returns:
202202
The `EventMultiplexer`.
203203
"""
204+
path = os.path.expanduser(path)
204205
logger.info("Starting AddRunsFromDirectory: %s", path)
205206
for subdir in io_wrapper.GetLogdirSubdirectories(path):
206207
logger.info("Adding run from directory %s", subdir)

0 commit comments

Comments
 (0)