"example/26_contraction/contraction_scale_xdl_fp64.cpp" did not exist on "4a2a56c22f75263d70c710950ab7313f072a2523"
Commit aeb7e846 authored by Dirk Groeneveld's avatar Dirk Groeneveld
Browse files

There is no point in passing in a RNG if you're re-seeding it every time anyways.

parent 7ab64701
......@@ -277,20 +277,18 @@ class EthicsUtilitarianism(Ethics):
DATASET_NAME = "utilitarianism"
def training_docs(self):
rnd = random.Random()
for doc in self.dataset["train"]:
yield self._process_doc(doc, rnd)
yield self._process_doc(doc)
def validation_docs(self):
raise NotImplementedError
def test_docs(self):
rnd = random.Random()
for doc in self.dataset["test"]:
yield self._process_doc(doc, rnd)
yield self._process_doc(doc)
def _process_doc(self, doc, rnd):
rnd.seed(doc["activity"])
def _process_doc(self, doc):
rnd = random.Random(doc["activity"])
scenarios = [doc["activity"], doc["baseline"]]
ordering = [0, 1]
rnd.shuffle(ordering)
......
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