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
|
|
@ -9,6 +9,8 @@ from typing import Optional
|
|||
from ..coaching import BaseCurriculum, RangeAttributeDefinition
|
||||
from ..factory import ProceduralDataset, register_dataset
|
||||
|
||||
DATASET_NAME = "lcm"
|
||||
|
||||
|
||||
@dataclass
|
||||
class LCMConfig:
|
||||
|
|
@ -64,6 +66,8 @@ class LCMDataset(ProceduralDataset):
|
|||
"question": f"Find the Least Common Multiple (LCM) of these numbers: {numbers_str}",
|
||||
"answer": str(result),
|
||||
"metadata": {
|
||||
"source_dataset": DATASET_NAME,
|
||||
"source_index": idx,
|
||||
"numbers": numbers,
|
||||
"result": result,
|
||||
"difficulty": {
|
||||
|
|
@ -98,4 +102,4 @@ class LCMCurriculum(BaseCurriculum):
|
|||
)
|
||||
|
||||
|
||||
register_dataset("lcm", LCMDataset, LCMConfig, LCMCurriculum)
|
||||
register_dataset(DATASET_NAME, LCMDataset, LCMConfig, LCMCurriculum)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue