smac.stats.stats

Classes

Stats(scenario)

All statistics collected during configuration run.

class smac.stats.stats.Stats(scenario)[source]

Bases: object

All statistics collected during configuration run. Written to output- directory to be restored.

Parameters

scenario (Scenario) –

submitted_ta_runs
finished_ta_runs
n_configs
wallclock_time_used
ta_time_used
inc_changed
get_remaing_time_budget()[source]

Subtracts the runtime configuration budget with the used wallclock time.

Return type

float

get_remaining_ta_budget()[source]

Subtracts the ta running budget with the used time.

Return type

float

get_remaining_ta_runs()[source]

Subtract the target algorithm runs in the scenario with the used ta runs.

Return type

int

get_used_wallclock_time()[source]

Returns used wallclock time.

Returns

wallclock_time – used wallclock time in sec

Return type

int

is_budget_exhausted()[source]

Check whether the configuration budget for time budget, ta_budget and submitted_ta_runs is exhausted.

Returns

exhaustedness – true if one of the budgets is exhausted.

Return type

boolean

load(fn=None)[source]

Load all attributes from dictionary in file into stats-object.

Parameters

fn (string or None) – Path to file to load stats from. If no path is given, the path given in the current scenario is used.

Return type

None

print_stats(debug_out=False)[source]

Prints all statistics.

Parameters

debug (bool) – use logging.debug instead of logging.info if set to true

Return type

None

save()[source]

Save all relevant attributes to json-dictionary.

Return type

None

start_timing()[source]

Starts the timer (for the runtime configuration budget).

Substracting wallclock time used so we can continue loaded Stats.

Return type

None

update_average_configs_per_intensify(n_configs)[source]

Updates statistics how many configurations on average per used in intensify.

Parameters

n_configs (int) – number of configurations in current intensify

Return type

None