Skip to content

Commit dc20a7b

Browse files
committed
Dodge a merge conflict
1 parent 0203b22 commit dc20a7b

File tree

1 file changed

+2
-2
lines changed
  • examples/tensorflow/question-answering

1 file changed

+2
-2
lines changed

examples/tensorflow/question-answering/run_qa.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727

2828
import tensorflow as tf
2929
from datasets import load_dataset
30-
from evaluate import load
3130

31+
import evaluate
3232
import transformers
3333
from transformers import (
3434
AutoConfig,
@@ -600,7 +600,7 @@ def post_processing_function(examples, features, predictions, stage="eval"):
600600
references = [{"id": ex["id"], "answers": ex[answer_column_name]} for ex in examples]
601601
return EvalPrediction(predictions=formatted_predictions, label_ids=references)
602602

603-
metric = load("squad_v2" if data_args.version_2_with_negative else "squad")
603+
metric = evaluate.load("squad_v2" if data_args.version_2_with_negative else "squad")
604604

605605
def compute_metrics(p: EvalPrediction):
606606
return metric.compute(predictions=p.predictions, references=p.label_ids)

0 commit comments

Comments
 (0)