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
|
|
@ -24,6 +24,9 @@ Return True if the following two strings are isomorphic, or False otherwise:
|
|||
"""
|
||||
|
||||
|
||||
DATASET_NAME = "isomorphic_strings"
|
||||
|
||||
|
||||
@dataclass
|
||||
class IsomorphicStringsConfig:
|
||||
"""Configuration for Isomorphic Strings dataset generation"""
|
||||
|
|
@ -107,6 +110,8 @@ class IsomorphicStringsDataset(ProceduralDataset):
|
|||
"question": QUESTION_TEMPLATE.format(s=s, t=t),
|
||||
"answer": str(answer),
|
||||
"metadata": {
|
||||
"source_dataset": DATASET_NAME,
|
||||
"source_index": idx,
|
||||
"words": [s, t],
|
||||
"solution": answer,
|
||||
"solvable": solvable,
|
||||
|
|
@ -134,4 +139,4 @@ class IsomorphicStringsCurriculum(BaseCurriculum):
|
|||
)
|
||||
|
||||
|
||||
register_dataset("isomorphic_strings", IsomorphicStringsDataset, IsomorphicStringsConfig, IsomorphicStringsCurriculum)
|
||||
register_dataset(DATASET_NAME, IsomorphicStringsDataset, IsomorphicStringsConfig, IsomorphicStringsCurriculum)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue