src.toolbox.pipeline#
Pipeline class definition to handle configuration and step execution.
Classes#
Pipeline that manages a sequence of processing steps. |
Module Contents#
- class src.toolbox.pipeline.Pipeline(config_path=None)[source]#
Bases:
toolbox.utils.config_mirror.ConfigMirrorMixinPipeline that manages a sequence of processing steps.
- Config-aware pipeline that can:
Load config YAML into private self._parameters
Keep global_parameters mirrored to _parameters[‘pipeline’]
Build, run, and export steps as before
- Parameters:
ConfigMirrorMixin (Class) – Class to handle configuration
- build_steps(steps_config)[source]#
Build steps from configuration.
Individual steps, including parameters and diagnostics, are saved to self.steps using add_step() for other functions.
- add_step(step_name, parameters=None, diagnostics=False, run_immediately=False)[source]#
Dynamically adds a step and optionally runs it immediately.
- Parameters:
- Raises:
ValueError – If the step name is not recognized.
- run()[source]#
Runs the entire pipeline.
If visualisation is specified in the configuration parameters, a visualisation of the pipeline execution will be generated.
- generate_config()[source]#
Generate a configuration dictionary from the current pipeline setup.
- Returns:
Configuration dictionary of the current pipeline.
- Return type:
- export_config(output_path='generated_pipeline.yaml')[source]#
Write current config to file (respects private _parameters)