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

Method _load_from_file

tensorflow/python/debug/cli/cli_config.py:149–160  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

147 return debugger_cli_common.rich_text_lines_from_rich_line_list(lines)
148
149 def _load_from_file(self):
150 try:
151 with gfile.Open(self._config_file_path, "r") as config_file:
152 config_dict = json.load(config_file)
153 config = collections.OrderedDict()
154 for key in sorted(config_dict.keys()):
155 config[key] = config_dict[key]
156 return config
157 except (IOError, ValueError):
158 # The reading of the config file may fail due to IO issues or file
159 # corruption. We do not want tfdbg to error out just because of that.
160 return dict()

Callers 1

__init__Method · 0.95

Calls 3

OpenMethod · 0.45
loadMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected