Graphorin API reference v0.12.1
Graphorin API reference / @graphorin/evals / / RunOptions
Interface: RunOptions<I, O>
Defined in: packages/evals/src/types.ts:40
Options accepted by the parallel runner.
Stable
Type Parameters
| Type Parameter |
|---|
I |
O |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
agent? | readonly | AgentLike<I, O> | Single agent shared by every worker. Safe only when the object tolerates overlapping run() calls (stubs, stateless wrappers) or concurrency is 1: a Graphorin Agent instance allows one run in flight and throws ConcurrentRunError on overlap, which the runner surfaces as an EvalConcurrencyError instead of recording per-case scorer failures (E-19). For a framework agent at concurrency > 1, pass agentFactory instead. | packages/evals/src/types.ts:50 |
agentFactory? | readonly | (workerIndex) => | AgentLike<I, O> | Promise<AgentLike<I, O>> | Per-worker agent constructor - invoked once per worker (at most min(concurrency, total cases) times, with the worker index) before that worker takes its first case, so every worker drives its own instance. This is the supported way to run a Graphorin Agent at concurrency > 1 (one run in flight per instance). Takes precedence over agent when both are set; at least one of the two is required. | packages/evals/src/types.ts:60 |
concurrency? | readonly | number | Default 1 (sequential). Set higher for parallel evaluation. | packages/evals/src/types.ts:73 |
dataset | readonly | { cases: readonly { expected?: O; id?: string; input: I; metadata?: Readonly<Record<string, unknown>>; }[]; } | - | packages/evals/src/types.ts:61 |
dataset.cases | readonly | readonly { expected?: O; id?: string; input: I; metadata?: Readonly<Record<string, unknown>>; }[] | - | packages/evals/src/types.ts:62 |
iterations? | readonly | number | Default 1. | packages/evals/src/types.ts:71 |
onProgress? | readonly | (event) => void | Optional progress hook invoked after every case. Useful for terminal reporters that want a per-case heartbeat. | packages/evals/src/types.ts:86 |
scorers | readonly | readonly Scorer<I, O>[] | - | packages/evals/src/types.ts:69 |
signal? | readonly | AbortSignal | - | packages/evals/src/types.ts:74 |
throwOnAbort? | readonly | boolean | How to handle signal abort. Default (false): stop dispatching and resolve with a partial EvalReport (aborted: true) covering the cases that finished - a long judged run shouldn't lose all completed work to a Ctrl+C. Set true to throw the abort reason instead. | packages/evals/src/types.ts:81 |