Create an environment for a managed TensorBoard subprocess. TensorBoard processes launched from Bazel tests should resolve their own runfiles and Python import paths. Inheriting Bazel's test-only Python and runfiles variables can make the child binary execute against the parent's ru
()
| 409 | |
| 410 | |
| 411 | def _subprocess_environ(): |
| 412 | """Create an environment for a managed TensorBoard subprocess. |
| 413 | |
| 414 | TensorBoard processes launched from Bazel tests should resolve their own |
| 415 | runfiles and Python import paths. Inheriting Bazel's test-only Python and |
| 416 | runfiles variables can make the child binary execute against the parent's |
| 417 | runfiles tree instead of its own. |
| 418 | """ |
| 419 | environ = os.environ.copy() |
| 420 | for key in _SUBPROCESS_ENV_DENYLIST: |
| 421 | environ.pop(key, None) |
| 422 | return environ |
| 423 | |
| 424 | |
| 425 | def start(arguments, timeout=datetime.timedelta(seconds=60)): |