Skip to main content

StreamingMonitor

observations.StreamingMonitor()

Optional base for monitors that run inside solver blocks.

A streaming monitor is any object with a callable prepare(grid, sample, variable_names) method returning a PreparedObservation. Inheriting this class is optional: it declares the method and supplies __call__, which applies the same recipe to a stored solution. isinstance(m, StreamingMonitor) is structural and holds for every object whose class defines a callable prepare.

Methods

Name Description
prepare Return the block execution recipe for this monitor on grid.

prepare

observations.StreamingMonitor.prepare(grid, sample, variable_names)

Return the block execution recipe for this monitor on grid.