def compute_metrics(pred):
    labels = pred.label_ids
    preds = pred.predictions.argmax((- 1))
    acc = accuracy_score(labels, preds)
    return {'accuracy': acc}
def compute_metrics(pred):
    labels = pred.label_ids
    preds = pred.predictions.argmax((- 1))
    acc = accuracy_score(labels, preds)
    return {'accuracy': acc}