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
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.
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.
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.
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
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
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
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
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.
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: PartialFormatErrorKindWhich 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
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
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
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.
Trait Implementations§
Source§impl Error for EvalError
impl Error for EvalError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<PartialError> for EvalError
Translate a leaf-crate PartialError into the equivalent
EvalError variant. Centralizes the variant-name mapping
(Format ↔ PartialFormatMismatch etc.) so call sites use ? to
propagate.
impl From<PartialError> for EvalError
Translate a leaf-crate PartialError into the equivalent
EvalError variant. Centralizes the variant-name mapping
(Format ↔ PartialFormatMismatch etc.) so call sites use ? to
propagate.
Source§fn from(err: PartialError) -> Self
fn from(err: PartialError) -> Self
Auto Trait Implementations§
impl Freeze for EvalError
impl !RefUnwindSafe for EvalError
impl Send for EvalError
impl Sync for EvalError
impl Unpin for EvalError
impl UnsafeUnpin for EvalError
impl !UnwindSafe for EvalError
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.