Skip to main content

RunMeta

Struct RunMeta 

Source
#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§temperature: f32

Sampling temperature the run used, recorded in the report summary. Neutral default 0.0.

§backend: String

A short description of what was benchmarked (e.g. the backend/model label). Neutral default "".

§system_prompt: String

A 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

Source

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.

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Clone for RunMeta

Source§

fn clone(&self) -> RunMeta

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RunMeta

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RunMeta

Source§

fn default() -> RunMeta

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more