mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-28 17:29:39 +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
|
|
@ -24,6 +24,8 @@ Your output should be a list of lists, where each list represents a palindrome p
|
|||
Partition the following string into palindromes: {string}
|
||||
"""
|
||||
|
||||
DATASET_NAME = "palindrome_partitioning"
|
||||
|
||||
|
||||
@dataclass
|
||||
class PalindromePartitioningConfig:
|
||||
|
|
@ -138,6 +140,8 @@ class PalindromePartitioningDataset(ProceduralDataset):
|
|||
"question": QUESTION_TEMPLATE.format(string=string),
|
||||
"answer": answer_str,
|
||||
"metadata": {
|
||||
"source_dataset": DATASET_NAME,
|
||||
"source_index": idx,
|
||||
"string": string,
|
||||
"solution": answer,
|
||||
"string_len": string_len,
|
||||
|
|
@ -176,7 +180,7 @@ class PalindromePartitioningCurriculum(BaseCurriculum):
|
|||
|
||||
|
||||
register_dataset(
|
||||
"palindrome_partitioning",
|
||||
DATASET_NAME,
|
||||
PalindromePartitioningDataset,
|
||||
PalindromePartitioningConfig,
|
||||
PalindromePartitioningCurriculum,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue