Contents

EvaluatorError

A value that describes why an evaluator failed while scoring a produced subject.

Declaration

enum EvaluatorError

Overview

The evaluation runner records these values in the "EvaluatorErrors" column of detailed as an array. Multiple evaluators can fail for the same sample. The evaluation runner omits this column entirely when no evaluator fails, so check for the column’s presence before reading it.

let result = try await evaluation.run()
if result.detailed.containsColumn("EvaluatorErrors") {
    let column = result.detailed["EvaluatorErrors", [EvaluatorError].self]
    for (index, failures) in column.enumerated() {
        if let failures {
            for failure in failures {
                print("Sample \(index): \(failure.localizedDescription)")
            }
        }
    }
}

Rows with an EvaluatorErrors value always have a non-nil Response. Evaluators only run after subject production succeeds. Distinct from SubjectInferenceError, which covers failures that occur before subject production.

Topics

Enumeration Cases

See Also

Errors