Commit 19eba1fe authored by LucWeber's avatar LucWeber
Browse files

Run pre-commit

parent a1b665d9
...@@ -44,4 +44,3 @@ filter_list: ...@@ -44,4 +44,3 @@ filter_list:
- function: "take_first" - function: "take_first"
metadata: metadata:
version: 0.0 version: 0.0
import datasets
import re import re
''' This code mirrors the utils of the original hellaswag task ''' import datasets
""" This code mirrors the utils of the original hellaswag task """
def preprocess(text): def preprocess(text):
text = text.strip() text = text.strip()
......
import datasets import datasets
import sacrebleu
import numpy as np import numpy as np
import sacrebleu
from rouge_score import rouge_scorer, scoring from rouge_score import rouge_scorer, scoring
''' This code mirrors the utils of the original truthful_qa task '''
""" This code mirrors the utils of the original truthful_qa task """
def process_results_mc2(doc, results): def process_results_mc2(doc, results):
lls, is_greedy = zip(*results) lls, is_greedy = zip(*results)
......
''' This code mirrors the utils of the original winogrande task ''' """ This code mirrors the utils of the original winogrande task """
def doc_to_text(doc): def doc_to_text(doc):
answer_to_num = {"1": 0, "2": 1} answer_to_num = {"1": 0, "2": 1}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment