mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-19 12:58:07 +00:00
reformatted basic airth question template
This commit is contained in:
parent
d9b08a579e
commit
c28688cb96
1 changed files with 4 additions and 2 deletions
|
|
@ -224,11 +224,13 @@ class BasicArithmeticDataset(ProceduralDataset):
|
|||
|
||||
def _format_question(self, rng: Random, expression: str) -> str:
|
||||
"""Format the expression according to config style"""
|
||||
base_question = "Return only the answer to the following question: {question} ="
|
||||
if self.config.format_style == "simple":
|
||||
return f"{expression} ="
|
||||
return base_question.format(question=expression)
|
||||
else:
|
||||
templates = ["What is {0}?", "Calculate {0}", "Solve {0}", "Evaluate the expression: {0}"]
|
||||
return rng.choice(templates).format(expression)
|
||||
question = rng.choice(templates).format(expression)
|
||||
return base_question.format(question=question)
|
||||
|
||||
|
||||
# Register the dataset
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue