selector.winner_instance_monitor

In this module the instance monitor is defined.

Classes

WinnerInstanceMonitor(sleep_time, cache, ...)

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: object

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). 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:
monitor()[source]

Monitors a tournament and terminates a configuration/instance pair if necessary.

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