smac.epm.util_funcs module

smac.epm.util_funcs.get_rng(rng: Optional[Union[int, numpy.random.mtrand.RandomState]] = None, run_id: Optional[int] = None, logger: Optional[logging.Logger] = None) → Tuple[int, numpy.random.mtrand.RandomState][source]

Initialize random number generator and set run_id

  • If rng and run_id are None, initialize a new generator and sample a run_id

  • If rng is None and a run_id is given, use the run_id to initialize the rng

  • If rng is an int, a RandomState object is created from that.

  • If rng is RandomState, return it

  • If only run_id is None, a run_id is sampled from the random state.

  • rng (np.random.RandomState|int|None) –

  • run_id (int, optional) –

  • logger (logging.Logger, optional) –


  • int

  • np.random.RandomState

smac.epm.util_funcs.get_types(config_space: ConfigSpace.configuration_space.ConfigurationSpace, instance_features: Optional[numpy.ndarray] = None) → Tuple[List[int], List[Tuple[float, float]]][source]