optunahub.samplers.SimpleBaseSampler
- class optunahub.samplers.SimpleBaseSampler(search_space: dict[str, BaseDistribution] | None = None, seed: int | None = None)
A simple base class to implement user-defined samplers.
- __init__(search_space: dict[str, BaseDistribution] | None = None, seed: int | None = None) None
Methods
__init__
([search_space, seed])after_trial
(study, trial, state, values)Trial post-processing.
before_trial
(study, trial)Trial pre-processing.
infer_relative_search_space
(study, trial)Infer the search space that will be used by relative sampling in the target trial.
reseed_rng
()Reseed sampler's random number generator.
sample_independent
(study, trial, param_name, ...)Sample a parameter for a given distribution.
sample_relative
(study, trial, search_space)Sample parameters in a given search space.