#[non_exhaustive]pub struct RunMeta {
pub temperature: f32,
pub backend: String,
pub system_prompt: String,
pub persist: Option<Persist>,
}Expand description
Run-level metadata recorded on the EvalReport but NOT intrinsic to the generic runner.
EvalReport carries a few fields that are meaningful for LLM/agent runs (the sampling
temperature, a backend label, the shared system_prompt) but have no generic meaning here. Rather
than hardcode LLM assumptions into run_eval, the host supplies them via this struct; the report’s
serialized shape (and therefore the HTML report + saved JSON) is unchanged. A host with no notion of
these can use RunMeta::default (temperature 0.0, empty backend/system_prompt).
#[non_exhaustive]: new run-level metadata can be added without a breaking change. Build it with
RunMeta::new(temperature, backend, system_prompt).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.temperature: f32Sampling temperature the run used, recorded in the report summary. Neutral default 0.0.
backend: StringA short description of what was benchmarked (e.g. the backend/model label). Neutral default "".
system_prompt: StringA run-level prompt/preamble shared across all cases, stored once on the report (shown at the top
of the HTML report’s per-run expander). Neutral default "".
persist: Option<Persist>When set, the run is auto-persisted: after the cases finish, the EvalReport is written as a
JSON RunRecord into the Persist::results_dir and
report.html is regenerated over every run there. None (the default) means compute-only — no
disk I/O. Set it with RunMeta::persist_to (+ optional backend_kind
/ cases_dir).
Implementations§
Source§impl RunMeta
impl RunMeta
Sourcepub fn new(
temperature: f32,
backend: impl Into<String>,
system_prompt: impl Into<String>,
) -> Self
pub fn new( temperature: f32, backend: impl Into<String>, system_prompt: impl Into<String>, ) -> Self
Create a new RunMeta with the given temperature, backend label, and system prompt.
Sourcepub fn persist_to(
self,
results_dir: impl Into<PathBuf>,
model: impl Into<String>,
) -> Self
pub fn persist_to( self, results_dir: impl Into<PathBuf>, model: impl Into<String>, ) -> Self
Enable automatic persistence for this run: after the cases finish, write the run as
{model}_{timestamp}.json into results_dir and (re)generate results_dir/report.html over
every run saved there. This is what turns a compute-only run into one that saves its JSON + the
HTML report as part of the call — the host no longer wires that up itself.
Sourcepub fn backend_kind(self, kind: impl Into<String>) -> Self
pub fn backend_kind(self, kind: impl Into<String>) -> Self
Record the backend KIND on the persisted run — the report’s Backend column, e.g. "local" /
"remote" — distinct from the descriptive backend label carried on the report. No-op unless
persist_to enabled persistence first.
Sourcepub fn cases_dir(self, dir: impl Into<String>) -> Self
pub fn cases_dir(self, dir: impl Into<String>) -> Self
Record the case directory on the persisted run (shown in the report). No-op unless
persist_to enabled persistence first.