ogd.core.registries package
Submodules
ogd.core.registries.DetectorRegistry module
- class ogd.core.registries.DetectorRegistry.DetectorRegistry(mode: ExtractionMode, trigger_callback: Callable[[Event], None])[source]
Bases:
GeneratorRegistryClass for registering features to listen for events.
- Returns:
[description]
- Return type:
[type]
- to_string(num_lines: int | None = None) str[source]
Alternate string conversion for Extractors, with limitable number of lines.
Creates a list of features in the extractor, separated by newlines. Optional num_lines param allows the function caller to limit number of lines in the string. :param num_lines: Max number of lines to include in the string. If None, then include all strings, defaults to None :type num_lines: Optional[int], optional :return: A string with line-separated stringified features. :rtype: str
ogd.core.registries.ExtractorRegistry module
- class ogd.core.registries.ExtractorRegistry.ExtractorRegistry(mode: ExtractionMode, order: int = 2)[source]
Bases:
GeneratorRegistryClass for registering features to listen for events.
- Returns:
[description]
- Return type:
[type]
- class FeatureOrders(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
IntEnum
- GetFeatureData(order: int, player_id: str | None = None, sess_id: str | None = None) List[FeatureData][source]
- OrderCount() int[source]
Gets the number of “orders” of features stored in the ExtractorRegistry. For now, there’s just two of them.
- Returns:
_description_
- Return type:
int
- to_string(num_lines: int | None = None) str[source]
Alternate string conversion for Extractors, with limitable number of lines.
Creates a list of features in the extractor, separated by newlines. Optional num_lines param allows the function caller to limit number of lines in the string. :param num_lines: Max number of lines to include in the string. If None, then include all strings, defaults to None :type num_lines: Optional[int], optional :return: A string with line-separated stringified features. :rtype: str
ogd.core.registries.GeneratorRegistry module
- class ogd.core.registries.GeneratorRegistry.GeneratorRegistry(mode: ExtractionMode)[source]
Bases:
ABCClass for registering features to listen for events.
- Returns:
[description]
- Return type:
[type]
- GetGeneratorNames() List[str][source]
Function to generate a list names of all enabled features, given a GameSchema This is different from the FeatureNames property of GameSchema, which ignores the ‘enabled’ attribute and does not expand per-count features (e.g. this function would include ‘lvl0_someFeat’, ‘lvl1_someFeat’, ‘lvl2_someFeat’, etc. while FeatureNames only would include ‘someFeat’).
- Parameters:
schema (GameSchema) – The schema from which feature names should be generated.
- Returns:
A list of feature names.
- Return type:
List[str]
- LoadFromSchema(schema: GameSchema, loader: GeneratorLoader, overrides: List[str] | None)[source]