mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-30 17:40:45 +00:00
pass config to ProceduralDataset base
This commit is contained in:
parent
b3a2b719c7
commit
0d2d8ba6a0
20 changed files with 45 additions and 80 deletions
|
|
@ -11,6 +11,9 @@ class ProceduralDataset(ABC, Sized, Iterable[Dict[str, Any]]):
|
|||
|
||||
def __init__(self, config: Any, seed: Optional[int] = None, size: int = 500):
|
||||
"""Initialize the dataset with config, optional seed and size"""
|
||||
if hasattr(config, "validate") and callable(config.validate):
|
||||
config.validate()
|
||||
|
||||
self.config = config
|
||||
self.size = size
|
||||
self.seed = seed if seed is not None else Random().randint(0, 2**32)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue