mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-27 17:23:19 +00:00
fix(envs): Add source dataset and index to metadata (#388)
* add source dataset and index to metadata * fix typo * fix coach class and its test
This commit is contained in:
parent
7475a20700
commit
ce0a6c4878
104 changed files with 549 additions and 146 deletions
|
|
@ -18,6 +18,9 @@ Now, form a valid palindrome using the following letters: {letters}
|
|||
"""
|
||||
|
||||
|
||||
DATASET_NAME = "palindrome_generation"
|
||||
|
||||
|
||||
@dataclass
|
||||
class PalindromeConfig:
|
||||
"""
|
||||
|
|
@ -67,6 +70,8 @@ class PalindromeDataset(ProceduralDataset):
|
|||
"question": QUESTION_TEMPALTE.format(letters=", ".join(scrambled_letters)),
|
||||
"answer": palindrome,
|
||||
"metadata": {
|
||||
"source_dataset": DATASET_NAME,
|
||||
"source_index": idx,
|
||||
"letters": scrambled_letters,
|
||||
"generated_palindrome": palindrome,
|
||||
"length": length,
|
||||
|
|
@ -138,4 +143,4 @@ class PalindromeCurriculum(BaseCurriculum):
|
|||
)
|
||||
|
||||
|
||||
register_dataset("palindrome_generation", PalindromeDataset, PalindromeConfig, PalindromeCurriculum)
|
||||
register_dataset(DATASET_NAME, PalindromeDataset, PalindromeConfig, PalindromeCurriculum)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue