mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-19 12:58:07 +00:00
feat: Add seed wrapping at 2^32 to prevent unbounded growth
This commit is contained in:
parent
dc54a7672f
commit
e2d3f4b4e6
1 changed files with 2 additions and 2 deletions
|
|
@ -93,8 +93,8 @@ class ReseedingDataset(Iterable[Dict[str, Any]]):
|
|||
# Create new config with modified seed
|
||||
new_config = deepcopy(self.dataset.config)
|
||||
if hasattr(new_config, "seed"):
|
||||
# Derive new seed from chunk number using dataset's seed
|
||||
new_config.seed = self.dataset.seed + chunk_num
|
||||
# Derive new seed from chunk number using dataset's seed, wrapping around at 2^32
|
||||
new_config.seed = (self.dataset.seed + chunk_num) % (2**32)
|
||||
|
||||
# Create new dataset instance with chunk config
|
||||
return self.dataset_cls(new_config)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue