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
|
|
@ -15,6 +15,8 @@ Compute {base}^{exponent}. Return your final answer correct to 3 significant fig
|
|||
Provide your answer in scientific notation using 'e' notation (e.g., 1.23e+4).
|
||||
"""
|
||||
|
||||
DATASET_NAME = "power_function"
|
||||
|
||||
|
||||
@dataclass
|
||||
class PowerFunctionConfig:
|
||||
|
|
@ -74,6 +76,8 @@ class PowerFunctionDataset(ProceduralDataset):
|
|||
"question": QUESTION_TEMPLATE.format(base=base, exponent=exponent),
|
||||
"answer": str(answer),
|
||||
"metadata": {
|
||||
"source_dataset": DATASET_NAME,
|
||||
"source_index": idx,
|
||||
"base": base,
|
||||
"exponent": exponent,
|
||||
"solution": answer,
|
||||
|
|
@ -97,4 +101,4 @@ class PowerFunctionCurriculum(BaseCurriculum):
|
|||
)
|
||||
|
||||
|
||||
register_dataset("power_function", PowerFunctionDataset, PowerFunctionConfig, PowerFunctionCurriculum)
|
||||
register_dataset(DATASET_NAME, PowerFunctionDataset, PowerFunctionConfig, PowerFunctionCurriculum)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue