Documentation
¶
Overview ¶
Package profilestore persists a model's measured capability profile as a typed resource and reads it back as a harness.ProfileSource, so a reliability measurement made once drives how hard the harness scaffolds that model on every later run. The profile is the integration point between the reliability evaluation that writes it and the dispatch waist that reads it: writing is an ordinary resource Put, so a profile is versioned, audited, and synced like any other record, and reading loads a snapshot the assembly consults with no per-call store access.
Index ¶
Constants ¶
const ( // GroupVersion is the API group/version of a model profile resource. GroupVersion = "harness.ionagent.io/v1" // Kind is the resource kind name. Kind = "ModelProfile" )
Variables ¶
This section is empty.
Functions ¶
func RegisterKind ¶
RegisterKind registers the ModelProfile kind so the resource store admits and schema-validates profiles like any other resource.
Types ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source is a harness.ProfileSource backed by profiles in the resource store. It loads a snapshot once at construction and answers every lookup from memory, so the dispatch waist consults a model's capability without touching the store on the hot path. A model never measured is simply absent, which the harness treats as unknown and scaffolds most conservatively.
func NewSource ¶
NewSource loads every stored profile and indexes it by model id. When a model has more than one profile, for instance several quantizations, the indexed profile is the element-wise minimum across them: the lookup does not know which quant will be served, so it reports the least capable, and the harness never under-scaffolds a model on the strength of a more capable build it might not be running. A store read error is returned; an empty store yields an empty source that reports every model as unknown.
type Spec ¶
type Spec struct {
ModelID string `json:"modelID"`
Quant string `json:"quant,omitempty"`
Runtime string `json:"runtime,omitempty"`
BatteryVersion string `json:"batteryVersion,omitempty"`
ToolCallReliability float64 `json:"toolCallReliability,omitempty"`
StructuredOutput float64 `json:"structuredOutput,omitempty"`
InstructionFollowing float64 `json:"instructionFollowing,omitempty"`
EffectiveContext int `json:"effectiveContext,omitempty"`
}
Spec is a measured profile for one model and, where they apply, the quantization and runtime it was measured on: a different quant is a different function, so it is recorded. The reliability fields mirror harness.ModelProfile; BatteryVersion records which probe set produced them, so a score is only compared to another taken the same way.