def testWatchGraph_opTypeBlacklist(self): debug_utils.watch_graph_with_blacklists( self._run_options, self._graph, debug_urls="file:///tmp/tfdbg_1", op_type_regex_blacklist="(Variable|Identity|Assign|Const)") node_names = self._verify_watches( self._run_options.debug_options.debug_tensor_watch_opts, 0, ["DebugIdentity"], ["file:///tmp/tfdbg_1"]) self.assertEqual(sorted(["p1", "s"]), sorted(node_names))
def testWatchGraph_opTypeBlacklist(self): debug_utils.watch_graph_with_blacklists( self._run_options, self._graph, debug_urls="file:///tmp/tfdbg_1", op_type_regex_blacklist="(Variable|Identity|Assign|Const)") node_names = self._verify_watches( self._run_options.debug_options.debug_tensor_watch_opts, 0, ["DebugIdentity"], ["file:///tmp/tfdbg_1"]) self.assertEqual(sorted(["p1", "s"]), sorted(node_names))
def testWatchGraph_nodeNameBlacklist(self): debug_utils.watch_graph_with_blacklists( self._run_options, self._graph, debug_urls="file:///tmp/tfdbg_1", node_name_regex_blacklist="(a1$|a1_init$|a1/.*|p1$)") node_names = self._verify_watches( self._run_options.debug_options.debug_tensor_watch_opts, 0, ["DebugIdentity"], ["file:///tmp/tfdbg_1"]) self.assertEqual( sorted(["b_init", "b", "b/Assign", "b/read", "c", "s"]), sorted(node_names))
def testWatchGraph_nodeNameBlacklist(self): debug_utils.watch_graph_with_blacklists( self._run_options, self._graph, debug_urls="file:///tmp/tfdbg_1", node_name_regex_blacklist="(a1$|a1_init$|a1/.*|p1$)") node_names = self._verify_watches( self._run_options.debug_options.debug_tensor_watch_opts, 0, ["DebugIdentity"], ["file:///tmp/tfdbg_1"]) self.assertEqual( sorted(["b_init", "b", "b/Assign", "b/read", "c", "s"]), sorted(node_names))
def testWatchGraph_tensorDTypeBlacklists(self): debug_utils.watch_graph_with_blacklists( self._run_options, self._graph, debug_urls="file:///tmp/tfdbg_1", tensor_dtype_regex_blacklist=".*_ref") node_names = self._verify_watches( self._run_options.debug_options.debug_tensor_watch_opts, 0, ["DebugIdentity"], ["file:///tmp/tfdbg_1"]) self.assertNotIn("a1", node_names) self.assertNotIn("a1/Assign", node_names) self.assertNotIn("b", node_names) self.assertNotIn("b/Assign", node_names) self.assertIn("s", node_names)
def testWatchGraph_tensorDTypeBlacklists(self): debug_utils.watch_graph_with_blacklists( self._run_options, self._graph, debug_urls="file:///tmp/tfdbg_1", tensor_dtype_regex_blacklist=".*_ref") node_names = self._verify_watches( self._run_options.debug_options.debug_tensor_watch_opts, 0, ["DebugIdentity"], ["file:///tmp/tfdbg_1"]) self.assertNotIn("a1", node_names) self.assertNotIn("a1/Assign", node_names) self.assertNotIn("b", node_names) self.assertNotIn("b/Assign", node_names) self.assertIn("s", node_names)