mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-24 17:05:03 +00:00
remove redundant methods from GroupAnagramsDataset
This commit is contained in:
parent
b23d25c92a
commit
b90c50e68f
1 changed files with 0 additions and 14 deletions
|
|
@ -59,20 +59,6 @@ class GroupAnagramsDataset(ProceduralDataset):
|
|||
with get_data_file_path("anagrams.jsonl").open() as f:
|
||||
self.anagrams = [json.loads(line)["words"] for line in f]
|
||||
|
||||
def __len__(self) -> int:
|
||||
return self.config.size
|
||||
|
||||
def __iter__(self):
|
||||
self._current_idx = 0
|
||||
return self
|
||||
|
||||
def __next__(self):
|
||||
if self._current_idx >= self.config.size:
|
||||
raise StopIteration
|
||||
item = self[self._current_idx]
|
||||
self._current_idx += 1
|
||||
return item
|
||||
|
||||
def _get_anagram_words(self, rng: Random) -> list[str]:
|
||||
"""Generate a list of words with anagrams"""
|
||||
words = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue