code: def test_glue():
      # entailment
      """
      E.g. for qnli:
      The Stanford Question Answering Dataset is a question-answering dataset consisting of question-paragraph pairs,
      where one of the sentences in the paragraph (drawn from Wikipedia) contains the answer to the corresponding
      question (written by an annotator). The authors of the benchmark convert the task into sentence pair
      classification by forming a pair between each question and each sentence in the corresponding context,
      and filtering out pairs with low lexical overlap between the question and the context sentence.
  
      The task is to determine whether the context sentence contains the answer to the question.
      This modified version of the original task removes the requirement that the model select the exact answer,
      but also removes the simplifying assumptions that the answer is always present in the input
      and that lexical overlap is a reliable cue.
      :return:
      """
      from evaluate import load
  
      glue_metric = load("glue", "qnli")
      references = [0, 1]
      predictions = [1, 1]
      results = glue_metric.compute(
          predictions=predictions, references=references
      )
      assert results == {"accuracy": 0.5}
  
file_path: h2ogpt/tests/test_metrics.py
imports: from tests.utils import wrap_test_forked
label_desc: Use image node_id 13 for calling a global function with example usage: test_glue() without return types