Open drodarie opened 10 months ago
This will require a technical proposal to address RNG in the framework.
I propose:
rng
which can contain RandomGeneratorNode
sRandomGeneratorNode
should provide an init_rng
method that initializes their own random generatorWe can create multiple subtypes of RandomGeneratorNode
s like NumpyRandomGeneratorNode
and NestRandomGeneratorNode
that can initialize and pin down random number generation for these libraries we use, and provide a default scaffold
one that users can use with self.scaffold.random
and can configure from the rng
node:
rng:
scaffold:
type: numpy
generator: PCG64
seed: 15
nest:
type: nest
generator: Philox_64
seed: 100
This would make self.scaffold.random
a numpy PCG64
generator with seed 15, and would set nest.rng_type = 'Philox_64'
and nest.rng_seed = 100
. We should follow numpy
's Generator
interface. In the case that we're only setting RNG stuff for a dependency that type of node can just raise NotImplementedError
s
In order to be able to guarantee reproducibility of reconstruction and/or specific bug, as a user, I would like to be able to set a random seed to bsb. All reconstruction steps are concerned.