mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-22 16:49:06 +00:00
add ProductsDataset (multiplication tasks)
This commit is contained in:
parent
17485fad67
commit
1996ffa6d8
10 changed files with 56 additions and 56 deletions
|
|
@ -122,9 +122,9 @@ class CalendarArithmeticDataset(ProceduralDataset):
|
|||
self.tasks = [self.task_handlers[task] for task in self.config.tasks]
|
||||
|
||||
def __getitem__(self, idx: int) -> dict:
|
||||
item_rng = random.Random(self.seed + idx)
|
||||
task = item_rng.choice(self.tasks)
|
||||
question, answer, metadata = task(item_rng)
|
||||
rng = random.Random(self.seed + idx)
|
||||
task = rng.choice(self.tasks)
|
||||
question, answer, metadata = task(rng)
|
||||
return {
|
||||
"question": question,
|
||||
"answer": str(answer),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue