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:
Zafir Stojanovski 2025-03-20 12:12:14 +01:00 committed by GitHub
parent 7475a20700
commit ce0a6c4878
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
104 changed files with 549 additions and 146 deletions

View file

@ -14,6 +14,8 @@ Your output should be only the number of interest.
Now, pick the {size} number of the following candidates: {numbers}
"""
DATASET_NAME = "number_format"
@dataclass
class NumberFormatConfig:
@ -94,6 +96,8 @@ class NumberFormatDataset(ProceduralDataset):
"question": QUESTION_TEMPLATE.format(numbers=" ".join(formatted_candidates), size=size),
"answer": str(answer),
"metadata": {
"source_dataset": DATASET_NAME,
"source_index": idx,
"candidates": candidates,
"solution": answer,
"formatted_candidates": formatted_candidates,
@ -138,4 +142,4 @@ class NumberFormatCurriculum(BaseCurriculum):
)
register_dataset("number_format", NumberFormatDataset, NumberFormatConfig, NumberFormatCurriculum)
register_dataset(DATASET_NAME, NumberFormatDataset, NumberFormatConfig, NumberFormatCurriculum)