8#include <unordered_map>
38 void log_scalar(
const std::string& tag,
double value,
int step)
override;
42 [[nodiscard]]
const std::unordered_map<std::string, ScalarSeries>&
scalar_series()
const {
43 return scalar_series_;
48 [[nodiscard]]
const std::unordered_map<std::string, std::vector<float>>&
latest_histograms()
const {
49 return latest_histograms_;
57 std::unordered_map<std::string, ScalarSeries> scalar_series_;
58 std::unordered_map<std::string, std::vector<float>> latest_histograms_;
A concrete MetricsSink (metrics_sink.hpp's own doc comment names this the expected extension point: "...
Definition implot_metrics_sink.hpp:36
const std::unordered_map< std::string, ScalarSeries > & scalar_series() const
Every scalar tag's full logged series so far.
Definition implot_metrics_sink.hpp:42
void Draw() const
Renders one line chart per scalar tag (small multiples) plus the latest histogram snapshot per tag....
void log_scalar(const std::string &tag, double value, int step) override
Logs a scalar value (e.g. loss, accuracy).
const std::unordered_map< std::string, std::vector< float > > & latest_histograms() const
Every histogram tag's most recently logged snapshot (not a running history – only the latest values p...
Definition implot_metrics_sink.hpp:48
void log_histogram(const std::string &tag, const Tensor &values, int step) override
Logs a distribution of values (e.g. a weight tensor's values).
Interface the training loop logs scalars/histograms through. Concrete writers (TensorBoard event form...
Definition metrics_sink.hpp:22
N-dimensional tensor. Owns its data buffer exclusively; a DeviceBackend* is injected (not owned) – th...
Definition tensor.hpp:29
Keeps monitoring/visualization tools out of the training core – same OCP/DIP pattern as DeviceBackend...
Definition acquisition_functions.hpp:16
One scalar tag's logged (step, value) pairs, in log order.
Definition implot_metrics_sink.hpp:17
std::vector< int > steps
Definition implot_metrics_sink.hpp:18
std::vector< double > values
Definition implot_metrics_sink.hpp:19
N-dimensional tensor – owns a buffer via DeviceBackend*, RAII (Rule of Five).