ageas.Hangar
- class ageas.Hangar(config_folder: str)
Bases:
objectCollection of candidate
Unitmodels 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 oneUnitregistered in the hangar under a unique key.- Variables:
units – Registry mapping
unit_idstrings toUnitobjects 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
Deckfor training and evaluation.- Parameters:
unit_types – List of model types to keep (e.g.
['svc', 'mnb', 'xgb']).Nonekeeps all types.unit_list – Whitelist of explicit unit IDs to keep.
Nonekeeps all units.
- Returns:
Mapping
unit_id -> Unitfor 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
Noneif no unit in the hangar has the requested ID.