ageas.Hangar

class ageas.Hangar(config_folder: str)

Bases: object

Collection of candidate Unit models and configs.

Each subdirectory under the configuration folder is treated as a model type (e.g. svc, mnb, xgb), and every JSON file in that subdirectory yields one Unit registered in the hangar under a unique key.

Variables:

units – Registry mapping unit_id strings to Unit objects loaded from the config folder.

__init__(config_folder: str) None

Initialize the hangar from a config folder.

Parameters:

config_folder – Folder path that contains one subfolder per model type. Each subfolder must hold one or more JSON configuration files, each of which becomes a Unit.

sortie_generate(unit_types: list = None, unit_list: list = None) dict

Generate a sortie squad of units.

A sortie squad is a (possibly filtered) shallow copy of the hangar’s unit registry which is later passed to Deck for training and evaluation.

Parameters:
  • unit_types – List of model types to keep (e.g. ['svc', 'mnb', 'xgb']). None keeps all types.

  • unit_list – Whitelist of explicit unit IDs to keep. None keeps all units.

Returns:

Mapping unit_id -> Unit for the units that survived the filter.

spot_check(unit_id: str) str

Resolve the registry spot of a unit by its public unit ID.

Parameters:

unit_id – Unit identifier of the form "{type}_{tail}" (e.g. 'svc_unit1', 'mnb_unit2').

Returns:

The hangar key that points to the matching unit, or None if no unit in the hangar has the requested ID.