Skip to content

Commit

Permalink
Propagate the Scenario random seed to get_random_design (#1066)
Browse files Browse the repository at this point in the history
* Propagate the Scenario's random seed to get_random_design

* add changelog line

---------

Co-authored-by: Sarah Segel <[email protected]>
  • Loading branch information
bpkroth and sarah-segel authored Jan 10, 2024
1 parent 3d09049 commit a7ea4b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Bugfixes
- Fix path for dask scheduler file (#1055).
- Add OrdinalHyperparameter for random forest imputer (#1065).
- Propagate the Scenario random seed to `get_random_design` (#1066).
- Configurations that fail to become incumbents will be added to the rejected lists (#1069).
- SMAC RandomForest doesn't crash when `np.integer` used, i.e. as generated from a `np.random.RandomState` (#1084).

Expand Down
2 changes: 1 addition & 1 deletion smac/facade/hyperparameter_optimization_facade.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def get_random_design( # type: ignore
probability : float, defaults to 0.2
Probability that a configuration will be drawn at random.
"""
return ProbabilityRandomDesign(probability=probability)
return ProbabilityRandomDesign(probability=probability, seed=scenario.seed)

@staticmethod
def get_multi_objective_algorithm( # type: ignore
Expand Down

0 comments on commit a7ea4b5

Please sign in to comment.