selector.ta_result_store
This module contains selectors cache object.
Classes
|
Stores and manages all data from tournaments. |
- class selector.ta_result_store.TargetAlgorithmObserver(scenario)[source]
Bases:
objectStores and manages all data from tournaments.
- Parameters:
scenario (selector.scenario.Scenario) – AC scenario.
- get_free_core()[source]
Looks for and returns the index of a free core.
- Returns:
Index of a free core.
- Return type:
int
- get_results()[source]
Get all results of tournament.
- Returns:
Configuration /instance pair results.
- Return type:
dict
- get_results_single(conf_id, instance_id)[source]
Get a single result of tournament.
- Parameters:
conf_id (uuid.UUID) – ID of the configuration.
instance_id (str) – Name of the problem instance.
- Returns:
Configuration /instance pair results.
- Return type:
dict
- get_termination_history()[source]
Returns termination history.
- Returns:
Configuration and instance pairs that were terminated.
- Return type:
dict
- get_termination_single(conf_id, instance_id)[source]
Returns termination history for a configuration.
- Returns:
Problem instance names the configuration was terminated on.
- Return type:
list
- get_tournament()[source]
Get all tournaments.
- Returns:
List of selector.pool.Tournament records.
- Return type:
list
- get_tournament_history()[source]
Returns tournament history.
- Returns:
Tournament history: {selector.pool.Tournament.id: selector.pool.Tournament}
- Return type:
dict
- put_intermediate_output(conf_id, instance_id, value)[source]
Saves intermediate output.
- Parameters:
conf_id (uuid.UUID) – ID of the configuration.
instance_id (str) – Name of the instance.
value (str) – intermediate output of the target algorithm.
- put_result(conf_id, instance_id, result)[source]
Saves result of the configuration/instance run.
- Parameters:
conf_id (uuid.UUID) – ID of the configuration.
instance_id (str) – Name of the instance.
result (float) – Result of the configuration/instance run.
- put_start(conf_id, instance_id, start)[source]
Record start of target algorithm run.
- Parameters:
conf_id (uuid.UUID) – ID of the configuration.
instance_id (str) – Name of the problem instance.
start (int) – Start time of the run.
- put_termination_history(conf_id, instance_id)[source]
Save termination history.
- Parameters:
conf_id (uuid.UUID) – ID of the configuration.
instance_id (str) – Name of the problem instance.
- put_tournament_history(tournament)[source]
Saves tournament to the tournament history.
- Parameters:
tournament (selector.pool.Tournament) – Tournament data to save to history.
- put_tournament_update(tournament)[source]
Saves currently running tournament to the tournament history.
- Parameters:
tournament (selector.pool.Tournament) – Tournament data to save to history.
- record_core_affinity(core, task)[source]
Records that a core is bound.
- Parameters:
core (int) – Index of core.
task (dict) – Configuration/instance pair.
- remove_core_affinity(core)[source]
Records that a binding is removed.
- Parameters:
core (int) – Index of core.
- remove_tournament(tournament)[source]
Deletes tournament from the tournament history.
- Parameters:
tournament (selector.pool.Tournament) – Tournament data to delete.