pub struct DecontaminationReport {
pub ngram_size: usize,
pub threshold: f64,
pub total_samples: usize,
pub evaluated_samples: usize,
pub evaluated_references: usize,
pub contaminated_count: usize,
pub contamination_rate: f64,
pub flagged: Vec<ContaminationResult>,
}Expand description
Summary report of decontamination check.
Fields§
§ngram_size: usizeN-gram size used
threshold: f64Overlap threshold used
total_samples: usizeTotal training samples checked
evaluated_samples: usizeTraining samples that yielded at least one n-gram and were therefore actually compared against the reference set.
Samples shorter than ngram_size (and every sample when ngram_size
is 0) produce no n-grams and are silently un-checkable. When this is 0
but total_samples is not, the check was vacuous: a clean
contamination_rate of 0.0 proves nothing.
evaluated_references: usizeReference samples that yielded at least one n-gram. Zero here also makes the check vacuous — nothing could ever be matched against.
contaminated_count: usizeNumber of contaminated samples
contamination_rate: f64Contamination rate (0.0 to 1.0)
flagged: Vec<ContaminationResult>Per-sample results (only contaminated samples included)
Implementations§
Source§impl DecontaminationReport
impl DecontaminationReport
Sourcepub fn is_vacuous(&self) -> bool
pub fn is_vacuous(&self) -> bool
Whether the configuration made the check meaningless.
True when there was input to check but nothing could be compared —
e.g. ngram_size exceeds the length of every sample, or is 0. A
caller enforcing a contamination gate must treat this as a failure,
not as a pass.
Trait Implementations§
Source§impl Clone for DecontaminationReport
impl Clone for DecontaminationReport
Source§fn clone(&self) -> DecontaminationReport
fn clone(&self) -> DecontaminationReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DecontaminationReport
impl RefUnwindSafe for DecontaminationReport
impl Send for DecontaminationReport
impl Sync for DecontaminationReport
impl Unpin for DecontaminationReport
impl UnsafeUnpin for DecontaminationReport
impl UnwindSafe for DecontaminationReport
Blanket Implementations§
impl<T> Allocation for T
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,
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> ⓘ
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