mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-30 17:40:45 +00:00
use native types List->list, Dict->dict, Set->set, Tuple->tuple
This commit is contained in:
parent
5d02064b5a
commit
3e7ff3b084
95 changed files with 754 additions and 760 deletions
|
|
@ -10,7 +10,7 @@ import json
|
|||
from collections import defaultdict
|
||||
from dataclasses import dataclass
|
||||
from random import Random
|
||||
from typing import Dict, Optional
|
||||
from typing import Any, Optional
|
||||
|
||||
from ..data import get_data_file_path
|
||||
from ..factory import ProceduralDataset, register_dataset
|
||||
|
|
@ -88,7 +88,7 @@ class GroupAnagramsDataset(ProceduralDataset):
|
|||
anagrams = list(res.values())
|
||||
return self._sort_nested_list(anagrams)
|
||||
|
||||
def score_answer(self, answer: Optional[str], entry: Dict[str, any]) -> float:
|
||||
def score_answer(self, answer: Optional[str], entry: dict[str, Any]) -> float:
|
||||
"""Score a single Group Anagrams question"""
|
||||
reward = 0.0
|
||||
if answer is not None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue