pub struct NamedScorer {
pub name: String,
pub command: Vec<String>,
pub version_command: Option<Vec<String>>,
}Expand description
A named, executable scorer — declared HERE and not in a corpus.
§Why this lives in the references file
references.toml has always been executable input: every entry names an
argv this crate spawns, and it is read and reviewed as such. A
corpora/*.toml was pure data.
When VLM scoring landed, the corpus grew a [scorer] block carrying an
argv, and that moved the trust boundary: a file shaped like data could
suddenly run code. The risk was never that execution is possible — it is
that execution became invisible, buried on line 20 of a thousand lines
of hashes and prompts that a reviewer will skim.
So the argv moved back here, and the corpus now merely selects a scorer
by name. Data selects from a set; code defines the set. The corpus
keeps metric and scale, which are facts about the benchmark’s numbers
rather than instructions to execute anything.
Fields§
§name: StringThe name a corpus refers to.
command: Vec<String>Argv; {predictions} is replaced with the predictions JSONL path.
version_command: Option<Vec<String>>Optional argv printing a version string, recorded in the ledger.
Implementations§
Source§impl NamedScorer
impl NamedScorer
Sourcepub fn command_line(&self) -> String
pub fn command_line(&self) -> String
The argv as a single line, for the ledger and for printing before the spawn — an executed command should be visible, not merely permitted.
Trait Implementations§
Source§impl Clone for NamedScorer
impl Clone for NamedScorer
Source§fn clone(&self) -> NamedScorer
fn clone(&self) -> NamedScorer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NamedScorer
impl Debug for NamedScorer
Source§impl<'de> Deserialize<'de> for NamedScorer
impl<'de> Deserialize<'de> for NamedScorer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for NamedScorer
impl RefUnwindSafe for NamedScorer
impl Send for NamedScorer
impl Sync for NamedScorer
impl Unpin for NamedScorer
impl UnsafeUnpin for NamedScorer
impl UnwindSafe for NamedScorer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more