Command handler for inputs. Show inputs to a given node. Args: args: Command-line arguments, excluding the command prefix, as a list of str. screen_info: Optional dict input containing screen information such as cols. Returns: Output text lines as a R
(self, args, screen_info=None)
| 872 | return debugger_cli_common.rich_text_lines_from_rich_line_list(lines) |
| 873 | |
| 874 | def list_inputs(self, args, screen_info=None): |
| 875 | """Command handler for inputs. |
| 876 | |
| 877 | Show inputs to a given node. |
| 878 | |
| 879 | Args: |
| 880 | args: Command-line arguments, excluding the command prefix, as a list of |
| 881 | str. |
| 882 | screen_info: Optional dict input containing screen information such as |
| 883 | cols. |
| 884 | |
| 885 | Returns: |
| 886 | Output text lines as a RichTextLines object. |
| 887 | """ |
| 888 | |
| 889 | # Screen info not currently used by this handler. Include this line to |
| 890 | # mute pylint. |
| 891 | _ = screen_info |
| 892 | # TODO(cais): Use screen info to format the output lines more prettily, |
| 893 | # e.g., hanging indent of long node names. |
| 894 | |
| 895 | parsed = self._arg_parsers["list_inputs"].parse_args(args) |
| 896 | |
| 897 | output = self._list_inputs_or_outputs( |
| 898 | parsed.recursive, |
| 899 | parsed.node_name, |
| 900 | parsed.depth, |
| 901 | parsed.control, |
| 902 | parsed.op_type, |
| 903 | do_outputs=False) |
| 904 | |
| 905 | node_name = debug_graphs.get_node_name(parsed.node_name) |
| 906 | _add_main_menu(output, node_name=node_name, enable_list_inputs=False) |
| 907 | |
| 908 | return output |
| 909 | |
| 910 | def print_tensor(self, args, screen_info=None): |
| 911 | """Command handler for print_tensor. |
nothing calls this directly
no test coverage detected