Spaces:
Running
Running
Update evaluation/evaluator.py
Browse files- evaluation/evaluator.py +1 -1
evaluation/evaluator.py
CHANGED
@@ -101,7 +101,7 @@ def question_scorer(prediction, gold_answer):
|
|
101 |
return 0.
|
102 |
|
103 |
has_ans = 1.
|
104 |
-
if ((
|
105 |
has_ans = 0.
|
106 |
|
107 |
metric_eval = get_evaluator(evaluator)
|
|
|
101 |
return 0.
|
102 |
|
103 |
has_ans = 1.
|
104 |
+
if ((prediction) != float and len(prediction) == 0) or find_isnan(prediction)):
|
105 |
has_ans = 0.
|
106 |
|
107 |
metric_eval = get_evaluator(evaluator)
|