Skip to content

Commit

Permalink
Dodge a merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocketknight1 committed Aug 3, 2022
1 parent a0e8487 commit f6f6c73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/tensorflow/question-answering/run_qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

import tensorflow as tf
from datasets import load_dataset
from evaluate import load

import evaluate
import transformers
from transformers import (
AutoConfig,
Expand Down Expand Up @@ -600,7 +600,7 @@ def post_processing_function(examples, features, predictions, stage="eval"):
references = [{"id": ex["id"], "answers": ex[answer_column_name]} for ex in examples]
return EvalPrediction(predictions=formatted_predictions, label_ids=references)

metric = load("squad_v2" if data_args.version_2_with_negative else "squad")
metric = evaluate.load("squad_v2" if data_args.version_2_with_negative else "squad")

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

0 comments on commit f6f6c73

Please sign in to comment.