Logging helpers for training loops #
This module defines a small, pluggable logging interface used by the training utilities.
The core interface is monad-polymorphic (so it can stay pure), and Logger.stdout provides a
convenient IO implementation.
Log levels and entries #
Render a LogLevel as a lower-case string (used by LogEntry.render).
Instances For
Render a LogEntry as [level] msg.
Instances For
Logger interface #
A small pluggable logger interface used by training utilities.
The interface is compact: a logger consumes a level + string and can live in any monad m
(including pure test monads). See Logger.stdout for a basic IO implementation.
Emit one message at the requested severity.
Instances For
A simple IO logger that prints to stdout.
Instances For
Trainer integration #
Attach an arbitrary logger hook to a Trainer (called once per step).
Instances For
Attach a Logger to a Trainer by logging the pretty-printed StepReport each step.
This is analogous to printing per-step metrics in an imperative training script (e.g. a PyTorch loop).