Skip to content

Commit

Permalink
toseed
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Saves committed Feb 6, 2024
1 parent 0e1665b commit d5e2974
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions smt/utils/design_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,11 +745,7 @@ def _is_num(val):
cs_vars[name] = CategoricalHyperparameter(name, choices=dv.values)
else:
raise ValueError(f"Unknown variable type: {dv!r}")
seed = None
if isinstance(random_state, int):
seed = random_state
elif isinstance(random_state, np.random.RandomState):
seed = random_state.get_state()[1][0]
seed = self._to_seed(random_state)

self._cs = NoDefaultConfigurationSpace(space=cs_vars, seed=seed)

Expand Down

0 comments on commit d5e2974

Please sign in to comment.