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

Function get_all

tensorboard/manager.py:285–325  ·  view source on GitHub ↗

Return TensorBoardInfo values for running TensorBoard processes. This function may not provide a perfect snapshot of the set of running processes. Its result set may be incomplete if the user has cleaned their /tmp/ directory while TensorBoard processes are running. It may contain e

()

Source from the content-addressed store, hash-verified

283
284
285def get_all():
286 """Return TensorBoardInfo values for running TensorBoard processes.
287
288 This function may not provide a perfect snapshot of the set of running
289 processes. Its result set may be incomplete if the user has cleaned
290 their /tmp/ directory while TensorBoard processes are running. It may
291 contain extraneous entries if TensorBoard processes exited uncleanly
292 (e.g., with SIGKILL or SIGQUIT).
293
294 Entries in the info directory that do not represent valid
295 `TensorBoardInfo` values will be silently ignored.
296
297 Returns:
298 A fresh list of `TensorBoardInfo` objects.
299 """
300 info_dir = _get_info_dir()
301 results = []
302 for filename in os.listdir(info_dir):
303 filepath = os.path.join(info_dir, filename)
304 try:
305 with open(filepath) as infile:
306 contents = infile.read()
307 except IOError as e:
308 if e.errno == errno.EACCES:
309 # May have been written by this module in a process whose
310 # `umask` includes some bits of 0o444.
311 continue
312 else:
313 raise
314 try:
315 info = _info_from_string(contents)
316 except ValueError:
317 # Ignore unrecognized files, logging at debug only.
318 tb_logging.get_logger().debug(
319 "invalid info file: %r",
320 filepath,
321 exc_info=True,
322 )
323 else:
324 results.append(info)
325 return results
326
327
328@dataclasses.dataclass(frozen=True)

Callers 1

_find_matching_instanceFunction · 0.85

Calls 6

_get_info_dirFunction · 0.85
_info_from_stringFunction · 0.85
listdirMethod · 0.45
joinMethod · 0.45
readMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…