List Python source files that constructed nodes and tensors.
(self, args, screen_info=None)
| 1240 | return debugger_cli_common.rich_text_lines_from_rich_line_list(lines) |
| 1241 | |
| 1242 | def list_source(self, args, screen_info=None): |
| 1243 | """List Python source files that constructed nodes and tensors.""" |
| 1244 | del screen_info # Unused. |
| 1245 | |
| 1246 | parsed = self._arg_parsers["list_source"].parse_args(args) |
| 1247 | source_list = source_utils.list_source_files_against_dump( |
| 1248 | self._debug_dump, |
| 1249 | path_regex_whitelist=parsed.path_filter, |
| 1250 | node_name_regex_whitelist=parsed.node_name_filter) |
| 1251 | |
| 1252 | top_lines = [ |
| 1253 | RL("List of source files that created nodes in this run", "bold")] |
| 1254 | if parsed.path_filter: |
| 1255 | top_lines.append( |
| 1256 | RL("File path regex filter: \"%s\"" % parsed.path_filter)) |
| 1257 | if parsed.node_name_filter: |
| 1258 | top_lines.append( |
| 1259 | RL("Node name regex filter: \"%s\"" % parsed.node_name_filter)) |
| 1260 | top_lines.append(RL()) |
| 1261 | output = debugger_cli_common.rich_text_lines_from_rich_line_list(top_lines) |
| 1262 | if not source_list: |
| 1263 | output.append("[No source file information.]") |
| 1264 | return output |
| 1265 | |
| 1266 | output.extend(self._make_source_table( |
| 1267 | [item for item in source_list if not item[1]], False)) |
| 1268 | output.extend(self._make_source_table( |
| 1269 | [item for item in source_list if item[1]], True)) |
| 1270 | _add_main_menu(output, node_name=None) |
| 1271 | return output |
| 1272 | |
| 1273 | def _list_inputs_or_outputs(self, |
| 1274 | recursive, |
nothing calls this directly
no test coverage detected