mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-22 16:49:06 +00:00
CeasarCipher text indexing
This commit is contained in:
parent
5279ccf7e1
commit
ca0fb97884
1 changed files with 3 additions and 2 deletions
|
|
@ -105,8 +105,9 @@ class CaesarCipherCurriculum(BaseCurriculum):
|
|||
)
|
||||
)[-1],
|
||||
"read_text": lambda refs: (
|
||||
idx := refs["dataset_rng"].randint(0, len(self.text_data) - 1),
|
||||
" ".join(self.text_data[idx:idx+refs["num_words"]()])
|
||||
n_words := refs["num_words"](),
|
||||
idx := refs["dataset_rng"].randint(0, len(self.text_data) - n_words),
|
||||
" ".join(self.text_data[idx:idx+n_words])
|
||||
)[-1]
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue