svenwey commited on
Commit
d0d47f8
·
1 Parent(s): 7b5dbb4

change input types to strings

Browse files
Files changed (1) hide show
  1. logscoremetric.py +4 -2
logscoremetric.py CHANGED
@@ -70,9 +70,10 @@ class LogScoreMetric(evaluate.Metric):
70
  citation=_CITATION,
71
  inputs_description=_KWARGS_DESCRIPTION,
72
  # This defines the format of each prediction and reference
 
73
  features=datasets.Features({
74
- 'predictions': datasets.Value('int64'),
75
- 'references': datasets.Value('int64'),
76
  }),
77
  # Homepage of the module for documentation
78
  homepage="http://module.homepage",
@@ -91,5 +92,6 @@ class LogScoreMetric(evaluate.Metric):
91
  # TODO: Compute the different scores of the module
92
  accuracy = sum(i == j for i, j in zip(predictions, references)) / len(predictions)
93
  return {
 
94
  "accuracy": accuracy,
95
  }
 
70
  citation=_CITATION,
71
  inputs_description=_KWARGS_DESCRIPTION,
72
  # This defines the format of each prediction and reference
73
+ # Both prediction and reference are strings
74
  features=datasets.Features({
75
+ 'predictions': datasets.Value('string'),
76
+ 'references': datasets.Value('string'),
77
  }),
78
  # Homepage of the module for documentation
79
  homepage="http://module.homepage",
 
92
  # TODO: Compute the different scores of the module
93
  accuracy = sum(i == j for i, j in zip(predictions, references)) / len(predictions)
94
  return {
95
+ "timestamp_score": accuracy,
96
  "accuracy": accuracy,
97
  }