ComponentSplitCallback#
- class openstef_models.workflows.custom_component_split_workflow.ComponentSplitCallback[source]
Bases:
PredictorCallback[CustomComponentSplitWorkflow,TimeSeriesDataset,None,EnergyComponentDataset]Base callback interface for monitoring component splitting workflow lifecycle events.
Provides hooks at key stages of the component splitting process to enable custom functionality such as logging, metrics collection, model validation, data preprocessing, and integration with monitoring systems.
All methods have default no-op implementations, so subclasses only need to override the specific events they care about.
Example
Creating a logging callback
>>> class LoggingCallback(ComponentSplitCallback): ... def on_fit_start(self, pipeline, dataset): ... print(f"Starting training with {len(dataset.data)} samples") ... ... def on_predict_end(self, pipeline, dataset, forecasts): ... print(f"Generated {len(forecasts.data)} forecasts") >>> >>> callback = LoggingCallback() >>> workflow = ComponentSplitWorkflow(model, callbacks=callback)