core: add --url_file flag for scripting purposes
#1778
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
When TensorBoard launches its server, it prints a message to stderr
listing the URL on which it serves. This is convenient for humans, but
not for scripts: scripts would have to capture stderr and parse out the
appropriate line. As of this commit, TensorBoard will also write this
URL unadorned to a file given by
--url_file.Test Plan:
After building with
bazel build //tensorboard, invoking TensorBoardfrom
./bazel-bin/tensorboard/tensorboardwith--helpprints the newargument with its help text (though the nice newlines are removed,
sadly).
Launching with
--logdir x --url_file y --port 0writes a URL to./yand concurrently launches the server;
curl "$(cat y)"works.Running
bazel run //tensorboard -- --logdir x --url_file ydoes notoutput to the right file, because
bazelinvokestensorboardunder adifferent directory. But using
--url_file /tmp/ystill works evenunder
bazel run.wchargin-branch: url-file