syne_tune.optimizer.schedulers.multiobjective.linear_scalarizer module

class syne_tune.optimizer.schedulers.multiobjective.linear_scalarizer.LinearScalarizedScheduler(config_space, metric, mode='min', scalarization_weights=None, base_scheduler_factory=None, **base_scheduler_kwargs)[source]

Bases: TrialScheduler

Scheduler with linear scalarization of multiple objectives

This method optimizes a single objective equal to the linear scalarization of given two objectives. The scalarized single objective is named: "scalarized_<metric1>_<metric2>_..._<metricN>".

Parameters:
  • base_scheduler_factory (Optional[Callable[[Any], TrialScheduler]]) – Factory method for the single-objective scheduler used on the scalarized objective. It will be initialized inside this scheduler. Defaults to FIFOScheduler.

  • config_space (Dict[str, Any]) – Configuration space for evaluation function

  • metric (List[str]) – Names of metrics to optimize

  • mode (Union[List[str], str]) – Modes of metrics to optimize (“min” or “max”). All must be matching.

  • scalarization_weights (Union[ndarray, List[float], None]) – Weights used to scalarize objectives. Defaults to an array of 1s

  • base_scheduler_kwargs – Additional arguments to base_scheduler_factory beyond config_space, metric, mode

scalarization_weights: ndarray
single_objective_metric: str
base_scheduler: TrialScheduler
on_trial_add(trial)[source]

Called when a new trial is added to the trial runner. See the docstring of the chosen base_scheduler for details

on_trial_error(trial)[source]

Called when a trial has failed. See the docstring of the chosen base_scheduler for details

on_trial_result(trial, result)[source]

Called on each intermediate result reported by a trial. See the docstring of the chosen base_scheduler for details

Return type:

str

on_trial_complete(trial, result)[source]

Notification for the completion of trial. See the docstring of the chosen base_scheduler for details

on_trial_remove(trial)[source]

Called to remove trial. See the docstring of the chosen base_scheduler for details

trials_checkpoints_can_be_removed()[source]

See the docstring of the chosen base_scheduler for details :rtype: List[int] :return: IDs of paused trials for which checkpoints can be removed

metric_names()[source]
Return type:

List[str]

Returns:

List of metric names.

metric_mode()[source]
Return type:

Union[str, List[str]]

Returns:

“min” if target metric is minimized, otherwise “max”.

metadata()[source]
Return type:

Dict[str, Any]

Returns:

Metadata of the scheduler

is_multiobjective_scheduler()[source]

Return True if a scheduler is multi-objective.

Return type:

bool