• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14# ==============================================================================
15"""Python TFLite metrics helper interface."""
16import abc
17
18
19class TFLiteMetricsInterface(metaclass=abc.ABCMeta):
20  """Abstract class for TFLiteMetrics."""
21
22  @abc.abstractmethod
23  def increase_counter_debugger_creation(self):
24    raise NotImplementedError
25
26  @abc.abstractmethod
27  def increase_counter_interpreter_creation(self):
28    raise NotImplementedError
29
30  @abc.abstractmethod
31  def increase_counter_converter_attempt(self):
32    raise NotImplementedError
33
34  @abc.abstractmethod
35  def increase_counter_converter_success(self):
36    raise NotImplementedError
37
38  @abc.abstractmethod
39  def set_converter_param(self, name, value):
40    raise NotImplementedError
41
42  @abc.abstractmethod
43  def set_converter_error(self, error_data):
44    raise NotImplementedError
45
46  @abc.abstractmethod
47  def set_converter_latency(self, value):
48    raise NotImplementedError
49