mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-19 12:58:07 +00:00
Refactor and improve code formatting for readability in combinatorics and probability modules
This commit is contained in:
parent
dc0d81c096
commit
0f7b8b7986
5 changed files with 62 additions and 37 deletions
|
|
@ -36,9 +36,22 @@ class CombinatoricsConfig:
|
|||
task_types: tuple[str, ...] = TASK_TYPES
|
||||
task_weights: list[float] = field(
|
||||
default_factory=lambda: [
|
||||
0.08, 0.06, 0.08, 0.08, 0.06, 0.04,
|
||||
0.07, 0.07, 0.07, 0.07, 0.07, 0.07,
|
||||
0.06, 0.06, 0.06, 0.06,
|
||||
0.08,
|
||||
0.06,
|
||||
0.08,
|
||||
0.08,
|
||||
0.06,
|
||||
0.04,
|
||||
0.07,
|
||||
0.07,
|
||||
0.07,
|
||||
0.07,
|
||||
0.07,
|
||||
0.07,
|
||||
0.06,
|
||||
0.06,
|
||||
0.06,
|
||||
0.06,
|
||||
]
|
||||
)
|
||||
seed: Optional[int] = None
|
||||
|
|
@ -241,8 +254,7 @@ class CombinatoricsDataset(ProceduralDataset):
|
|||
n = rng.randint(max(4, self.config.min_n), max(5, self.config.max_n))
|
||||
answer = n * (n - 3) // 2
|
||||
question = (
|
||||
f"How many diagonals does a {n}-sided convex polygon have? "
|
||||
f"Give your answer as a single integer."
|
||||
f"How many diagonals does a {n}-sided convex polygon have? " f"Give your answer as a single integer."
|
||||
)
|
||||
return {"question": question, "answer": str(answer), "task_type": "geometric_counting"}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue