#[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
StepCountOverflow
Resumed step count would overflow.
ActionMismatch
Stored action disagrees with recomputed action.
Fields
NonFiniteCheckpointAction
Stored checkpoint action is NaN or infinite.
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
ChainStepMismatch
Generic MCMC chain step count disagrees with checkpoint step.
Fields
StepTelemetryLengthMismatch
Step telemetry length disagrees with the chain step count.
Fields
StepTelemetryAcceptedCountMismatch
Accepted-step telemetry count disagrees with the chain accepted count.
Fields
StepTelemetryIndexOverflow
Step telemetry index conversion overflowed.
StepTelemetrySequenceMismatch
Step telemetry records are not sequential.
NonFiniteStepActionBefore
Step telemetry contains a non-finite pre-move action.
NonFiniteStepDeltaAction
Step telemetry contains a non-finite action delta.
StepActionAfterDeltaMismatch
Accepted step telemetry has an action-after value inconsistent with the delta.
NonFiniteStepActionAfter
Accepted step telemetry contains a non-finite post-move action.
ScalarTraceLengthMismatch
Scalar trace row count disagrees with step telemetry.
Fields
ScalarTraceStepMismatch
Scalar trace row step disagrees with step telemetry.
ScalarTraceStepZero
Scalar trace row step was zero before it could be aligned with step telemetry.
ScalarTraceMoveTypeMismatch
Scalar trace move family disagrees with step telemetry.
Fields
ScalarTraceAcceptedMismatch
Scalar trace accepted outcome disagrees with step telemetry.
Fields
ScalarTraceDeltaActionMismatch
Scalar trace optional action delta disagrees with step telemetry.
ScalarTraceActionBeforeMismatch
Scalar trace action-before value disagrees with step telemetry.
ScalarTraceActionMismatch
Scalar trace current action value disagrees with step telemetry.
ScalarTraceActionAfterMismatch
Scalar trace optional action-after value disagrees with step telemetry.
ScalarTraceLogProbMismatch
Scalar trace log probability disagrees with the stored action and temperature.
ScalarTraceSeedMismatch
Scalar trace RNG seed disagrees with the simulation configuration.
Fields
ScalarTraceVolumeProfileExceedsTriangles
Scalar trace volume profile exceeds the stored triangle count.
Fields
NonFiniteScalarTraceValue
Scalar trace contains a non-finite numeric value.
Fields
field: ScalarTraceFieldScalar trace field containing the invalid value.
ScalarTraceAcceptedCountMismatch
Scalar trace accepted outcome count disagrees with proposal telemetry.
Fields
ScalarTraceRejectedProposalCountMismatch
Scalar trace rejected-proposal count disagrees with proposal telemetry.
Fields
ScalarTraceNoProposalCountMismatch
Scalar trace no-proposal count disagrees with proposal telemetry.
Fields
MeasurementCountOverflow
Measurement count calculation overflowed.
MeasurementCountMismatch
Measurement telemetry length disagrees with the configured schedule.
Fields
MeasurementStepOverflow
Measurement step calculation overflowed.
MeasurementStepMismatch
Measurement telemetry step disagrees with the configured schedule.
Fields
MoveCounterOverflow
A per-move counter sum overflowed.
Fields
counter: CheckpointMoveCounterCounter category that overflowed.
MoveHardFailures
Resumable checkpoints cannot contain hard-failure move counters.
MoveAcceptedExceedsAttempted
Accepted move counter exceeds attempted move counter.
TotalAcceptedExceedsAttempted
Total accepted move count exceeds total attempted move count.
CounterConversionOverflow
Accepted or rejected counter conversion overflowed.
Fields
counter: CheckpointMoveCounterCounter category that could not fit in upstream chain counters.
ProposalCounterOverflow
A proposal-statistics counter conversion overflowed.
Fields
counter: ProposalTelemetryCounterProposal telemetry counter that could not fit in the target type.
ProposalHardFailures
Resume-validated proposal telemetry cannot contain hard failures.
ProposalMoveFamilyCountMismatch
Proposal move-family count disagrees with the number of sampler steps.
Fields
ProposalAcceptedCountMismatch
Proposal accepted-transition count disagrees with step telemetry.
Fields
ProposalRejectedCountMismatch
Proposal rejected-transition count disagrees with step telemetry.
Trait Implementations§
Source§impl Clone for CheckpointResumeFailure
impl Clone for CheckpointResumeFailure
Source§fn clone(&self) -> CheckpointResumeFailure
fn clone(&self) -> CheckpointResumeFailure
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CheckpointResumeFailure
impl Debug for CheckpointResumeFailure
Source§impl Display for CheckpointResumeFailure
impl Display for CheckpointResumeFailure
Source§impl Error for CheckpointResumeFailure
impl Error for CheckpointResumeFailure
1.30.0 · 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 PartialEq for CheckpointResumeFailure
impl PartialEq for CheckpointResumeFailure
Source§fn eq(&self, other: &CheckpointResumeFailure) -> bool
fn eq(&self, other: &CheckpointResumeFailure) -> bool
self and other values to be equal, and is used by ==.