samuelam commited on
Commit
594d7b8
1 Parent(s): 8d203f6

Update evaluation/evaluator.py

Browse files
Files changed (1) hide show
  1. evaluation/evaluator.py +1 -1
evaluation/evaluator.py CHANGED
@@ -98,7 +98,7 @@ def question_scorer(prediction, gold_answer):
98
  prediction, run_eval = fix_prediction(prediction, gold_answer, evaluator)
99
 
100
  has_ans = 1.
101
- if ((prediction) != float and len(prediction) == 0) or find_isnan(prediction):
102
  has_ans = 0.
103
 
104
  if not run_eval:
 
98
  prediction, run_eval = fix_prediction(prediction, gold_answer, evaluator)
99
 
100
  has_ans = 1.
101
+ if (type(prediction) != float and len(prediction) == 0) or find_isnan(prediction):
102
  has_ans = 0.
103
 
104
  if not run_eval: