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
|
|
@ -29,6 +29,9 @@ Note: Apply the rules at most {max_iterations} times. If the rules cannot be app
|
|||
"""
|
||||
|
||||
|
||||
DATASET_NAME = "string_synthesis"
|
||||
|
||||
|
||||
@dataclass
|
||||
class StringSynthesisConfig:
|
||||
"""Configuration for String Synthesis dataset generation"""
|
||||
|
|
@ -130,6 +133,8 @@ class StringSynthesisDataset(ProceduralDataset):
|
|||
),
|
||||
"answer": answer_str,
|
||||
"metadata": {
|
||||
"source_dataset": DATASET_NAME,
|
||||
"source_index": idx,
|
||||
"states": states,
|
||||
"solution": answer,
|
||||
"initial_blocks": (A_square, B_square, C_square),
|
||||
|
|
@ -157,4 +162,4 @@ class StringSynthesisCurriculum(BaseCurriculum):
|
|||
)
|
||||
|
||||
|
||||
register_dataset("string_synthesis", StringSynthesisDataset, StringSynthesisConfig, StringSynthesisCurriculum)
|
||||
register_dataset(DATASET_NAME, StringSynthesisDataset, StringSynthesisConfig, StringSynthesisCurriculum)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue