Victoria Oberascher commited on
Commit
18b1c22
·
1 Parent(s): 0bf6a32

add super call to add method

Browse files
Files changed (1) hide show
  1. horizonmetrics.py +6 -1
horizonmetrics.py CHANGED
@@ -16,7 +16,7 @@
16
  import evaluate
17
  import datasets
18
 
19
- from seametrics.horizon.utils import xy_points_to_slope_midpoint, calculate_horizon_error, calculate_horizon_error_across_sequence
20
 
21
  # TODO: Add BibTeX citation
22
  _CITATION = """\
@@ -119,6 +119,11 @@ class horizonmetrics(evaluate.Metric):
119
  self.slope_error_list.append(slope_error)
120
  self.midpoint_error_list.append(midpoint_error)
121
 
 
 
 
 
 
122
  def _compute(self):
123
  """
124
  Compute the horizon error across the sequence.
 
16
  import evaluate
17
  import datasets
18
 
19
+ from seametrics.horizon.utils import *
20
 
21
  # TODO: Add BibTeX citation
22
  _CITATION = """\
 
119
  self.slope_error_list.append(slope_error)
120
  self.midpoint_error_list.append(midpoint_error)
121
 
122
+ # does not impact the metric, but is required for the interface x_x
123
+ super(evaluate.Metric, self).add(prediction=predictions,
124
+ references=references,
125
+ **kwargs)
126
+
127
  def _compute(self):
128
  """
129
  Compute the horizon error across the sequence.