Commit 4e2d1498 authored by sdtblck's avatar sdtblck
Browse files

add download method to base class

parent ff2d2ada
...@@ -54,6 +54,12 @@ class LM(abc.ABC): ...@@ -54,6 +54,12 @@ class LM(abc.ABC):
class Dataset(abc.ABC): class Dataset(abc.ABC):
@abc.abstractmethod
def download(self):
"""Downloads the task dataset if necessary"""
pass
@abc.abstractmethod @abc.abstractmethod
def has_training_docs(self): def has_training_docs(self):
"""Whether the task has a training set""" """Whether the task has a training set"""
...@@ -121,4 +127,4 @@ class Dataset(abc.ABC): ...@@ -121,4 +127,4 @@ class Dataset(abc.ABC):
map(self.doc_to_text, self.fewshot_examples(k=num_fewshot)) map(self.doc_to_text, self.fewshot_examples(k=num_fewshot))
) + "\n\n" ) + "\n\n"
example = self.doc_to_text(doc, include_target=False).strip() example = self.doc_to_text(doc, include_target=False).strip()
return description + labeled_examples + example return description + labeled_examples + example
\ 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