ScenarioManager¶
todo intro text
- class algomancy_scenario.scenariomanager.ScenarioManager(etl_factory, kpis, algorithms, schemas, data_object_type, data_folder=None, logger=None, scenario_save_location='scenarios.json', has_persistent_state=False, save_type='json', autocreate=False, default_algo_name=None, default_param_values=None, autorun=False, data_manager=None, scenario_repository=None)[source]¶
Bases:
objectFacade that coordinates data management, scenario creation/registry, and processing.
- E = ~E¶
- classmethod from_config(cfg)[source]¶
Build from either a CoreConfig (or subclass like ApiConfiguration) or any wrapper exposing a .core CoreConfig (e.g. AppConfig).
- property has_persistent_state¶
- property save_type¶
- property schemas¶
- property available_algorithms¶
- property available_kpis¶
- property auto_run_scenarios¶
- create_scenario(tag, dataset_key='Master data', algo_name='', algo_params=None, data_params=None)[source]¶
- list_tags()[source]¶
Returns a list of all registered scenario tag strings for the current session, by delegating to the underlying ScenarioRegistry
- etl_data(files, dataset_name)[source]¶
Run ETL for
dataset_name; returns the underlying ETLResult.Auto-creates a scenario only on successful loads.
- debug_create_and_run_scenario(scenario_tag, dataset_key, algo_name, algo_params)[source]¶
Creates and runs a scenario for debugging purposes. The method uses a factory to create a scenario instance, registers it, enqueues it for processing, and waits for the processing to complete. Returns the fully processed scenario.
- Parameters:
scenario_tag (
str) – A unique identifier for the scenario being created and run.dataset_key (
str) – The key for the dataset to be used in the scenario.algo_name (
str) – The name of the algorithm to be applied in the scenario.algo_params (
Dict) – Additional parameters for the algorithm.
- Returns:
The fully processed scenario created and executed within this method.
- Return type:
- debug_etl_data(dataset_name)[source]¶
Debugging utility to run ETL on a directory as if loaded on startup.