(answers, prediction,
is_regex)
| 63 | |
| 64 | |
| 65 | def is_correct(answers, prediction, |
| 66 | is_regex): |
| 67 | if is_regex: |
| 68 | metric_fn = regex_match_score |
| 69 | else: |
| 70 | metric_fn = exact_match_score |
| 71 | return metric_max_over_ground_truths( |
| 72 | metric_fn=metric_fn, prediction=prediction, ground_truths=answers) |
| 73 | |
| 74 | |
| 75 | def evaluate_predictions_impl(references, |
no test coverage detected