Unverified Commit 6a78fdaf authored by Leo Gao's avatar Leo Gao Committed by GitHub
Browse files

Deterministic fewshot_experiments

parent 283b2c5e
...@@ -117,7 +117,9 @@ class Task(abc.ABC): ...@@ -117,7 +117,9 @@ class Task(abc.ABC):
def fewshot_examples(self, k): def fewshot_examples(self, k):
if self._training_docs is None: if self._training_docs is None:
self._training_docs = list(self.training_docs()) self._training_docs = list(self.training_docs())
return random.sample(self._training_docs, k) rnd = random.Random()
rnd.seed(42)
return rnd.sample(self._training_docs, k)
@abc.abstractmethod @abc.abstractmethod
def doc_to_text(self, doc): def doc_to_text(self, doc):
......
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