Skip to content

Conversation

@wchargin
Copy link
Contributor

@wchargin wchargin commented Feb 5, 2019

Summary:
This commit implements functions write_info_file, remove_info_file,
and get_all on the tensorboard.manager module. See docs for details.

Supersedes part of #1795.

Test Plan:
Integration tests included; run bazel test //tensorboard:manager_test.

wchargin-branch: tensorboardinfo-io

@wchargin wchargin changed the base branch from master to wchargin-cache-key-str February 5, 2019 04:42
@wchargin wchargin force-pushed the wchargin-tensorboardinfo-io branch from 3f594d6 to f0884e6 Compare February 5, 2019 04:54
@wchargin wchargin force-pushed the wchargin-cache-key-str branch from 762203f to 62620dc Compare February 5, 2019 18:48
@wchargin wchargin force-pushed the wchargin-tensorboardinfo-io branch from f0884e6 to 311af09 Compare February 5, 2019 19:12
@wchargin wchargin removed the request for review from nfelt February 5, 2019 19:52
@wchargin wchargin changed the base branch from wchargin-cache-key-str to master February 5, 2019 19:57
@wchargin wchargin force-pushed the wchargin-tensorboardinfo-io branch from 311af09 to 5216432 Compare February 5, 2019 19:58
@wchargin wchargin force-pushed the wchargin-tensorboardinfo-io branch 2 times, most recently from 4a4ed31 to c62bcaa Compare February 6, 2019 16:08
@wchargin
Copy link
Contributor Author

wchargin commented Feb 6, 2019

@manivaradarajan, would you like me to wait for your review before
merging?

Summary:
This commit implements functions `write_info_file`, `remove_info_file`,
and `get_all` on the `tensorboard.manager` module. See docs for details.

Supersedes part of #1795.

Test Plan:
Integration tests included; run `bazel test //tensorboard:manager_test`.

wchargin-branch: tensorboardinfo-io
wchargin-branch: tensorboardinfo-io
Test Plan:
Fingers crossed (haven’t run locally; will see what Travis thinks).

wchargin-branch: tensorboardinfo-io
@wchargin wchargin force-pushed the wchargin-tensorboardinfo-io branch from c62bcaa to 41b4625 Compare February 6, 2019 20:02
wchargin added a commit that referenced this pull request Feb 6, 2019
Summary:
This commit wires up `TensorBoard.main` to the `TensorboardInfo` I/O
introduced in #1806.

Test Plan:
Run `bazel run //tensorboard -- --logdir ./whatever/`, then verify that
an info file has been created…

    $ ls /tmp/.tensorboard-info/
    pid-85532.info

…and that the file is visible to the Python APIs:

    $ python
    >>> from tensorboard import manager
    >>> infos = manager.get_all()
    >>> len(infos)
    1
    >>> infos[0].pid
    85532
    >>> infos[0].port
    6006

Then, SIGTERM the server and verify that this is reflected from Python…

    >>> import os
    >>> os.kill(infos[0].pid, 15)
    >>> manager.get_all()
    []

…and that the underlying file is gone:

    $ ls /tmp/.tensorboard-info/ | wc -l
    0

wchargin-branch: write-tensorboardinfo
wchargin-branch: tensorboardinfo-io
@wchargin wchargin merged commit 20435a1 into master Feb 7, 2019
wchargin added a commit that referenced this pull request Feb 7, 2019
Summary:
This commit wires up `TensorBoard.main` to the `TensorboardInfo` I/O
introduced in #1806.

Test Plan:
Run `bazel run //tensorboard -- --logdir ./whatever/`, then verify that
an info file has been created…

    $ ls /tmp/.tensorboard-info/
    pid-85532.info

…and that the file is visible to the Python APIs:

    $ python
    >>> from tensorboard import manager
    >>> infos = manager.get_all()
    >>> len(infos)
    1
    >>> infos[0].pid
    85532
    >>> infos[0].port
    6006

Then, SIGTERM the server and verify that this is reflected from Python…

    >>> import os
    >>> os.kill(infos[0].pid, 15)
    >>> manager.get_all()
    []

…and that the underlying file is gone:

    $ ls /tmp/.tensorboard-info/ | wc -l
    0

wchargin-branch: write-tensorboardinfo
wchargin added a commit that referenced this pull request Feb 7, 2019
Summary:
This commit wires up `TensorBoard.main` to the `TensorboardInfo` I/O
introduced in #1806.

Test Plan:
Run `bazel run //tensorboard -- --logdir ./whatever/`, then verify that
an info file has been created…

    $ ls /tmp/.tensorboard-info/
    pid-85532.info

…and that the file is visible to the Python APIs:

    $ python
    >>> from tensorboard import manager
    >>> infos = manager.get_all()
    >>> len(infos)
    1
    >>> infos[0].pid
    85532
    >>> infos[0].port
    6006

Then, SIGTERM the server and verify that this is reflected from Python…

    >>> import os
    >>> os.kill(infos[0].pid, 15)
    >>> manager.get_all()
    []

…and that the underlying file is gone:

    $ ls /tmp/.tensorboard-info/ | wc -l
    0

wchargin-branch: write-tensorboardinfo
@wchargin wchargin deleted the wchargin-tensorboardinfo-io branch February 7, 2019 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants