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:
Zafir Stojanovski 2025-03-20 12:12:14 +01:00 committed by GitHub
parent 7475a20700
commit ce0a6c4878
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
104 changed files with 549 additions and 146 deletions

View file

@ -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)