MCPcopy Index your code
hub / github.com/tensorflow/tensorboard / _find_matching_instance

Function _find_matching_instance

tensorboard/manager.py:497–508  ·  view source on GitHub ↗

Find a running TensorBoard instance compatible with the cache key. Returns: A `TensorBoardInfo` object, or `None` if none matches the cache key.

(cache_key)

Source from the content-addressed store, hash-verified

495
496
497def _find_matching_instance(cache_key):
498 """Find a running TensorBoard instance compatible with the cache key.
499
500 Returns:
501 A `TensorBoardInfo` object, or `None` if none matches the cache key.
502 """
503 infos = get_all()
504 candidates = [info for info in infos if info.cache_key == cache_key]
505 for candidate in sorted(candidates, key=lambda x: x.port):
506 # TODO(@wchargin): Check here that the provided port is still live.
507 return candidate
508 return None
509
510
511def _maybe_read_file(filename):

Callers 1

startFunction · 0.85

Calls 1

get_allFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…