selector.winner_instance_monitor
In this module the instance monitor is defined.
Classes
|
Monitor whether the runtime of a configuration on an instance exceeds the worst runtime of a tournament winning configuration on that instance multiplied by a constant (delta_cap). |
- class selector.winner_instance_monitor.WinnerInstanceMonitor(sleep_time, cache, scenario, delta_cap=1)[source]
Bases:
objectMonitor whether the runtime of a configuration on an instance exceeds the worst runtime of a tournament winning configuration on that instance multiplied by a constant (delta_cap). When a runtime exceeds this bound the configuration/instance pair is terminated. The terminated configuration/instance pairs are stored in the termination_history to avoid double killing
- Parameters:
sleep_time (int) – Wake up and check whether runtime is exceeded
cache (selector.ta_result_store.TargetAlgorithmObserver) – Stores all tournament related data.
scenario (selector.scenario.Scenario) – AC scenario.
delta_cap (int) – Constant the current best runtime for each instance is multiplied by.
- termination_check(conf_id, instance)[source]
Check if we have killed a conf/instance pair already. Return True if we did not.
- Parameters:
conf_id (uuid.UUID) – ID of the configuration to be checked.
instance (str) – Name of instance to be checked.
- Returns:
False if configuration/instance pair killed, True else.
- Return type:
bool
- update_termination_history(conf_id, instance_id)[source]
Stores termination events in history.
- Parameters:
conf_id (uuid.UUID) – ID of the configuration that was killed.
instance_id (str) – Name of instance the configuration was killed on.
- Returns:
False if configuration/instance pair killed, True else.
- Return type:
bool