mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-28 17:29:39 +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
c6d01541aa
commit
4c47527130
104 changed files with 549 additions and 146 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue