mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-24 17:05:03 +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
|
|
@ -8,6 +8,8 @@ from typing import Any, Optional
|
|||
from ..coaching import BaseCurriculum, RangeAttributeDefinition
|
||||
from ..factory import ProceduralDataset, register_dataset
|
||||
|
||||
DATASET_NAME = "number_sorting"
|
||||
|
||||
|
||||
@dataclass
|
||||
class NumberSortingConfig:
|
||||
|
|
@ -90,6 +92,8 @@ Please follow the instruction below:
|
|||
"question": question,
|
||||
"answer": str(answer),
|
||||
"metadata": {
|
||||
"source_dataset": DATASET_NAME,
|
||||
"source_index": idx,
|
||||
"original_numbers": number_strs,
|
||||
"direction": direction,
|
||||
"sorted_numbers": answer,
|
||||
|
|
@ -198,4 +202,4 @@ class NumberSortingCurriculum(BaseCurriculum):
|
|||
)
|
||||
|
||||
|
||||
register_dataset("number_sorting", NumberSortingDataset, NumberSortingConfig, NumberSortingCurriculum)
|
||||
register_dataset(DATASET_NAME, NumberSortingDataset, NumberSortingConfig, NumberSortingCurriculum)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue