mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The projection these were generated from predated the compute migration, so they described /v1/visor — which the API serves at zero paths now. No /v1/visor path survives here.
66 lines
2.3 KiB
Swift
66 lines
2.3 KiB
Swift
//
|
|
// RunSummary.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct RunSummary: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** AvgScore is the mean over the scored examples, 0 when none scored. */
|
|
public var avgScore: Double?
|
|
/** Dataset is the set that was scored. */
|
|
public var dataset: String?
|
|
/** Items is how many examples the run attempted. */
|
|
public var items: Int64?
|
|
/** JudgeModel is the model that graded. */
|
|
public var judgeModel: String?
|
|
/** Model is the model under test. */
|
|
public var model: String?
|
|
/** Results is one row per attempted example. */
|
|
public var results: [ItemResult]?
|
|
/** RunName is the run's label, which scores and traces are filed under. */
|
|
public var runName: String?
|
|
/** Scored is how many produced a real score. It counts successes only, so a partial run is honest about what it achieved. */
|
|
public var scored: Int64?
|
|
|
|
public init(avgScore: Double? = nil, dataset: String? = nil, items: Int64? = nil, judgeModel: String? = nil, model: String? = nil, results: [ItemResult]? = nil, runName: String? = nil, scored: Int64? = nil) {
|
|
self.avgScore = avgScore
|
|
self.dataset = dataset
|
|
self.items = items
|
|
self.judgeModel = judgeModel
|
|
self.model = model
|
|
self.results = results
|
|
self.runName = runName
|
|
self.scored = scored
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case avgScore
|
|
case dataset
|
|
case items
|
|
case judgeModel
|
|
case model
|
|
case results
|
|
case runName
|
|
case scored
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(avgScore, forKey: .avgScore)
|
|
try container.encodeIfPresent(dataset, forKey: .dataset)
|
|
try container.encodeIfPresent(items, forKey: .items)
|
|
try container.encodeIfPresent(judgeModel, forKey: .judgeModel)
|
|
try container.encodeIfPresent(model, forKey: .model)
|
|
try container.encodeIfPresent(results, forKey: .results)
|
|
try container.encodeIfPresent(runName, forKey: .runName)
|
|
try container.encodeIfPresent(scored, forKey: .scored)
|
|
}
|
|
}
|
|
|