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
Make pip_smoke_test.sh more robust against false positives (#801)
This makes `pip_smoke_test.sh` robust against two types of false positives that I realized it might produce:
1. Testing for the post-pip-package-installation presence of a tensorboard binary with `which tensorboard` could falsely return true if tensorboard was anywhere on the path (e.g. installed to the system outside the virtualenv), meaning it didn't actually guarantee that the tensorboard command used later in the script would be the one from the pip package.
2. Testing for whether URLs are accessible at `localhost:6006` (by default) could falsely succeed if there was another pre-existing tensorboard instance running locally on port 6006 (which is common for a developer machine since that's the default tensorboard port), since the accesses don't really have a way to check that they're talking to the freshly launched tensorboard. Note that the newly launched tensorboard actually dies on startup in this case (since it can't bind to the requested port) but it's hidden since it's been backgrounded.
This fixes the first one by checking directly for a `tensorboard` binary inside the virtualenv's `bin` directory, and fixes the second one by ensuring that we wait for the `tensorboard` binary to start up successfully and print its serving URL before proceeding with the test. That also means we can extract the serving URL automatically, which makes it possible to set the default port to 0 (aka requesting an unused local port from the kernel) which should eliminate the risk of interference in the default case.
0 commit comments