Driver

ContinuousMonitor orchestrates the monitoring loop: evaluate batches, check drift at intervals, dispatch continual learning on drift.

Continuous drift monitoring system.

This module implements a continuous monitoring architecture that: - Maintains detector state across data stream updates - Processes batches continuously until drift is detected - Pauses for learning when drift is detected - Resumes monitoring with updated model weights - Automatically extends the data stream when exhausted

class apeiron.driver.continuous_monitor.ContinuousMonitor[source]

Bases: object

Continuous drift monitoring system.

This class manages the continuous monitoring of a data stream, detecting drift and dispatching learning modules as needed.

cfg

Configuration object

modelHarness

Model harness containing model and data loaders

logger

Logger for metrics

detector

Persistent drift detector instance

metric_idx

Index of metric to monitor

detection_interval

Number of batches between drift checks

max_stream_updates

Maximum number of stream extensions

stream_update_count

Number of times stream has been extended

batch_count

Total number of batches processed

metric_buffer

Buffer for accumulating metrics between checks

__init__(cfg, modelHarness)[source]

Initialize continuous monitor.

Parameters:
  • cfg (Config) – Configuration object

  • modelHarness (BaseModelHarness) – Model harness containing model and data loaders

  • logger – Logger for metrics

run()[source]

Main continuous monitoring loop.

This loop continues until max_stream_updates is reached. It processes batches from the data stream, checks for drift at regular intervals, and dispatches learning modules when drift is detected.

Return type:

None