smac.runner.abstract_serial_runner

Classes

AbstractSerialRunner(scenario[, ...])

Interfaces

class smac.runner.abstract_serial_runner.AbstractSerialRunner(scenario, required_arguments=[])[source]

Bases: AbstractRunner

count_available_workers()[source]

Returns the number of available workers. Serial workers only have one worker.

Return type:

int

is_running()[source]

Whether there are trials still running.

Generally, if the runner is serial, launching a trial instantly returns its result. On parallel runners, there might be pending configurations to complete.

Return type:

bool

iter_results()[source]

This method returns any finished configuration, and returns a list with the results of executing the configurations. This class keeps populating results to self._results_queue until a call to get_finished trials is done. In this case, the self._results_queue list is emptied and all trial values produced by running run are returned.

Returns:

A list of TrialInfo/TrialValue tuples, all of which have been finished.

Return type:

Iterator[tuple[TrialInfo, TrialValue]]

submit_trial(trial_info)[source]
This function submits a trial_info object in a serial fashion. As there is a single

worker for this task, this interface can be considered a wrapper over the run method.

Both result/exceptions can be completely determined in this step so both lists are properly filled.

Parameters:

trial_info (TrialInfo) – An object containing the configuration launched.

Return type:

None

wait()[source]

The SMBO/intensifier might need to wait for trials to finish before making a decision. For serial runners, no wait is needed as the result is immediately available.

Return type:

None