mlos_bench.optimizers.one_shot_optimizer module¶
No-op optimizer for mlos_bench that proposes a single configuration.
- class mlos_bench.optimizers.one_shot_optimizer.OneShotOptimizer(tunables: TunableGroups, config: dict, global_config: dict | None = None, service: Service | None = None)¶
Bases:
MockOptimizer
No-op optimizer that proposes a single configuration and returns.
Explicit configs (partial or full) are possible using configuration files.
- Attributes:
config_space
Get the tunable parameters of the optimizer as a ConfigurationSpace.
current_iteration
The current number of iterations (suggestions) registered.
max_suggestions
The maximum number of iterations (suggestions) to run.
name
The name of the optimizer.
seed
The random seed for the optimizer.
start_with_defaults
Return True if the optimizer should start with the default values.
supports_preload
Return True if the optimizer supports pre-loading the data from previous experiments.
targets
A dictionary of {target: direction} of optimization targets.
tunable_params
Get the tunable parameters of the optimizer as TunableGroups.
Methods
bulk_register
(configs, scores[, status])Pre-load the optimizer with the bulk data from previous experiments.
get_best_observation
()Get the best observation so far.
not_converged
()Return True if not converged, False otherwise.
register
(tunables, status[, score])Register the observation for the given configuration.
suggest
()Always produce the same (initial) suggestion.
- suggest() TunableGroups ¶
Always produce the same (initial) suggestion.
- property supports_preload: bool¶
Return True if the optimizer supports pre-loading the data from previous experiments.