Skip to main content

CheckpointResumeFailure

Enum CheckpointResumeFailure 

Source
#[non_exhaustive]
pub enum CheckpointResumeFailure {
Show 47 variants StepCountOverflow, ActionMismatch { stored: f64, recomputed: f64, }, NonFiniteCheckpointAction { stored: f64, }, IncompatibleActionConfiguration, IncompatibleTemperature, IncompatibleThermalizationSchedule, IncompatibleMeasurementFrequency, ChainCounterMismatch { chain_accepted: usize, chain_rejected: usize, move_accepted: usize, move_rejected: usize, }, ChainStepMismatch { chain_steps: usize, checkpoint_step: u32, }, StepTelemetryLengthMismatch { actual: usize, expected: usize, }, StepTelemetryAcceptedCountMismatch { actual: usize, expected: usize, }, StepTelemetryIndexOverflow, StepTelemetrySequenceMismatch { actual: u32, expected: u32, }, NonFiniteStepActionBefore { step: u32, }, NonFiniteStepDeltaAction { step: u32, }, StepActionAfterDeltaMismatch { step: u32, }, NonFiniteStepActionAfter { step: u32, }, ScalarTraceLengthMismatch { actual: usize, expected: usize, }, ScalarTraceStepMismatch { actual: u32, expected: u32, }, ScalarTraceStepZero { actual: u32, }, ScalarTraceMoveTypeMismatch { step: u32, actual: MoveType, expected: MoveType, }, ScalarTraceAcceptedMismatch { step: u32, actual: bool, expected: bool, }, ScalarTraceDeltaActionMismatch { step: u32, }, ScalarTraceActionBeforeMismatch { step: u32, }, ScalarTraceActionMismatch { step: u32, }, ScalarTraceActionAfterMismatch { step: u32, }, ScalarTraceLogProbMismatch { step: u32, }, ScalarTraceSeedMismatch { step: u32, actual: Option<u64>, expected: Option<u64>, }, ScalarTraceVolumeProfileExceedsTriangles { step: u32, profile_total: u64, triangles: u32, }, NonFiniteScalarTraceValue { step: u32, field: ScalarTraceField, }, ScalarTraceAcceptedCountMismatch { actual: u64, expected: u64, }, ScalarTraceRejectedProposalCountMismatch { actual: u64, expected: u64, }, ScalarTraceNoProposalCountMismatch { actual: u64, expected: u64, }, MeasurementCountOverflow, MeasurementCountMismatch { actual: usize, expected: usize, }, MeasurementStepOverflow, MeasurementStepMismatch { actual: u32, expected: u32, }, MoveCounterOverflow { counter: CheckpointMoveCounter, }, MoveHardFailures { move_type: MoveType, }, MoveAcceptedExceedsAttempted { move_type: MoveType, }, TotalAcceptedExceedsAttempted, CounterConversionOverflow { counter: CheckpointMoveCounter, }, ProposalCounterOverflow { counter: ProposalTelemetryCounter, }, ProposalHardFailures { actual: u64, }, ProposalMoveFamilyCountMismatch { actual: u64, expected: u64, }, ProposalAcceptedCountMismatch { actual: u64, expected: u64, }, ProposalRejectedCountMismatch { actual: u64, expected: u64, },
}
Expand description

Structured reason a CDT checkpoint could not be resumed.

CdtError::CheckpointResumeFailed wraps this enum for CDT-owned resume invariants such as incompatible schedules, inconsistent telemetry, and overflow while rebuilding upstream MCMC counters. Upstream framework, configuration, and triangulation validation failures remain separate CdtError variants so callers can keep matching the original typed error.

§Examples

use causal_triangulations::prelude::errors::{
    CdtError, CheckpointResumeFailure,
};
use std::assert_matches;

let err = CdtError::CheckpointResumeFailed {
    failure: CheckpointResumeFailure::IncompatibleTemperature,
};

assert_matches!(
    err,
    CdtError::CheckpointResumeFailed {
        failure: CheckpointResumeFailure::IncompatibleTemperature,
    }
);

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

StepCountOverflow

Resumed step count would overflow.

§

ActionMismatch

Stored action disagrees with recomputed action.

Fields

§stored: f64

Serialized action stored in the checkpoint.

§recomputed: f64

Action recomputed from the restored triangulation.

§

NonFiniteCheckpointAction

Stored checkpoint action is NaN or infinite.

Fields

§stored: f64

Serialized action stored in the checkpoint.

§

IncompatibleActionConfiguration

Action configuration differs from the checkpoint.

§

IncompatibleTemperature

Temperature differs from the checkpoint.

§

IncompatibleThermalizationSchedule

Thermalization schedule differs from the checkpoint.

§

IncompatibleMeasurementFrequency

Measurement frequency differs from the checkpoint.

§

ChainCounterMismatch

Generic MCMC chain counters disagree with CDT move statistics.

Fields

§chain_accepted: usize

Accepted proposals recorded by the upstream MCMC chain.

§chain_rejected: usize

Rejected proposals recorded by the upstream MCMC chain.

§move_accepted: usize

Accepted proposals reconstructed from CDT move statistics.

§move_rejected: usize

Rejected proposals reconstructed from CDT move statistics.

§

ChainStepMismatch

Generic MCMC chain step count disagrees with checkpoint step.

Fields

§chain_steps: usize

Total steps recorded by the upstream MCMC chain.

§checkpoint_step: u32

Current CDT step stored in the checkpoint.

§

StepTelemetryLengthMismatch

Step telemetry length disagrees with the chain step count.

Fields

§actual: usize

Number of serialized step records.

§expected: usize

Expected number of step records from the chain counters.

§

StepTelemetryAcceptedCountMismatch

Accepted-step telemetry count disagrees with the chain accepted count.

Fields

§actual: usize

Accepted steps recorded in CDT telemetry.

§expected: usize

Accepted proposals recorded by the upstream MCMC chain.

§

StepTelemetryIndexOverflow

Step telemetry index conversion overflowed.

§

StepTelemetrySequenceMismatch

Step telemetry records are not sequential.

Fields

§actual: u32

Serialized step value.

§expected: u32

Expected sequential step value.

§

NonFiniteStepActionBefore

Step telemetry contains a non-finite pre-move action.

Fields

§step: u32

Step with invalid telemetry.

§

NonFiniteStepDeltaAction

Step telemetry contains a non-finite action delta.

Fields

§step: u32

Step with invalid telemetry.

§

StepActionAfterDeltaMismatch

Accepted step telemetry has an action-after value inconsistent with the delta.

Fields

§step: u32

Step with invalid telemetry.

§

NonFiniteStepActionAfter

Accepted step telemetry contains a non-finite post-move action.

Fields

§step: u32

Step with invalid telemetry.

§

ScalarTraceLengthMismatch

Scalar trace row count disagrees with step telemetry.

Fields

§actual: usize

Number of scalar trace rows.

§expected: usize

Expected scalar trace rows from step telemetry.

§

ScalarTraceStepMismatch

Scalar trace row step disagrees with step telemetry.

Fields

§actual: u32

Serialized scalar trace step.

§expected: u32

Expected step from step telemetry.

§

ScalarTraceStepZero

Scalar trace row step was zero before it could be aligned with step telemetry.

Fields

§actual: u32

Serialized scalar trace step.

§

ScalarTraceMoveTypeMismatch

Scalar trace move family disagrees with step telemetry.

Fields

§step: u32

Step with invalid scalar trace telemetry.

§actual: MoveType

Move type stored in the scalar trace row.

§expected: MoveType

Move type stored in step telemetry.

§

ScalarTraceAcceptedMismatch

Scalar trace accepted outcome disagrees with step telemetry.

Fields

§step: u32

Step with invalid scalar trace telemetry.

§actual: bool

Accepted flag reconstructed from scalar trace outcome.

§expected: bool

Accepted flag stored in step telemetry.

§

ScalarTraceDeltaActionMismatch

Scalar trace optional action delta disagrees with step telemetry.

Fields

§step: u32

Step with invalid scalar trace telemetry.

§

ScalarTraceActionBeforeMismatch

Scalar trace action-before value disagrees with step telemetry.

Fields

§step: u32

Step with invalid scalar trace telemetry.

§

ScalarTraceActionMismatch

Scalar trace current action value disagrees with step telemetry.

Fields

§step: u32

Step with invalid scalar trace telemetry.

§

ScalarTraceActionAfterMismatch

Scalar trace optional action-after value disagrees with step telemetry.

Fields

§step: u32

Step with invalid scalar trace telemetry.

§

ScalarTraceLogProbMismatch

Scalar trace log probability disagrees with the stored action and temperature.

Fields

§step: u32

Step with invalid scalar trace telemetry.

§

ScalarTraceSeedMismatch

Scalar trace RNG seed disagrees with the simulation configuration.

Fields

§step: u32

Step with invalid scalar trace telemetry.

§actual: Option<u64>

Seed stored in the scalar trace row.

§expected: Option<u64>

Seed from simulation configuration.

§

ScalarTraceVolumeProfileExceedsTriangles

Scalar trace volume profile exceeds the stored triangle count.

Fields

§step: u32

Step with invalid scalar trace telemetry.

§profile_total: u64

Sum of the serialized volume profile entries.

§triangles: u32

Stored scalar trace triangle count.

§

NonFiniteScalarTraceValue

Scalar trace contains a non-finite numeric value.

Fields

§step: u32

Step with invalid scalar trace telemetry.

§field: ScalarTraceField

Scalar trace field containing the invalid value.

§

ScalarTraceAcceptedCountMismatch

Scalar trace accepted outcome count disagrees with proposal telemetry.

Fields

§actual: u64

Accepted outcomes recorded in scalar trace rows.

§expected: u64

Accepted outcomes recorded in proposal telemetry.

§

ScalarTraceRejectedProposalCountMismatch

Scalar trace rejected-proposal count disagrees with proposal telemetry.

Fields

§actual: u64

Rejected-proposal outcomes recorded in scalar trace rows.

§expected: u64

Metropolis rejection outcomes recorded in proposal telemetry.

§

ScalarTraceNoProposalCountMismatch

Scalar trace no-proposal count disagrees with proposal telemetry.

Fields

§actual: u64

No-proposal outcomes recorded in scalar trace rows.

§expected: u64

No-proposal outcomes recorded in proposal telemetry.

§

MeasurementCountOverflow

Measurement count calculation overflowed.

§

MeasurementCountMismatch

Measurement telemetry length disagrees with the configured schedule.

Fields

§actual: usize

Number of serialized measurements.

§expected: usize

Expected measurement count from the sampling schedule.

§

MeasurementStepOverflow

Measurement step calculation overflowed.

§

MeasurementStepMismatch

Measurement telemetry step disagrees with the configured schedule.

Fields

§actual: u32

Serialized measurement step.

§expected: u32

Expected measurement step from the sampling schedule.

§

MoveCounterOverflow

A per-move counter sum overflowed.

Fields

§counter: CheckpointMoveCounter

Counter category that overflowed.

§

MoveHardFailures

Resumable checkpoints cannot contain hard-failure move counters.

Fields

§move_type: MoveType

Move type with invalid hard-failure telemetry.

§

MoveAcceptedExceedsAttempted

Accepted move counter exceeds attempted move counter.

Fields

§move_type: MoveType

Move type with impossible move telemetry.

§

TotalAcceptedExceedsAttempted

Total accepted move count exceeds total attempted move count.

§

CounterConversionOverflow

Accepted or rejected counter conversion overflowed.

Fields

§counter: CheckpointMoveCounter

Counter category that could not fit in upstream chain counters.

§

ProposalCounterOverflow

A proposal-statistics counter conversion overflowed.

Fields

§counter: ProposalTelemetryCounter

Proposal telemetry counter that could not fit in the target type.

§

ProposalHardFailures

Resume-validated proposal telemetry cannot contain hard failures.

Fields

§actual: u64

Number of hard proposal failures recorded in proposal telemetry.

§

ProposalMoveFamilyCountMismatch

Proposal move-family count disagrees with the number of sampler steps.

Fields

§actual: u64

Number of move-family proposals recorded in proposal telemetry.

§expected: u64

Expected proposal count from step telemetry.

§

ProposalAcceptedCountMismatch

Proposal accepted-transition count disagrees with step telemetry.

Fields

§actual: u64

Number of accepted transitions recorded in proposal telemetry.

§expected: u64

Expected accepted count from step telemetry.

§

ProposalRejectedCountMismatch

Proposal rejected-transition count disagrees with step telemetry.

Fields

§actual: u64

Number of rejected transitions reconstructed from proposal telemetry.

§expected: u64

Expected rejected count from step telemetry.

Trait Implementations§

Source§

impl Clone for CheckpointResumeFailure

Source§

fn clone(&self) -> CheckpointResumeFailure

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CheckpointResumeFailure

Source§

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

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

impl Display for CheckpointResumeFailure

Source§

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

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

impl Error for CheckpointResumeFailure

1.30.0 · 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 PartialEq for CheckpointResumeFailure

Source§

fn eq(&self, other: &CheckpointResumeFailure) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for CheckpointResumeFailure

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> 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DataDebug for T
where T: Debug,