You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
notebook: don’t filter polled instances by PID (#4407)
Summary:
When the `%tensorboard` cell magic is invoked, we compute a cache key
for the “hermetic environment”, primarily args to `%tensorboard` and the
working directory. We first check whether any running TensorBoard
instances match that cache key, and launch a new instance if none do.
But then, while polling for the new instance to have launched, we had a
different matching criterion, checking for a process ID match instead of
a cache key match.
The idea was that “is this TensorBoard instance’s PID equal to the PID
of the subprocess that we just spawned?” would be a more reliable check.
But on Windows ((╯°□°)╯︵ ┻━┻) this is not the case, presumably because
the `tensorboard` console script has some kind of wrapper process in
certain versions of Python. This manifested as “`%tensorboard` always
times out on the first invocation, but works immediately when I invoke
it again”, since invoking it again triggers the cache key check rather
than the PID check. So we now just check by cache key in all cases, and
the logic is consistent, if a bit less precise overall.
Fixes#4300.
Test Plan:
Still works for me on Linux, with both new and existing TensorBoard
processes across multiple (concurrent) cache keys. @stephanwlee can
repro the bug and fix on Windows with Python 3.8.
wchargin-branch: notebook-poll-no-pid-filter
0 commit comments