コード例 #1
0
 def test_retrieve_tensor_history(self, *args):
     """Test retrieve tensor history."""
     graph_stream = self._server.cache_store.get_stream_handler(
         Streams.GRAPH)
     setattr(graph_stream, '_graph_handlers', {0: GraphHandler()})
     args[1].return_value = mock_tensor_history()
     res = self._server.retrieve_tensor_history('mock_node_name')
     compare_debugger_result_with_file(
         res, 'debugger_server/retrieve_tensor_history.json')
コード例 #2
0
 def test_retrieve_all(self):
     """Test retrieve request."""
     res = self._server.retrieve(mode='all')
     compare_debugger_result_with_file(res,
                                       'debugger_server/retrieve_all.json')
コード例 #3
0
 def test_get(self, filter_condition, result_file):
     """Test get."""
     result = self.graph_handler.get(filter_condition)
     file_path = os.path.join(self.graph_results_dir, result_file)
     compare_debugger_result_with_file(result, file_path, True)
     compare_result_with_file(result, file_path)
コード例 #4
0
 def test_retrieve_tensor_history(self, *args):
     """Test retrieve tensor history."""
     args[1].return_value = mock_tensor_history()
     res = self._server.retrieve_tensor_history('mock_node_name')
     compare_debugger_result_with_file(
         res, 'debugger_server/retrieve_tensor_history.json')
コード例 #5
0
 def test_get_tensor_graph(self, tensor_name, expect_file):
     """Test get tensor graph."""
     res = self.graph_handler.get_tensor_graph(tensor_name, None)
     compare_debugger_result_with_file(res,
                                       expect_file=os.path.join(
                                           'graph', expect_file))