move xnli_compute_metrics to data/metrics
This commit is contained in:
committed by
Lysandre Debut
parent
73fe2e7385
commit
bcd8dc6b48
@@ -73,13 +73,6 @@ class XnliProcessor(DataProcessor):
|
||||
"""See base class."""
|
||||
return ["contradiction", "entailment", "neutral"]
|
||||
|
||||
def xnli_compute_metrics(task_name, preds, labels):
|
||||
assert len(preds) == len(labels)
|
||||
if task_name == "xnli":
|
||||
return {"acc": simple_accuracy(preds, labels)}
|
||||
else:
|
||||
raise ValueError('{} is not a supported task.'.format(task_name))
|
||||
|
||||
xnli_processors = {
|
||||
"xnli": XnliProcessor,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user