mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-25 17:10:51 +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,8 @@ Perform the following series of operations in order:
|
|||
{operations}
|
||||
"""
|
||||
|
||||
DATASET_NAME = "manipulate_matrix"
|
||||
|
||||
|
||||
def num_rows(matrix: list[list[int]]) -> int:
|
||||
return len(matrix)
|
||||
|
|
@ -306,6 +308,8 @@ class ManipulateMatrixDataset(ProceduralDataset):
|
|||
),
|
||||
"answer": answer_str,
|
||||
"metadata": {
|
||||
"source_dataset": DATASET_NAME,
|
||||
"source_index": idx,
|
||||
"matrix": matrix,
|
||||
"solution": answer,
|
||||
"operations": operations,
|
||||
|
|
@ -351,4 +355,4 @@ class ManipulateMatrixCurriculum(BaseCurriculum):
|
|||
)
|
||||
|
||||
|
||||
register_dataset("manipulate_matrix", ManipulateMatrixDataset, ManipulateMatrixConfig, ManipulateMatrixCurriculum)
|
||||
register_dataset(DATASET_NAME, ManipulateMatrixDataset, ManipulateMatrixConfig, ManipulateMatrixCurriculum)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue