pub struct EvalSystem { /* private fields */ }Expand description
Unified evaluation system - single entry point for all evaluations.
Implementations§
Source§impl EvalSystem
impl EvalSystem
Sourcepub fn with_tasks(self, tasks: Vec<Task>) -> Self
pub fn with_tasks(self, tasks: Vec<Task>) -> Self
Set tasks to evaluate.
Sourcepub fn with_datasets(self, datasets: Vec<DatasetId>) -> Self
pub fn with_datasets(self, datasets: Vec<DatasetId>) -> Self
Set datasets to use.
Sourcepub fn with_backends(self, backends: Vec<String>) -> Self
pub fn with_backends(self, backends: Vec<String>) -> Self
Set backends to test.
Sourcepub fn with_backend_names(self, backends: Vec<BackendName>) -> Self
pub fn with_backend_names(self, backends: Vec<BackendName>) -> Self
Set backends using type-safe BackendName enum.
Sourcepub fn with_max_examples(self, max: Option<usize>) -> Self
pub fn with_max_examples(self, max: Option<usize>) -> Self
Set maximum examples per dataset.
Pass None to remove limit (evaluate all examples).
Sourcepub fn add_dataset(self, dataset: DatasetId) -> Self
pub fn add_dataset(self, dataset: DatasetId) -> Self
Add a dataset to use.
Sourcepub fn add_backend(self, backend: String) -> Self
pub fn add_backend(self, backend: String) -> Self
Add a backend to test.
Sourcepub fn add_backend_name(self, backend: BackendName) -> Self
pub fn add_backend_name(self, backend: BackendName) -> Self
Add a backend using type-safe BackendName enum.
Sourcepub fn with_bias_analysis(self, enable: bool) -> Self
pub fn with_bias_analysis(self, enable: bool) -> Self
Enable bias analysis.
Sourcepub fn with_bias_config(self, config: BiasDatasetConfig) -> Self
pub fn with_bias_config(self, config: BiasDatasetConfig) -> Self
Set bias evaluation configuration.
Sourcepub fn with_calibration(self, enable: bool) -> Self
pub fn with_calibration(self, enable: bool) -> Self
Enable calibration analysis.
Sourcepub fn with_data_quality(self, enable: bool) -> Self
pub fn with_data_quality(self, enable: bool) -> Self
Enable data quality checks.
Sourcepub fn with_model(self, model: Box<dyn Model>, name: Option<String>) -> Self
pub fn with_model(self, model: Box<dyn Model>, name: Option<String>) -> Self
Set model to evaluate (for bias/calibration that need model instance).
Sourcepub fn with_coref_resolver(self, resolver: Box<dyn CoreferenceResolver>) -> Self
pub fn with_coref_resolver(self, resolver: Box<dyn CoreferenceResolver>) -> Self
Set coreference resolver to evaluate.
This allows evaluating coreference resolvers (e.g., TrainedBoxCorefResolver from matryoshka-box)
using anno’s evaluation infrastructure.
§Example
ⓘ
use matryoshka_box_inference::trained_resolver::TrainedBoxCorefResolver;
use anno_eval::eval::unified_evaluator::EvalSystem;
use anno_eval::eval::task_mapping::Task;
let resolver = TrainedBoxCorefResolver::new(trained_boxes, config);
let results = EvalSystem::new()
.with_coref_resolver(Box::new(resolver))
.with_tasks(vec![Task::Coreference { metrics: vec![] }])
.run()?;Sourcepub fn run(self) -> Result<UnifiedEvalResults>
pub fn run(self) -> Result<UnifiedEvalResults>
Run all enabled evaluations.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for EvalSystem
impl !UnwindSafe for EvalSystem
impl Freeze for EvalSystem
impl Send for EvalSystem
impl Sync for EvalSystem
impl Unpin for EvalSystem
impl UnsafeUnpin for EvalSystem
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
Mutably borrows from an owned value. Read more
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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