mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-24 17:05:03 +00:00
Fix primes representation in count_primes dataset metadata
This commit is contained in:
parent
c0e5941fe5
commit
e9e36f3a23
2 changed files with 17 additions and 2 deletions
|
|
@ -51,8 +51,8 @@ class CountPrimesDataset(ProceduralDataset):
|
|||
rng = Random(self.seed + idx)
|
||||
start = rng.randint(1, self.config.max_n)
|
||||
end = rng.randint(start, self.config.max_n)
|
||||
primes = self.primes[start : end + 1]
|
||||
answer = sum(primes)
|
||||
primes = [i for i in range(start, end + 1) if self.primes[i]]
|
||||
answer = len(primes)
|
||||
return {
|
||||
"question": QUESTION_TEMPLATE.format(start=start, end=end),
|
||||
"answer": str(answer),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue