mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-19 12:58:07 +00:00
formatting
This commit is contained in:
parent
20e0fb45bd
commit
44f8d7b6af
4 changed files with 7 additions and 20 deletions
|
|
@ -225,16 +225,11 @@ class BasicArithmeticDataset(ProceduralDataset):
|
|||
def _format_question(self, rng: Random, expression: str) -> str:
|
||||
"""Format the expression with clear answer positioning"""
|
||||
answer_instruction = "Put your final answer after '=' without additional text."
|
||||
|
||||
|
||||
if self.config.format_style == "simple":
|
||||
return f"{answer_instruction} Calculate {expression} ="
|
||||
else:
|
||||
templates = [
|
||||
"What is {0} =",
|
||||
"Solve {0}=",
|
||||
"Compute {0} =",
|
||||
"Evaluate: {0} ="
|
||||
]
|
||||
templates = ["What is {0} =", "Solve {0}=", "Compute {0} =", "Evaluate: {0} ="]
|
||||
template = rng.choice(templates).format(expression)
|
||||
return f"{answer_instruction} {template}"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue