mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-23 16:55:05 +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
|
|
@ -28,6 +28,8 @@ Now, you have {A_machine} machine A, {B_machine} machine B, and {C_machine} mach
|
|||
Note: Apply the rules at most {max_iterations} times. If the rules cannot be applied anymore, or if you have reached the maximum number of iterations, stop and provide the current counts of each machine and part type.
|
||||
"""
|
||||
|
||||
DATASET_NAME = "string_splitting"
|
||||
|
||||
|
||||
@dataclass
|
||||
class StringSplittingConfig:
|
||||
|
|
@ -125,6 +127,8 @@ class StringSplittingDataset(ProceduralDataset):
|
|||
),
|
||||
"answer": answer_str,
|
||||
"metadata": {
|
||||
"source_dataset": DATASET_NAME,
|
||||
"source_index": idx,
|
||||
"states": states,
|
||||
"solution": answer,
|
||||
"initial_machines": (A_machine, B_machine, C_machine),
|
||||
|
|
@ -152,4 +156,4 @@ class StringSplittingCurriculum(BaseCurriculum):
|
|||
)
|
||||
|
||||
|
||||
register_dataset("string_splitting", StringSplittingDataset, StringSplittingConfig, StringSplittingCurriculum)
|
||||
register_dataset(DATASET_NAME, StringSplittingDataset, StringSplittingConfig, StringSplittingCurriculum)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue