"docs/nlp/index.ipynb" did not exist on "a576ea6086fd471f812aba6dfac70ed8aa321deb"
Commit 262fe250 authored by Anish Thite's avatar Anish Thite
Browse files

add Wikitext2 + wikitext103 data

parent b8a3edaf
import numpy as np
from scipy.stats import pearsonr, spearmanr
from sklearn.metrics import f1_score, matthews_corrcoef
from tqdm import auto as tqdm_lib
from . common import NLP_TASK, simple_accuracy_metric, yesno
class WikiText103(NLP_TASK):
NLP_PATH = "wikitext"
NLP_NAME = "wikitext-103-raw-v1"
def fewshot_description(self):
return ""
def doc_to_text(self, doc, include_target=True):
return doc['text']
def evaluate(self, docs, lm, provide_description, num_fewshot):
pass
class WikiText2(NLP_TASK):
NLP_PATH = "wikitext"
NLP_NAME = "wikitext-2-raw-v1"
def fewshot_description(self):
return ""
def doc_to_text(self, doc, include_target=True):
return doc['text']
def evaluate(self, docs, lm, provide_description, num_fewshot):
pass
\ No newline at end of file
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