Documentation
¶
Overview ¶
Package matrix owns a model-matrix run (itd-2610161733316518, spc-2610161949559050): one task done many times across a declared matrix of models from one frozen commit, judged the way the task allows, merged nowhere, and recorded exactly enough to be started again and its drift shown.
This first step holds the run's records and the seam a later move to another harness would replace only the scheduler behind:
- the declaration (declaration.go): the person's matrix, decoded strictly, so a key nobody reads is refused rather than ignored;
- the run record (run.go): the frozen commit, the binary's digest and version, the prompt and tool-definition hashes, the render template, the machine, the concurrency, the load cap and the spending cap, with every field the run could not pin listed as unpinned with oracle's reasons, never left out;
- the trial record (trial.go): one copy, keyed by task, cell and repeat, carrying the runners' role receipts and the routes' receipts unchanged (itd-166's asked and served sides), never a parallel shape;
- the export (export.go): the trial record mapped field by field onto a Harbor trial result and an Inspect eval sample, and back.
A run is a lab procedure (decision 4): its records live under the lab's state/matrix/ and reach it only through lab.Procedure, so a run obeys the lab's halts and never writes outside its own directory.
The package never writes to stdout: it returns results, and the front doors under internal/surface render them. Its entry points (parseDeclaration, newRunRecord, writeRun) are unexported until the front door that calls them lands (spec step 2): a core function arrives with its caller (internal/reachaudit). The exported types and their methods are the records those entry points take and return.
Index ¶
- Constants
- Variables
- func StartRun(repoRoot, labID string, declaration []byte, approve string, cores int, ...) (RunRecord, Plan, error)
- type BinaryPin
- type Cell
- type CellPin
- type ConsentInputs
- type ContentRef
- type Copies
- type Declaration
- type Estimate
- type HarborAgentConfig
- type HarborAgentContext
- type HarborAgentInfo
- type HarborExceptionInfo
- type HarborModelInfo
- type HarborTaskConfig
- type HarborTaskID
- type HarborTrialConfig
- type HarborTrialResult
- type HarborVerifierResult
- type InspectEvalError
- type InspectModelFallback
- type InspectModelOutput
- type InspectModelUsage
- type InspectSample
- type InspectScore
- type JudgeNeed
- type Judging
- type LocalPin
- type Machine
- type Money
- type Plan
- type PlanInputs
- type PlannedCell
- type ProviderPin
- type Repeats
- type ResolvedCap
- type Role
- type RunRecord
- type Score
- type Source
- type SourceCost
- type Starter
- type Task
- type TaskKind
- type TrialKey
- type TrialRecord
- type TrialStatus
Constants ¶
const ( MinPilot = 3 MaxPilot = 5 )
The pilot's bounds (decision 8): three to five runs a cell estimate the spread the repeat count is then sized from.
const ( RunPromptSHA256 oracle.Field = "run.prompt_sha256" RunToolDefinitionsSHA256 oracle.Field = "run.tool_definitions_sha256" RunRenderTemplate oracle.Field = "run.render_template" RunBinaryRevision oracle.Field = "run.binary.revision" // The machine's processor model and memory need a per-OS exec to read, // so a run lists them rather than reading them. RunMachineCPU oracle.Field = "run.machine.cpu_model" RunMachineMemory oracle.Field = "run.machine.memory" )
The run-level fields a run lists when it cannot pin them. Their reasons are oracle's; a run adds fields, never reasons.
const ( CapFromRun = "run" CapFromMachine = "machine" )
Where a run's spending cap came from (decision 17): the run's own declaration, which overrides the person's machine-wide configuration. A repository never sets a person's cap.
const CapKey = "matrix.spend_cap"
CapKey is the person's machine-wide spending cap for a matrix run with a metered cell (decision 17), read from ~/.abcd.noindex/config.json. A repository's .abcd/config.json may not set it: a committed file never sets anybody's spending.
const DeclarationSchema = 1
DeclarationSchema is the declaration's schema version.
const MaxConcurrency = 64
maxPaths bounds the paths one task names, and maxNameBytes its prose fields.
MaxConcurrency bounds the copies a run makes at once; the run's plan holds it to the machine (spec step 2).
const MaxDeclarationBytes = 256 << 10
MaxDeclarationBytes bounds a declaration, the bound the rules overlay holds its file to; a larger one is refused before it is parsed.
const MaxRepeats = 1000
MaxRepeats bounds the repeats a cell may be sized up to. The SOTA note's separations needed about 20–113 runs an arm; the bound sits well past that and refuses a typo that would plan a run no machine finishes.
const RunSchema = 1
RunSchema is the run record's schema version.
const TrialSchema = 1
TrialSchema is the trial record's schema version.
Variables ¶
var ErrNotConsented = errors.New("the run has no consent: show the person the plan, and start it only with the digest of the plan they said yes to")
ErrNotConsented is a run asked to start with no approval: nothing starts and nothing is written until the person has seen the plan and said yes to it (acceptance criterion 1).
Functions ¶
func StartRun ¶
func StartRun(repoRoot, labID string, declaration []byte, approve string, cores int, executable, version string, s Starter) (RunRecord, Plan, error)
StartRun builds the plan again and starts the run with approve as the person's consent: the digest of the plan they were shown. The record pins the binary at executable and this machine; prompt, tool-definition and material hashes not yet produced are listed as unpinned.
Types ¶
type BinaryPin ¶
type BinaryPin struct {
SHA256 string `json:"sha256"`
Version string `json:"version"`
Revision string `json:"revision"`
Known bool `json:"known"`
}
BinaryPin is the abcd binary that drives a run: its sha256, the version it reports and its build vintage. Known is false for a binary whose vintage cannot be read or that was built from a modified tree.
type Cell ¶
type Cell struct {
ID string `json:"id"`
Route string `json:"route"`
Settings oracle.Settings `json:"settings,omitempty"`
CostPerCopy *Money `json:"cost_per_copy,omitempty"`
MinutesPerCopy *float64 `json:"minutes_per_copy,omitempty"`
}
Cell is one model route the matrix compares. Route is the per-invocation route override's text for the cell's role (decision 14): `<role>=runner:<name>[@<provider>/<model>]`, or `host`. Its grammar is parsed where the run starts (spec step 2), against the runner rung iss-2610161801358637 adds; here it is bounded text. Settings are the vendor's recommended sampling settings, pinned for the cell (decision 5).
CostPerCopy is the person's own expected cost of one copy on a metered cell (decision 36): the plan reckons the expected cost from it, and never fetches a price before consent (decision 12). MinutesPerCopy is the person's own estimate of one copy's time (decision 35): with one on every cell the plan shows a bound before the pilot; otherwise the time is known after it.
type CellPin ¶
type CellPin struct {
Cell string `json:"cell"`
Role Role `json:"role"`
Source Source `json:"source"`
Route string `json:"route"`
Runner string `json:"runner"`
Model string `json:"model"`
Settings oracle.Settings `json:"settings"`
// HarnessDefault names each sampling setting the cell cannot set, which
// the harness's own default decides (decision 5), at HarnessVersion.
HarnessDefault []string `json:"harness_default"`
HarnessVersion string `json:"harness_version"`
ProviderPin *ProviderPin `json:"provider_pin"`
LocalPin *LocalPin `json:"local_pin"`
}
CellPin is one cell as the run pinned it: the declared cell's route and settings, the source and runner it resolved to, the model, and the pin its source allows.
type ConsentInputs ¶
type ConsentInputs struct {
RunID string
RootSHA string
Binary BinaryPin
Declaration []byte
PromptSHA256 map[string]string
ToolDefinitionsSHA256 map[string]string
RenderTemplate *ContentRef
HiddenTests []ContentRef
SeededMaterial []ContentRef
Machine Machine
}
ConsentInputs is what a consented run's record is written from, beside the plan: the run's id, the repository's root commit, the work binary, the declaration's bytes and the hashes and machine the record names.
type ContentRef ¶
type ContentRef struct {
Name string `json:"name"`
SHA256 string `json:"sha256"`
Bytes int64 `json:"bytes"`
}
ContentRef is an artefact a run keeps by content (decision 4: the hidden tests, the seeded material and the render template), named and hashed.
type Copies ¶
type Copies struct {
PilotTotal int `json:"pilot_total"`
MaxTotal int `json:"max_total"`
MaxByCell map[string]int `json:"max_by_cell"`
}
Copies is how many copies the run makes: every cell does every task, the pilot's repeats first, and the run is sized up to at most Max repeats (decision 8). The person consents to the most.
type Declaration ¶
type Declaration struct {
SchemaVersion int `json:"schema_version"`
Name string `json:"name"`
Tasks []Task `json:"tasks"`
Builders []Cell `json:"builders"`
Reviewers []Cell `json:"reviewers,omitempty"`
// Repeats is the pilot and the most each cell may be sized up to; the
// person consents to the most (spec step 2).
Repeats Repeats `json:"repeats"`
// SpendCap is the run's own spending cap, nil when the declaration names
// none; a run with a metered cell needs one from here or the person's own
// configuration (decision 17), never a default abcd supplies.
SpendCap *Money `json:"spend_cap,omitempty"`
// LoadCap is the cores the run's local cells may load (decision 12). A
// declaration may leave it out; the run record asks for it when a cell
// runs locally.
LoadCap *int `json:"load_cap,omitempty"`
Concurrency int `json:"concurrency"`
Judging Judging `json:"judging"`
}
Declaration is the person's matrix.
type Estimate ¶
type Estimate struct {
BoundMinutes *float64 `json:"bound_minutes,omitempty"`
Note string `json:"note"`
}
Estimate is the run's time: a bound when every cell declares its minutes per copy, otherwise known after the pilot (decision 35).
type HarborAgentConfig ¶
type HarborAgentConfig struct {
ModelName string `json:"model_name,omitempty"`
}
HarborAgentConfig is a trial config's agent: the model asked for.
type HarborAgentContext ¶
type HarborAgentContext struct {
NInputTokens int `json:"n_input_tokens"`
NCacheTokens int `json:"n_cache_tokens"`
NOutputTokens int `json:"n_output_tokens"`
CostUSD *float64 `json:"cost_usd,omitempty"`
Metadata map[string]json.RawMessage `json:"metadata,omitempty"`
}
HarborAgentContext is Harbor's AgentContext: the token counts, the cost and the free-form metadata abcd's own fields ride in.
type HarborAgentInfo ¶
type HarborAgentInfo struct {
Name string `json:"name"`
Version string `json:"version"`
ModelInfo *HarborModelInfo `json:"model_info,omitempty"`
}
HarborAgentInfo is Harbor's AgentInfo.
type HarborExceptionInfo ¶
type HarborExceptionInfo struct {
ExceptionType string `json:"exception_type"`
ExceptionMessage string `json:"exception_message"`
ExceptionTraceback string `json:"exception_traceback"`
OccurredAt time.Time `json:"occurred_at"`
}
HarborExceptionInfo is Harbor's ExceptionInfo.
type HarborModelInfo ¶
type HarborModelInfo struct {
Name string `json:"name"`
Provider string `json:"provider,omitempty"`
}
HarborModelInfo is an agent's model.
type HarborTaskConfig ¶
type HarborTaskConfig struct {
Path string `json:"path"`
}
HarborTaskConfig is a trial config's task.
type HarborTaskID ¶
type HarborTaskID struct {
Path string `json:"path"`
}
HarborTaskID is Harbor's LocalTaskId.
type HarborTrialConfig ¶
type HarborTrialConfig struct {
Task HarborTaskConfig `json:"task"`
Agent *HarborAgentConfig `json:"agent,omitempty"`
}
HarborTrialConfig is Harbor's TrialConfig, the members abcd writes.
type HarborTrialResult ¶
type HarborTrialResult struct {
TaskName string `json:"task_name"`
TrialName string `json:"trial_name"`
TrialURI string `json:"trial_uri"`
TaskID HarborTaskID `json:"task_id"`
TaskChecksum string `json:"task_checksum"`
Config HarborTrialConfig `json:"config"`
AgentInfo HarborAgentInfo `json:"agent_info"`
AgentResult *HarborAgentContext `json:"agent_result,omitempty"`
VerifierResult *HarborVerifierResult `json:"verifier_result,omitempty"`
ExceptionInfo *HarborExceptionInfo `json:"exception_info,omitempty"`
StartedAt *time.Time `json:"started_at,omitempty"`
FinishedAt *time.Time `json:"finished_at,omitempty"`
}
HarborTrialResult is Harbor's TrialResult, the members abcd writes.
func (HarborTrialResult) Trial ¶
func (h HarborTrialResult) Trial() (TrialRecord, error)
Trial reads a trial record back from a Harbor trial result abcd wrote.
type HarborVerifierResult ¶
HarborVerifierResult is Harbor's VerifierResult.
type InspectEvalError ¶
type InspectEvalError struct {
Message string `json:"message"`
Traceback string `json:"traceback"`
TracebackANSI string `json:"traceback_ansi"`
}
InspectEvalError is Inspect's EvalError.
type InspectModelFallback ¶
type InspectModelFallback struct {
Model string `json:"model"`
FallbackModel string `json:"fallback_model"`
Count int `json:"count"`
}
InspectModelFallback is Inspect's ModelFallback: the model requested and the one that served instead.
type InspectModelOutput ¶
type InspectModelOutput struct {
Model string `json:"model"`
Completion string `json:"completion"`
}
InspectModelOutput is Inspect's ModelOutput, the members abcd writes: the model that generated, and no completion text (a trial records hashes, never a model's text).
type InspectModelUsage ¶
type InspectModelUsage struct {
InputTokens int `json:"input_tokens"`
OutputTokens int `json:"output_tokens"`
TotalTokens int `json:"total_tokens"`
InputTokensCacheWrite int `json:"input_tokens_cache_write"`
InputTokensCacheRead int `json:"input_tokens_cache_read"`
ReasoningTokens int `json:"reasoning_tokens"`
TotalCost *float64 `json:"total_cost,omitempty"`
}
InspectModelUsage is Inspect's ModelUsage. InputTokens excludes the cached prompt tokens, which are counted apart.
type InspectSample ¶
type InspectSample struct {
// ID is the sample's id, a string or an integer upstream; abcd writes the
// task's id.
ID json.RawMessage `json:"id"`
Epoch int `json:"epoch"`
Input string `json:"input"`
Target string `json:"target"`
Output *InspectModelOutput `json:"output,omitempty"`
Scores map[string]InspectScore `json:"scores,omitempty"`
Metadata map[string]json.RawMessage `json:"metadata,omitempty"`
ModelUsage map[string]InspectModelUsage `json:"model_usage,omitempty"`
ModelFallbacks []InspectModelFallback `json:"model_fallbacks,omitempty"`
StartedAt *time.Time `json:"started_at,omitempty"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
TotalTime *float64 `json:"total_time,omitempty"`
WorkingTime *float64 `json:"working_time,omitempty"`
Error *InspectEvalError `json:"error,omitempty"`
}
InspectSample is Inspect's EvalSample, the members abcd writes.
func (InspectSample) Trial ¶
func (s InspectSample) Trial() (TrialRecord, error)
Trial reads a trial record back from an Inspect eval sample abcd wrote.
type InspectScore ¶
type InspectScore struct {
Value json.RawMessage `json:"value"`
}
InspectScore is Inspect's Score; its value is any JSON value upstream.
type JudgeNeed ¶
type JudgeNeed struct {
Task string `json:"task"`
Kind TaskKind `json:"kind"`
Who string `json:"who"`
Count int `json:"count"`
Note string `json:"note,omitempty"`
}
JudgeNeed is who judges one task and how many of them it needs (decisions 21, 22, 26): a code task is judged by its hidden tests and the reviewer models; a writing task by people, each ranking at most eight copies so that every pair of models meets; a check by the person and one outside judge.
type Judging ¶
type Judging struct {
GuestsMayJudge bool `json:"guests_may_judge"`
}
Judging is the run's judging-session settings (decision 24): whether guests admitted by code may judge, their verdicts reported apart.
type LocalPin ¶
type LocalPin struct {
Runtime string `json:"runtime"`
RuntimeVersion string `json:"runtime_version"`
WeightsSHA256 string `json:"weights_sha256"`
WeightsFile string `json:"weights_file,omitempty"`
Quantisation string `json:"quantisation"`
ContextLength int `json:"context_length"`
KVCacheType string `json:"kv_cache_type"`
}
LocalPin is a local cell's pin, down to its weight file (scope condition 3).
Typed here until abcd-f1's oracle.LocalPin (feat/local-model-pin-r2) reaches the default branch; its fields and tags are that type's, so the reconciliation replaces this declaration with an alias.
type Machine ¶
type Machine struct {
OS string `json:"os"`
Arch string `json:"arch"`
Cores int `json:"cores"`
// CoresFallback is true when the online core count could not be read and
// Cores is the runtime's count instead.
CoresFallback bool `json:"cores_fallback"`
}
Machine is the machine a run ran on, named by what bears on the run and never by who or where: no host name, no user, no path.
type Money ¶
Money is an amount in a unit. The only unit is usd: a cap is the person's own figure, and a cost reported in another unit (OpenRouter's credits) is set against it only once their exchange is established (spec step 2).
type Plan ¶
type Plan struct {
Lab string `json:"lab"`
FrozenCommit string `json:"frozen_commit"`
Declaration ContentRef `json:"declaration"`
Cells []PlannedCell `json:"cells"`
Copies Copies `json:"copies"`
Cost []SourceCost `json:"cost"`
SpendCap *Money `json:"spend_cap"`
SpendCapOrigin string `json:"spend_cap_origin"`
// LoadCap is the cores the local cells may load, nil with no local cell;
// Cores is this machine's count it is held below (decision 12).
LoadCap *int `json:"load_cap"`
Cores int `json:"cores"`
Concurrency int `json:"concurrency"`
Time Estimate `json:"time"`
Judges []JudgeNeed `json:"judges"`
// Digest is the sha256 of the plan with Digest left blank: consent names
// it, so a plan that changed after it was shown is never started.
Digest string `json:"digest"`
}
Plan is what the person consents to.
func PlanForLab ¶
PlanForLab builds the plan for a run of the declaration in the lab labID of the repository at repoRoot, on a machine of cores cores: the lab's pin is the frozen commit, the provider blocks and the spending cap are read from the layered configuration, and each cell's route is checked against a freshly loaded runner configuration, so building the plan changes none. The notes are the configuration reader's, for the front door to print.
type PlanInputs ¶
type PlanInputs struct {
Lab string
FrozenCommit string
Declaration []byte
API *oracle.APIConfig
CheckRoute func(oracle.FlagRoute) error
Cap ResolvedCap
Cores int
}
PlanInputs is what a plan is built from. CheckRoute is the runner configuration's own check of one cell's route (an enabled runner, a model its provider lists, no claude for a pinned model), the front door's to supply, so building the plan changes no configuration.
type PlannedCell ¶
type PlannedCell struct {
Cell string `json:"cell"`
Role Role `json:"role"`
Route string `json:"route"`
Source Source `json:"source"`
Runner string `json:"runner"`
Model string `json:"model"`
// Provider is the oracle provider block the model is asked of, "" for a
// host cell.
Provider string `json:"provider,omitempty"`
// ProviderPin is an OpenRouter cell's pin and LocalPin a local cell's,
// read from this machine's configuration, so the plan the person sees
// names exactly what each copy is held to (decision 6).
ProviderPin *ProviderPin `json:"provider_pin,omitempty"`
LocalPin *LocalPin `json:"local_pin,omitempty"`
}
PlannedCell is one cell as the plan resolved it: its role, the source its route reaches (decision 2), and the runner and model it asks for.
type ProviderPin ¶
type ProviderPin struct {
Order []string `json:"order"`
AllowFallbacks bool `json:"allow_fallbacks"`
RequireParameters bool `json:"require_parameters"`
DataCollection string `json:"data_collection"`
Quantizations []string `json:"quantizations"`
CanonicalSlug string `json:"canonical_slug"`
}
ProviderPin is an OpenRouter cell's provider pin (decision 6: fallbacks off, so an outage is retried on the same pin).
Typed here until abcd-f1's oracle.Pin (feat/local-model-pin-r2) reaches the default branch; its fields and tags are that type's, so the reconciliation replaces this declaration with an alias and changes no record.
type ResolvedCap ¶
ResolvedCap is the cap a run spends under and where it came from: the run's own declaration, which overrides the person's machine-wide figure, or that figure. Both empty means no cap is named anywhere; abcd never supplies one.
type RunRecord ¶
type RunRecord struct {
SchemaVersion int `json:"schema_version"`
RunID string `json:"run_id"`
Lab string `json:"lab"`
RootSHA string `json:"root_sha"`
// FrozenCommit is the commit every copy starts from: the lab's pin.
FrozenCommit string `json:"frozen_commit"`
Binary BinaryPin `json:"binary"`
Declaration ContentRef `json:"declaration"`
// PromptSHA256 is each role's prompt hash, and ToolDefinitionsSHA256
// each runner's tool definitions' hash (prompts are pinned by hash until
// itd-14 versions them).
PromptSHA256 map[string]string `json:"prompt_sha256"`
ToolDefinitionsSHA256 map[string]string `json:"tool_definitions_sha256"`
RenderTemplate *ContentRef `json:"render_template"`
HiddenTests []ContentRef `json:"hidden_tests"`
SeededMaterial []ContentRef `json:"seeded_material"`
Machine Machine `json:"machine"`
Concurrency int `json:"concurrency"`
// LoadCap is the cores the run's local cells may load (decision 12), nil
// when the run has no local cell and the declaration names none.
LoadCap *int `json:"load_cap"`
SpendCap *Money `json:"spend_cap"`
SpendCapOrigin string `json:"spend_cap_origin"`
Cells []CellPin `json:"cells"`
Unpinned []oracle.Unpinned `json:"unpinned"`
}
RunRecord is a run's record.
type Score ¶
type Score struct {
Passed int `json:"passed"`
Total int `json:"total"`
Detail string `json:"detail,omitempty"`
}
Score is a copy's judged result: for a code copy, the hidden tests it passed of those run.
type Source ¶
type Source string
Source is where a cell's model comes from (decision 2). Model and harness travel together by source (scope condition 4): host models in the host's harness, every other model in a command-line runner.
type SourceCost ¶
type SourceCost struct {
Source Source `json:"source"`
Metered bool `json:"metered"`
Expected *Money `json:"expected,omitempty"`
Note string `json:"note,omitempty"`
}
SourceCost is the expected cost of the cells from one source at the most copies the run may make. Expected is nil when the source is not metered, or when a metered cell declared no cost per copy; Note then says so.
type Starter ¶
Starter starts a consented run. It is the seam the run's trial mode fills (spec step 3); consent calls it once, after the run's record is written.
type Task ¶
type Task struct {
ID string `json:"id"`
Kind TaskKind `json:"kind"`
Intent string `json:"intent,omitempty"`
Source []string `json:"source,omitempty"`
Criteria string `json:"criteria,omitempty"`
Material []string `json:"material,omitempty"`
}
Task is one task the matrix does. Which fields apply follows its kind: a code task names its intent; a writing task its source material and the judges' criteria; a check the material it checks (scope condition 2).
type TaskKind ¶
type TaskKind string
TaskKind is how a task is done and judged (decision 18).
const ( // KindCode is a code feature: built through the runners, judged by // hidden tests and reviewer models. KindCode TaskKind = "code" // KindWriting is a written doc: judged by people, blind. KindWriting TaskKind = "writing" // KindCheck is a check such as doc fidelity: its copies' findings // compared side by side. KindCheck TaskKind = "check" )
type TrialKey ¶
type TrialKey struct {
Task string `json:"task"`
Cell string `json:"cell"`
Repeat int `json:"repeat"`
}
TrialKey is what a copy is a copy of: the task (for a code task, the task that builds its intent), the cell and the repeat, counted from one.
type TrialRecord ¶
type TrialRecord struct {
SchemaVersion int `json:"schema_version"`
Run string `json:"run"`
Key TrialKey `json:"key"`
Kind TaskKind `json:"kind"`
// Intent is a code task's intent; empty for any other kind.
Intent string `json:"intent,omitempty"`
FrozenCommit string `json:"frozen_commit"`
// The cell as it ran: its source, the runner (or host) whose harness made
// the copy and that harness's version, the model asked for and the one
// that served, the provider that served it, and the settings sent.
Source Source `json:"source"`
Runner string `json:"runner"`
HarnessVersion string `json:"harness_version"`
ModelAsked string `json:"model_asked"`
ModelServed string `json:"model_served"`
ServedProvider string `json:"served_provider"`
Settings oracle.Settings `json:"settings"`
Status TrialStatus `json:"status"`
// Reason is abcd's own account of the status: one line of plain text of
// at most maxReasonBytes.
Reason string `json:"reason"`
Score *Score `json:"score"`
// The receipts of every role the copy ran and every routed call, both
// sides each (itd-166), and every fallback (which excludes the copy).
Roles []runner.RoleReceipt `json:"roles"`
Calls []oracle.ReceiptRoute `json:"calls"`
Fallbacks []runner.FallbackReceipt `json:"fallbacks"`
// Usage and Cost are the copy's totals; a count or cost not reported is
// listed in Unpinned.
Usage oracle.Usage `json:"usage"`
Cost *oracle.Cost `json:"cost"`
StartedAt time.Time `json:"started_at,omitzero"`
FinishedAt time.Time `json:"finished_at,omitzero"`
// ModelTimeMS is the time the models spent, excluding GateWaitMS, the
// time spent waiting on gates (the code report's criterion).
ModelTimeMS int64 `json:"model_time_ms"`
GateWaitMS int64 `json:"gate_wait_ms"`
Unpinned []oracle.Unpinned `json:"unpinned"`
}
TrialRecord is one copy's record.
func (TrialRecord) Apart ¶
func (t TrialRecord) Apart() bool
Apart reports whether the copy is reported apart from the cell's ranking, neither a pass nor a failure: one the compliance check excluded, or one it could not examine.
func (TrialRecord) Attempted ¶
func (t TrialRecord) Attempted() bool
Attempted reports whether the copy counts as an attempt of its cell: every copy but one that never started.
func (TrialRecord) Failed ¶
func (t TrialRecord) Failed() bool
Failed reports whether the copy counts as its cell's failure: a failed attempt, or one excluded for carrying a fallback receipt (a fallback is never the model's pass). A copy the compliance check excluded is not a failure.
func (TrialRecord) Harbor ¶
func (t TrialRecord) Harbor() (HarborTrialResult, error)
Harbor maps the trial onto a Harbor trial result. It refuses a trial that does not validate or a value that does not encode.
func (TrialRecord) Inspect ¶
func (t TrialRecord) Inspect() (InspectSample, error)
Inspect maps the trial onto an Inspect eval sample. It refuses a trial that does not validate or a value that does not encode.
func (TrialRecord) Passed ¶
func (t TrialRecord) Passed() bool
Passed reports whether the copy counts as its cell's pass.
type TrialStatus ¶
type TrialStatus string
TrialStatus is how a copy came out.
const ( // StatusPassed: the copy passed its judging (a code copy, its hidden // tests). StatusPassed TrialStatus = "passed" // StatusFailed: the copy was attempted and did not pass, including a // runner that failed, refused or answered unparsably inside its cell. StatusFailed TrialStatus = "failed" // StatusNotStarted: the copy never started (a provider down before it // began, decision 6); retried on the same pin and never scored. StatusNotStarted TrialStatus = "not_started" // StatusExcluded: the copy broke a rule and is named. One that carries a // fallback receipt counts as its cell's failure, never the model's pass // (the acceptance criterion on fallback copies); one the compliance check // excluded broke a rule of the run rather than failing the task, so it is // counted apart, neither a pass nor a failure (rule-breaking runs are // rejected before ranking; dcn-2610230216139961). StatusExcluded TrialStatus = "excluded" // StatusUnexamined: the compliance check could not examine the copy; // reported apart, never ranked as compliant. StatusUnexamined TrialStatus = "unexamined" )