Spaces:
Sleeping
Sleeping
Simon Sorg
commited on
Commit
·
cc82312
1
Parent(s):
b954f30
fix: filter func None
Browse files
valid_efficiency_score.py
CHANGED
|
@@ -164,7 +164,10 @@ class ValidEfficiencyScore(evaluate.Metric):
|
|
| 164 |
# If only the reference passes the filter, count it
|
| 165 |
elif pred_bool != ref_bool:
|
| 166 |
divider += 1
|
| 167 |
-
|
|
|
|
|
|
|
|
|
|
| 168 |
accuracy = sum(
|
| 169 |
execute(i) == execute(j) for i, j in zip(filtered_predictions, filtered_references)) / divider
|
| 170 |
|
|
|
|
| 164 |
# If only the reference passes the filter, count it
|
| 165 |
elif pred_bool != ref_bool:
|
| 166 |
divider += 1
|
| 167 |
+
else:
|
| 168 |
+
filtered_predictions = predictions
|
| 169 |
+
filtered_references = references
|
| 170 |
+
divider = len(predictions)
|
| 171 |
accuracy = sum(
|
| 172 |
execute(i) == execute(j) for i, j in zip(filtered_predictions, filtered_references)) / divider
|
| 173 |
|