pulsatrix
Loading...
Searching...
No Matches
pulsatrix::MetricsSink Class Referenceabstract

Interface the training loop logs scalars/histograms through. Concrete writers (TensorBoard event format, W&B, CSV, ...) implement this; the training loop and Phase 4 validation harness only ever see MetricsSink. More...

#include <metrics_sink.hpp>

Inheritance diagram for pulsatrix::MetricsSink:

Public Member Functions

virtual ~MetricsSink ()=default
 
virtual void log_scalar (const std::string &tag, double value, int step)=0
 Logs a scalar value (e.g. loss, accuracy).
 
virtual void log_histogram (const std::string &tag, const Tensor &values, int step)=0
 Logs a distribution of values (e.g. a weight tensor's values).
 

Detailed Description

Interface the training loop logs scalars/histograms through. Concrete writers (TensorBoard event format, W&B, CSV, ...) implement this; the training loop and Phase 4 validation harness only ever see MetricsSink.

Note
A concrete production writer is explicit charter out-of-scope for this project – NoOpMetricsSink below is the charter's stated minimum ("a no-op or stdout-printing sink is sufficient" to prove the interface is wired correctly).

Constructor & Destructor Documentation

◆ ~MetricsSink()

virtual pulsatrix::MetricsSink::~MetricsSink ( )
virtualdefault

Member Function Documentation

◆ log_histogram()

virtual void pulsatrix::MetricsSink::log_histogram ( const std::string &  tag,
const Tensor &  values,
int  step 
)
pure virtual

Logs a distribution of values (e.g. a weight tensor's values).

Parameters
tagMetric name.
valuesValues to log.
stepTraining step this snapshot corresponds to.

Implemented in pulsatrix::NoOpMetricsSink, and pulsatrix::ImPlotMetricsSink.

◆ log_scalar()

virtual void pulsatrix::MetricsSink::log_scalar ( const std::string &  tag,
double  value,
int  step 
)
pure virtual

Logs a scalar value (e.g. loss, accuracy).

Parameters
tagMetric name.
valueMetric value.
stepTraining step this value corresponds to.

Implemented in pulsatrix::NoOpMetricsSink, and pulsatrix::ImPlotMetricsSink.


The documentation for this class was generated from the following file: