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

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