MaxFailureRateMetric

@Serializable
@SerialName(value = "maxFailureRate")
data class MaxFailureRateMetric(val key: MetricKey<MaxFailureRateMetric> = KEY, val maxFailureRate: Double? = null) : Metric

Tracks the maximum failure rate across substages.

Only recalculates when isStageUpdate is true, to avoid alarming intermediate values (e.g. 100% after only one item processed).

Constructors

Link copied to clipboard
constructor(key: MetricKey<MaxFailureRateMetric> = KEY, maxFailureRate: Double? = null)

Types

Link copied to clipboard
object Companion

Key holder for MaxFailureRateMetric.

Properties

Link copied to clipboard
@Transient
open override val key: MetricKey<MaxFailureRateMetric>

The key that identifies this metric in a ai.koog.agents.optimization.training.metrics.MetricsMap.

Link copied to clipboard
val maxFailureRate: Double? = null

Highest failed-substage ratio observed across finished direct children, or null if none.

Functions

Link copied to clipboard
open override fun recompute(currentStage: StageRecord, substages: List<TrainingRecord>, isStageUpdate: Boolean): MaxFailureRateMetric

Recompute this metric from the full list of substages records.