mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-19 12:58:07 +00:00
include ranges rather than sampled values in difficulty metadata dicts (#387)
* update difficulty metadata for logic datasets * update difficulty metadata for graph datasets * update difficulty metadata for geometry datasets * update difficulty metadata for games datasets * update difficulty metadata for cognition datasets * update difficulty metadata for arithmetic datasets * update difficulty metadata for arc datasets * update difficulty metadata for algorithmic datasets * update difficulty metadata for algebra datasets * use tuples * update tests * update tests
This commit is contained in:
parent
b69c35818a
commit
7475a20700
80 changed files with 304 additions and 126 deletions
|
|
@ -101,7 +101,7 @@ class SpiralMatrixDataset(ProceduralDataset):
|
|||
"""Generate a single Spiral Matrix question"""
|
||||
rng = Random(self.seed + idx)
|
||||
|
||||
n = rng.randint(2, self.config.max_n)
|
||||
n = rng.randint(self.config.min_n, self.config.max_n)
|
||||
matrix = self._get_matrix(rng, n)
|
||||
matrix_str = self._matrix_to_str(matrix)
|
||||
answer = self._get_spiral(matrix)
|
||||
|
|
@ -113,7 +113,10 @@ class SpiralMatrixDataset(ProceduralDataset):
|
|||
"metadata": {
|
||||
"matrix": matrix,
|
||||
"solution": answer,
|
||||
"difficulty": {"n": n},
|
||||
"n": n,
|
||||
"difficulty": {
|
||||
"n": (self.config.min_n, self.config.max_n),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue