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 @@ Find the distance to the nearest 0 for each cell in the matrix below:
|
|||
{matrix}
|
||||
"""
|
||||
|
||||
DATASET_NAME = "binary_matrix"
|
||||
|
||||
|
||||
@dataclass
|
||||
class BinaryMatrixConfig:
|
||||
|
|
@ -128,6 +130,8 @@ class BinaryMatrixDataset(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,
|
||||
|
|
@ -160,4 +164,4 @@ class BinaryMatrixCurriculum(BaseCurriculum):
|
|||
)
|
||||
|
||||
|
||||
register_dataset("binary_matrix", BinaryMatrixDataset, BinaryMatrixConfig, BinaryMatrixCurriculum)
|
||||
register_dataset(DATASET_NAME, BinaryMatrixDataset, BinaryMatrixConfig, BinaryMatrixCurriculum)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue