Skip to content

Commit

Permalink
load metric with evaluate (EleutherAI#2351)
Browse files Browse the repository at this point in the history
  • Loading branch information
baberabb authored and mariagrandury committed Oct 9, 2024
1 parent cc5f8ea commit d26f89d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lm_eval/tasks/squadv2/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@


def _squad_metric(predictions, references):
squad_metric = datasets.load_metric("squad_v2")
import evaluate

squad_metric = evaluate.load("squad_v2")
return squad_metric.compute(predictions=predictions, references=references)


Expand Down

0 comments on commit d26f89d

Please sign in to comment.