Skip to main content

EvalError

Enum EvalError 

Source
pub enum EvalError {
Show 16 variants DimensionMismatch { detail: String, }, InvalidAnnotation { detail: String, }, Json(Error), Mask(MaskError), NonFinite { context: &'static str, }, InvalidConfig { detail: String, }, OutOfBudget { used_bytes: usize, budget_bytes: usize, breakdown: HashMap<&'static str, usize>, }, NotImplemented { feature: &'static str, }, PerPairOverflow { observed: usize, cap: usize, }, LvisFederatedConflict { image_id: i64, category_id: i64, detail: &'static str, }, MissingFrequency { category_ids: Vec<i64>, }, PartialFormatMismatch { kind: PartialFormatErrorKind, }, PartialDatasetMismatch { expected: [u8; 32], actual: [u8; 32], }, PartialParamsMismatch { expected: [u8; 32], actual: [u8; 32], }, PartialPartitionOverlap { rank_a: u32, rank_b: u32, image_id: i64, }, PartialRankCollision { rank_id: u32, },
}
Expand description

Unified error type for evaluation paths.

Variants are kept coarse on purpose: each one corresponds to a class of failure a caller can plausibly recover from or report distinctly. We add new variants as they’re needed, rather than enumerating every possible cause up front.

Variants§

§

DimensionMismatch

Two annotations or two RLEs disagree on dimensions in a way that makes the operation undefined. Replaces the -1 sentinel pycocotools’ rleIou returns on dimension mismatch (quirk I2, dispositioned corrected per ADR-0002).

Fields

§detail: String

Free-form detail string for the operator that detected the mismatch; carries the offending dimensions.

§

InvalidAnnotation

Annotation could not be parsed from JSON, or referenced an image_id / category_id that the dataset does not contain. Quirk J5 in pycocotools is the matching enforcement on loadRes.

Fields

§detail: String

Free-form detail string identifying the offending field.

§

Json(Error)

JSON deserialization failed before any vernier-side validation.

§

Mask(MaskError)

Mask-side operation failed (codec decode, polygon rasterization, merge dimension mismatch). Propagated from vernier-mask per ADR-0009’s one-way dependency.

§

NonFinite

Numeric input was not finite (NaN or infinity reached an arithmetic that cannot tolerate it). Used at boundaries where we receive scores or coordinates from external code.

Fields

§context: &'static str

Where the non-finite value was encountered.

§

InvalidConfig

Caller-supplied evaluation parameters are inconsistent with the data they’re being applied to (e.g., a maxDet value that the accumulator never saw, an IoU threshold absent from the ladder). Distinct from InvalidAnnotation, which is for dataset-side data errors.

Fields

§detail: String

Free-form detail string identifying the offending parameter.

§

OutOfBudget

Streaming evaluator memory budget exceeded. Carries a breakdown of where bytes are spent so the user can pick a remediation (shard, shrink iou_thresholds, raise budget).

Fields

§used_bytes: usize

Total bytes the evaluator was holding when it tripped the budget.

§budget_bytes: usize

Configured budget cap.

§breakdown: HashMap<&'static str, usize>

Stable keys: "cells_store", "scores", "match_flags". The schema is future-additive — consumers must tolerate extra keys.

§

NotImplemented

Feature wired but not yet implemented in v0. Used by the streaming evaluator’s checkpoint/restore pair, deferred per the user’s scope decision; future ADR re-introduces the implementation.

Fields

§feature: &'static str

Stable identifier of the unimplemented feature, e.g. "StreamingEvaluator::checkpoint".

§

PerPairOverflow

per_pair row count exceeded the configured cap (ADR-0019 TablesConfig::per_pair_max_rows). Carries the observed count at the moment the cap was tripped and the cap value, so callers can decide whether to raise the cap or constrain the workload.

Fields

§observed: usize

Best-effort lower bound on the row count at the moment the cap was tripped. The check is per-cell so the actual final count may be larger; this is the value that triggered the abort.

§cap: usize

TablesConfig::per_pair_max_rows value the caller (or default) configured.

§

LvisFederatedConflict

LVIS federated metadata violates the disjointness invariant for one (image, category) cell: the category appears in both not_exhaustive_category_ids and neg_category_ids (or is listed in neg_category_ids while a GT of that category exists, which would put it implicitly in pos). Quirk AA7 of ADR-0026, dispositioned corrected: lvis-api silently picks not_exhaustive on overlap; vernier rejects at load.

Fields

§image_id: i64

Offending image id.

§category_id: i64

Offending category id.

§detail: &'static str

Free-form detail string identifying which constraint failed (e.g., "category in both not_exhaustive and neg").

§

MissingFrequency

LVIS dataset is missing the frequency field on one or more categories. Quirk AB6 of ADR-0026, dispositioned corrected: lvis-api raises KeyError mid-eval on the first miss; vernier raises at load with the full list of offending categories so the failure is debuggable in one shot.

The category_ids list is sorted ascending for stable error messages.

Fields

§category_ids: Vec<i64>

Sorted list of category ids that lacked a frequency value.

§

PartialFormatMismatch

Partial wire-format header / framing rejected by vernier_partial::with_validated_envelope (ADR-0031). The kind names which structural check tripped — magic, version, CRC, kernel discriminator, grid dims, or rkyv archive validation.

Fields

§kind: PartialFormatErrorKind

Which framing or structural check failed. See PartialFormatErrorKind.

§

PartialDatasetMismatch

One or more partials carry a dataset_hash that doesn’t match the live dataset’s. Means the partial was computed against a different GT than the receiving rank loaded — almost always a sampler / config bug; refusing protects the merge result from the head-rank’s perspective. ADR-0031 §“Validation order” #6.

Fields

§expected: [u8; 32]

Receiving rank’s dataset_hash (what the partial was expected to be computed against).

§actual: [u8; 32]

Partial’s declared dataset_hash (what was actually used).

§

PartialParamsMismatch

One or more partials carry a params_hash that doesn’t match the receiving rank’s. Means the partial was produced with different iou_thresholds / max_dets / use_cats / etc. and the merged result would not equal a batch run. ADR-0031 §“Validation order” #7.

Fields

§expected: [u8; 32]

Receiving rank’s params_hash.

§actual: [u8; 32]

Partial’s declared params_hash.

§

PartialPartitionOverlap

Two partials cover the same image_id — the disjoint-partition rule (ADR-0031 §“Axis D” D1) is violated. Almost always a DistributedSampler misconfiguration where two ranks evaluated the same image. The error names both rank ids and the colliding image so the user can fix their sampler.

Fields

§rank_a: u32

Lower rank id involved in the collision (sorted for determinism — min(a, b)).

§rank_b: u32

Higher rank id involved in the collision.

§image_id: i64

Image id that appeared in both partials’ seen_images.

§

PartialRankCollision

Two strict-mode partials declare the same rank_id. ADR-0031 §“Axis C” C2: strict-mode merge requires distinct rank ids so the future (score, rank_id, local_position) tiebreak gives a total order. Corrected mode tolerates collisions.

Fields

§rank_id: u32

The duplicated rank id.

Trait Implementations§

Source§

impl Debug for EvalError

Source§

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

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

impl Display for EvalError

Source§

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

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

impl Error for EvalError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for EvalError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<MaskError> for EvalError

Source§

fn from(source: MaskError) -> Self

Converts to this type from the input type.
Source§

impl From<PartialError> for EvalError

Translate a leaf-crate PartialError into the equivalent EvalError variant. Centralizes the variant-name mapping (FormatPartialFormatMismatch etc.) so call sites use ? to propagate.

Source§

fn from(err: PartialError) -> Self

Converts to this type from the input type.

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> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
Source§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

Source§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
Source§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.