def testIsDebugNode(self): self.assertTrue( debug_data.is_debug_node("__dbg_ns1/ns2/node3:0_0_DebugIdentity")) self.assertFalse( debug_data.is_debug_node("dbg_ns1/ns2/node3:0_0_DebugIdentity")) self.assertFalse( debug_data.is_debug_node("_dbg_ns1/ns2/node3:0_0_DebugIdentity")) self.assertFalse( debug_data.is_debug_node("_dbgns1/ns2/node3:0_0_DebugIdentity")) self.assertFalse(debug_data.is_debug_node("__copy_ns1/ns2/node3_0"))
def _process_graph_def(self, graph_def): for node_def in graph_def.node: if (debug_data.is_debug_node(node_def.name) and node_def.attr["gated_grpc"].b): node_name, output_slot, _, debug_op = ( debug_data.parse_debug_node_name(node_def.name)) self._gated_grpc_debug_watches.add( DebugWatch(node_name, output_slot, debug_op))