DatasetSolvedRateMetric

@Serializable
@SerialName(value = "datasetSolvedRate")
data class DatasetSolvedRateMetric(val key: MetricKey<DatasetSolvedRateMetric> = KEY, val itemsFinished: Int = 0, val itemsSolved: Int = 0, val itemsNotSolved: Int = 0, val itemsFailed: Int = 0, val solvedRatio: Ratio = Ratio.ZERO, val notSolvedRatio: Ratio = Ratio.ZERO, val failedRatio: Ratio = Ratio.ZERO) : Metric

Dataset-specific metric: tracks solved / not-solved / failed dataset items.

Only attached to stages created by iterateDataset. Each direct substage represents one dataset item. A dataset item is "solved" if ANY of its agent runs completed with solved == true.

Entirely inside the ai.koog.agents.optimization.training.metrics.MetricsMap — never leaks as a top-level field.

Constructors

Link copied to clipboard
constructor(key: MetricKey<DatasetSolvedRateMetric> = KEY, itemsFinished: Int = 0, itemsSolved: Int = 0, itemsNotSolved: Int = 0, itemsFailed: Int = 0, solvedRatio: Ratio = Ratio.ZERO, notSolvedRatio: Ratio = Ratio.ZERO, failedRatio: Ratio = Ratio.ZERO)

Types

Link copied to clipboard
object Companion

Key holder for DatasetSolvedRateMetric.

Properties

Link copied to clipboard
Link copied to clipboard
val itemsFailed: Int = 0

Finished items that ended in failure.

Link copied to clipboard

Number of dataset items that have finished (the denominator for the ratios).

Link copied to clipboard

Finished items that completed without being solved.

Link copied to clipboard
val itemsSolved: Int = 0

Finished items that had at least one solved agent run and did not fail.

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

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

Link copied to clipboard
Link copied to clipboard

Functions

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

Recompute this metric from the full list of substages records.