mlos_core.optimizers.flaml_optimizer
Contains the FlamlOptimizer
class.
Notes
See the Flaml Documentation for more details.
Classes
A named tuple representing a sample that has been evaluated. |
|
Wrapper class for FLAML Optimizer: A fast library for AutoML and tuning. |
Module Contents
- class mlos_core.optimizers.flaml_optimizer.EvaluatedSample[source]
Bases:
NamedTuple
A named tuple representing a sample that has been evaluated.
- class mlos_core.optimizers.flaml_optimizer.FlamlOptimizer(*, parameter_space: ConfigSpace.ConfigurationSpace, optimization_targets: List[str], objective_weights: List[float] | None = None, space_adapter: mlos_core.spaces.adapters.adapter.BaseSpaceAdapter | None = None, low_cost_partial_config: dict | None = None, seed: int | None = None)[source]
Bases:
mlos_core.optimizers.optimizer.BaseOptimizer
Wrapper class for FLAML Optimizer: A fast library for AutoML and tuning.
Create an MLOS wrapper for FLAML.
- Parameters:
parameter_space (ConfigSpace.ConfigurationSpace) – The parameter space to optimize.
optimization_targets (List[str]) – The names of the optimization targets to minimize.
objective_weights (Optional[List[float]]) – Optional list of weights of optimization targets.
space_adapter (BaseSpaceAdapter) – The space adapter class to employ for parameter space transformations.
low_cost_partial_config (dict) – A dictionary from a subset of controlled dimensions to the initial low-cost values. More info: https://microsoft.github.io/FLAML/docs/FAQ#about-low_cost_partial_config-in-tune
seed (Optional[int]) – If provided, calls np.random.seed() with the provided value to set the seed globally at init.
- abstract register_pending(*, configs: pandas.DataFrame, context: pandas.DataFrame | None = None, metadata: pandas.DataFrame | None = None) None [source]
Registers the given configs as “pending”. That is it say, it has been suggested by the optimizer, and an experiment trial has been started. This can be useful for executing multiple trials in parallel, retry logic, etc.
- Parameters:
configs (pandas.DataFrame) – Dataframe of configs / parameters. The columns are parameter names and the rows are the configs.
context (pandas.DataFrame) – Not Yet Implemented.
metadata (Optional[pandas.DataFrame]) – Metadata returned by the backend optimizer’s suggest method.
- Return type:
None
- evaluated_samples: Dict[ConfigSpace.Configuration, EvaluatedSample][source]
- flaml_parameter_space: Dict[str, mlos_core.spaces.converters.flaml.FlamlDomain][source]