Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

program: write TensorboardInfo on server startup #1807

Merged
merged 1 commit into from
Feb 7, 2019

Conversation

wchargin
Copy link
Contributor

@wchargin wchargin commented Feb 5, 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 force-pushed the wchargin-write-tensorboardinfo branch from 7f4afc4 to b22bca7 Compare February 5, 2019 19:12
@wchargin wchargin force-pushed the wchargin-write-tensorboardinfo branch from b22bca7 to 3bb60aa Compare February 5, 2019 19:58
@wchargin wchargin force-pushed the wchargin-write-tensorboardinfo branch from 3bb60aa to e9d9d75 Compare February 6, 2019 01:27
@wchargin wchargin force-pushed the wchargin-tensorboardinfo-io branch 2 times, most recently from c62bcaa to 41b4625 Compare February 6, 2019 20:02
@wchargin wchargin force-pushed the wchargin-write-tensorboardinfo branch from e9d9d75 to bb0f6c0 Compare February 6, 2019 20:02
@wchargin wchargin changed the base branch from wchargin-tensorboardinfo-io to master February 7, 2019 01:27
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 force-pushed the wchargin-write-tensorboardinfo branch from bb0f6c0 to 9b17fd7 Compare February 7, 2019 01:29
@wchargin wchargin merged commit 898db01 into master Feb 7, 2019
@wchargin wchargin deleted the wchargin-write-tensorboardinfo 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