mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-19 12:58:07 +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
|
|
@ -20,6 +20,8 @@ Ransom note: {ransom_note}
|
|||
Magazine: {magazine}
|
||||
"""
|
||||
|
||||
DATASET_NAME = "ransom_note"
|
||||
|
||||
|
||||
@dataclass
|
||||
class RansomNoteConfig:
|
||||
|
|
@ -99,6 +101,8 @@ class RansomNoteDataset(ProceduralDataset):
|
|||
"question": QUESTION_TEMPLATE.format(ransom_note=ransom_note, magazine=magazine),
|
||||
"answer": str(answer),
|
||||
"metadata": {
|
||||
"source_dataset": DATASET_NAME,
|
||||
"source_index": idx,
|
||||
"ransom_note": ransom_note,
|
||||
"magazine": magazine,
|
||||
"solution": answer,
|
||||
|
|
@ -136,4 +140,4 @@ class RansomNoteCurriculum(BaseCurriculum):
|
|||
)
|
||||
|
||||
|
||||
register_dataset("ransom_note", RansomNoteDataset, RansomNoteConfig, RansomNoteCurriculum)
|
||||
register_dataset(DATASET_NAME, RansomNoteDataset, RansomNoteConfig, RansomNoteCurriculum)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue