mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-27 17:23:19 +00:00
Remove play file and format with pre-commit
This commit is contained in:
parent
0738d3fd17
commit
2dad5a56f3
4 changed files with 7 additions and 10 deletions
|
|
@ -11,7 +11,7 @@ repos:
|
||||||
rev: 24.1.1
|
rev: 24.1.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
language_version: python3.11
|
language_version: python3.13
|
||||||
|
|
||||||
- repo: https://github.com/pycqa/isort
|
- repo: https://github.com/pycqa/isort
|
||||||
rev: 5.13.2
|
rev: 5.13.2
|
||||||
|
|
|
||||||
6
play.py
6
play.py
|
|
@ -1,6 +0,0 @@
|
||||||
import reasoning_gym
|
|
||||||
data = reasoning_gym.create_dataset('polynomial_equations', size=3, seed=42)
|
|
||||||
for i, x in enumerate(data):
|
|
||||||
print(f"{i}: question={x['question']}\n")
|
|
||||||
print(f"{i}: answer={x['answer']}\n")
|
|
||||||
print('metadata:', x['metadata'])
|
|
||||||
|
|
@ -102,9 +102,12 @@ In solving the equations, please abide by the following instruction:
|
||||||
if len(real_solutions) > 0:
|
if len(real_solutions) > 0:
|
||||||
real_solutions.sort()
|
real_solutions.sort()
|
||||||
break
|
break
|
||||||
|
|
||||||
answer_str = ", ".join(str(x) for x in real_solutions)
|
answer_str = ", ".join(str(x) for x in real_solutions)
|
||||||
question = rng.choice(self._prompt_templates).format(variable=variable, polynomial_expanded=polynomial_expanded) + self.added_instruction
|
question = (
|
||||||
|
rng.choice(self._prompt_templates).format(variable=variable, polynomial_expanded=polynomial_expanded)
|
||||||
|
+ self.added_instruction
|
||||||
|
)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"question": question,
|
"question": question,
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ class PolynomialMultiplicationDataset(ProceduralDataset):
|
||||||
self.added_instruction = """
|
self.added_instruction = """
|
||||||
In addition, When doing calculation, Use the following instructions together with your mathematical ingenuity to solve the integral problems
|
In addition, When doing calculation, Use the following instructions together with your mathematical ingenuity to solve the integral problems
|
||||||
## 1. Use ** instead ^ to represent powers. For example 7*X**2 instead of 7*X^2.
|
## 1. Use ** instead ^ to represent powers. For example 7*X**2 instead of 7*X^2.
|
||||||
## 2. Always use * when doing all sorts of multiplcation in your reasoning steps and even in reporting answers.
|
## 2. Always use * when doing all sorts of multiplcation in your reasoning steps and even in reporting answers.
|
||||||
"""
|
"""
|
||||||
super().__init__(config=config, seed=config.seed, size=config.size)
|
super().__init__(config=config, seed=config.seed, size=config.size)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue