Metric
interface Metric
A metric that can be computed from substage records.
Each concrete metric is a @Serializable data class. The core invariant is that metrics calculate only from substage records — no incremental updates are passed.
Every metric carries its own key so that ai.koog.agents.optimization.training.metrics.MetricsMap can iterate and recompute all metrics without external key sets.
Inheritors
Types
Properties
Link copied to clipboard
The key that identifies this metric in a ai.koog.agents.optimization.training.metrics.MetricsMap.
Functions
Link copied to clipboard
abstract fun recompute(currentStage: StageRecord, substages: List<TrainingRecord>, isStageUpdate: Boolean): Metric
Recompute this metric from the full list of substages records.