mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-22 16:49:06 +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
|
|
@ -14,6 +14,8 @@ Your output should be only the number of interest.
|
|||
Now, pick the {size} number of the following candidates: {numbers}
|
||||
"""
|
||||
|
||||
DATASET_NAME = "number_format"
|
||||
|
||||
|
||||
@dataclass
|
||||
class NumberFormatConfig:
|
||||
|
|
@ -94,6 +96,8 @@ class NumberFormatDataset(ProceduralDataset):
|
|||
"question": QUESTION_TEMPLATE.format(numbers=" ".join(formatted_candidates), size=size),
|
||||
"answer": str(answer),
|
||||
"metadata": {
|
||||
"source_dataset": DATASET_NAME,
|
||||
"source_index": idx,
|
||||
"candidates": candidates,
|
||||
"solution": answer,
|
||||
"formatted_candidates": formatted_candidates,
|
||||
|
|
@ -138,4 +142,4 @@ class NumberFormatCurriculum(BaseCurriculum):
|
|||
)
|
||||
|
||||
|
||||
register_dataset("number_format", NumberFormatDataset, NumberFormatConfig, NumberFormatCurriculum)
|
||||
register_dataset(DATASET_NAME, NumberFormatDataset, NumberFormatConfig, NumberFormatCurriculum)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue