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
c6d01541aa
commit
4c47527130
104 changed files with 549 additions and 146 deletions
|
|
@ -9,6 +9,8 @@ from dateutil import parser
|
|||
from ..coaching import BaseCurriculum, ScalarAttributeDefinition
|
||||
from ..factory import ProceduralDataset, register_dataset
|
||||
|
||||
DATASET_NAME = "time_intervals"
|
||||
|
||||
|
||||
@dataclass
|
||||
class TimeIntervalsConfig:
|
||||
|
|
@ -134,6 +136,8 @@ class TimeIntervalsDataset(ProceduralDataset):
|
|||
"question": question,
|
||||
"answer": answer,
|
||||
"metadata": {
|
||||
"source_dataset": DATASET_NAME,
|
||||
"source_index": idx,
|
||||
"task_type": task_type,
|
||||
"start_time": start_dt,
|
||||
"end_time": end_dt,
|
||||
|
|
@ -346,4 +350,4 @@ class TimeIntervalsCurriculum(BaseCurriculum):
|
|||
|
||||
|
||||
# Register the dataset
|
||||
register_dataset("time_intervals", TimeIntervalsDataset, TimeIntervalsConfig, TimeIntervalsCurriculum)
|
||||
register_dataset(DATASET_NAME, TimeIntervalsDataset, TimeIntervalsConfig, TimeIntervalsCurriculum)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue