selector.tournament_monitor
In this module the tournament monitor is defined.
Classes
|
Monitor whether the live total runtime of a running conf is exceeding the accumulated runtime of the worst finisher, given that we have already enough finisher. |
- class selector.tournament_monitor.Monitor(sleep_time, cache, scenario)[source]
Bases:
objectMonitor whether the live total runtime of a running conf is exceeding the accumulated runtime of the worst finisher, given that we have already enough finisher. While up the monitor may kill multiple conf/instance pairs. To avoid killing a ta run twice, the monitor stores what it has already killed.
- 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.
- termination_check(conf_id, instance, termination_history)[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.
termination_history (dict) – Record of configuration/instance terminations.
- Returns:
False if configuration/instance pair killed, True else.
- Return type:
bool