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 c6d01541aa
commit 4c47527130
104 changed files with 549 additions and 146 deletions

View file

@ -28,6 +28,8 @@ Now, find the length of the shortest path from * to # in the following grid:
{grid}
"""
DATASET_NAME = "shortest_path"
@dataclass
class ShortestPathConfig:
@ -159,6 +161,8 @@ class ShortestPathDataset(ProceduralDataset):
"question": QUESTION_TEMPLATE.format(grid=matrix_str),
"answer": answer_str,
"metadata": {
"source_dataset": DATASET_NAME,
"source_index": idx,
"matrix": matrix,
"solution": answer,
"difficulty": {
@ -192,4 +196,4 @@ class ShortestPathCurriculum(BaseCurriculum):
)
register_dataset("shortest_path", ShortestPathDataset, ShortestPathConfig, ShortestPathCurriculum)
register_dataset(DATASET_NAME, ShortestPathDataset, ShortestPathConfig, ShortestPathCurriculum)