MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / __init__

Method __init__

tensorflow/python/debug/lib/debug_data.py:469–498  ·  view source on GitHub ↗

`DebugDumpDir` constructor. Args: dump_root: (`str`) path to the dump root directory. partition_graphs: A repeated field of GraphDefs representing the partition graphs executed by the TensorFlow runtime. validate: (`bool`) whether the dump files are to be validated a

(self, dump_root, partition_graphs=None, validate=True)

Source from the content-addressed store, hash-verified

467 """
468
469 def __init__(self, dump_root, partition_graphs=None, validate=True):
470 """`DebugDumpDir` constructor.
471
472 Args:
473 dump_root: (`str`) path to the dump root directory.
474 partition_graphs: A repeated field of GraphDefs representing the
475 partition graphs executed by the TensorFlow runtime.
476 validate: (`bool`) whether the dump files are to be validated against the
477 partition graphs.
478
479 Raises:
480 IOError: If dump_root does not exist as a directory.
481 ValueError: If more than one core metadata file is found under the dump
482 root directory.
483 """
484
485 if not gfile.IsDirectory(dump_root):
486 raise IOError("Dump root directory %s does not exist" % dump_root)
487
488 self._core_metadata = []
489
490 # Find the list of devices.
491 self._dump_root = dump_root
492
493 self._load_core_metadata()
494 self._load_fetches_info()
495 self._load_feeds_info()
496 self._load_all_device_dumps(partition_graphs, validate)
497
498 self._python_graph = None
499
500 def _load_all_device_dumps(self, partition_graphs, validate):
501 """Load the dump data for all devices."""

Callers

nothing calls this directly

Calls 6

_load_core_metadataMethod · 0.95
_load_fetches_infoMethod · 0.95
_load_feeds_infoMethod · 0.95
IOErrorFunction · 0.85
IsDirectoryMethod · 0.45

Tested by

no test coverage detected