macro_rules! log_metric {
($($field:ident = $value:expr),+ $(,)?) => { ... };
}Expand description
Macro to log a training metric with consistent field names.
§Why This Macro
Training metrics need consistent field names for downstream processing
(TensorBoard, Weights & Biases, etc.). This macro ensures all crates
use the same schema.
§Example
ⓘ
log_metric!(
step = 1000,
loss = 2.5,
lr = 1e-4,
throughput_tokens_sec = 50000.0
);