We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c259083 commit c408230Copy full SHA for c408230
bofire/strategies/strategy.py
@@ -23,6 +23,11 @@ def __init__(
23
data_model: DataModel,
24
):
25
self.domain = data_model.domain
26
+ # if data_model.seed is None (no explicit seed provided by the user),
27
+ # we draw a random seed from the default random number generator
28
+ # This is done to ensure reproducibility of the strategy,
29
+ # even if the user does not provide a seed one can extract the used seed
30
+ # from the strategy object via `strategy.seed`.
31
self.seed = data_model.seed or np.random.default_rng().integers(1000)
32
self.rng = np.random.default_rng(self.seed)
33
self._experiments = None
0 commit comments