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
|
|
@ -27,6 +27,9 @@ For the matrix below, what is the list of elements in spiral order?
|
|||
"""
|
||||
|
||||
|
||||
DATASET_NAME = "spiral_matrix"
|
||||
|
||||
|
||||
@dataclass
|
||||
class SpiralMatrixConfig:
|
||||
"""Configuration for Spiral Matrix dataset generation"""
|
||||
|
|
@ -111,6 +114,8 @@ class SpiralMatrixDataset(ProceduralDataset):
|
|||
"question": QUESTION_TEMPLATE.format(matrix=matrix_str),
|
||||
"answer": answer_str,
|
||||
"metadata": {
|
||||
"source_dataset": DATASET_NAME,
|
||||
"source_index": idx,
|
||||
"matrix": matrix,
|
||||
"solution": answer,
|
||||
"n": n,
|
||||
|
|
@ -158,4 +163,4 @@ class SpiralMatrixCurriculum(BaseCurriculum):
|
|||
)
|
||||
|
||||
|
||||
register_dataset("spiral_matrix", SpiralMatrixDataset, SpiralMatrixConfig, SpiralMatrixCurriculum)
|
||||
register_dataset(DATASET_NAME, SpiralMatrixDataset, SpiralMatrixConfig, SpiralMatrixCurriculum)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue