def get_metric_name_from_task(task: str) -> str:
    """Get the name of the metric for the corresponding GLUE task.

    If using `load_best_model_at_end=True` in TrainingArguments then you need
    `metric_for_best_model=metric_name`. Use this method to get the metric_name
    for the corresponding GLUE task.
    """
    if task == "stsb":
        return "pearson"
    elif task == "cola":
        return "matthews_correlation"
    else:
        return "accuracy"