smac.main.smbo

Classes

SMBO(*args, **kwargs)

Implements get_next_configurations, ask, and tell.

Interfaces

class smac.main.smbo.SMBO(*args, **kwargs)[source]

Bases: BaseSMBO

Implements get_next_configurations, ask, and tell.

ask()[source]

Asks the intensifier for the next trial.

Return type:

tuple[TrialInfoIntent, TrialInfo]

Returns:

  • intent (TrialInfoIntent) – Intent of the trials (wait/skip/run).

  • info (TrialInfo) – Information about the trial (config, instance, seed, budget).

get_next_configurations(n=None)[source]

Chooses next candidate solution with Bayesian optimization. The suggested configurations depend on the surrogate model acquisition optimizer/function. This method is used by the intensifier.

Parameters:

n (int | None, defaults to None) – Number of configurations to return. If None, uses the number of challengers defined in the acquisition optimizer.

Returns:

configurations – Iterator over configurations from the acquisition optimizer.

Return type:

Iterator[Configuration]

tell(info, value, time_left=None, save=True)[source]

Adds the result of a trial to the runhistory and updates the intensifier. Also, the stats object is updated.

Parameters:
  • info (TrialInfo) – Describes the trial from which to process the results.

  • value (TrialValue) – Contains relevant information regarding the execution of a trial.

  • time_left (float | None, defaults to None) – How much time in seconds is left to perform intensification.

  • save (bool, optional to True) – Whether the runhistory should be saved.

Return type:

None