recompute

open override fun recompute(currentStage: StageRecord, substages: List<TrainingRecord>, isStageUpdate: Boolean): ConsumptionMetric

Recompute this metric from the full list of substages records.

Return

A new metric instance with updated values.

Parameters

currentStage

The stage record that owns this metric.

substages

All substages of the stage that owns this metric.

isStageUpdate

true when a stage-level event occurred (substage started or finished). false when a leaf event occurred (agent run or prompt execution completed). Metrics that should only update on significant progress (e.g. MinSolvedRateMetric) can skip recalculation when this is false.