pub enum WorkflowError {
InvalidConfig {
reason: String,
},
SchemaMismatch {
reason: String,
},
MissingDependency {
reason: String,
},
IntegrationFailed {
reason: String,
},
FormulaDsl {
context: &'static str,
source: FormulaDslError,
},
ColumnNotFound {
name: String,
role: Option<String>,
available: Vec<String>,
similar: Vec<String>,
tsv_hint: bool,
},
}Expand description
Typed error category for the solver::fit_orchestration materialization and
fitting pipeline.
Every variant’s Display impl is byte-equivalent to the original
format!(...)/.to_string() text the module emitted before the typed
migration. The category split lets internal callers reason about the
failure kind without parsing strings; public entry points keep their
Result<_, String> signatures and rely on From<WorkflowError> for String at the boundary.
Variants§
InvalidConfig
Fit configuration is internally inconsistent or selects an
unsupported combination (conflicting family/link, unsupported
linkwiggle(...)/link(...) placement, frailty requested for a
family that does not implement it, duplicate or out-of-range
hyperpriors, etc.).
SchemaMismatch
Saved-model or runtime block dimensions disagree with what the rebuilt designs / penalties expect (initial beta length, penalty block shape vs range width, time-basis column count, response support mismatch).
MissingDependency
A required input column, frailty parameter, baseline target, or cause count is missing for the requested mode (e.g. cause-specific fit with one cause, latent-cloglog without a fixed sigma).
IntegrationFailed
An underlying numerical step (PIRLS / smoothing-parameter optimizer / profile-cost evaluation) failed to converge or produced a non-finite value that downstream code cannot consume.
FormulaDsl
Formula parsing / term-resolution failed before materialization; the source retains the parser-layer category and argument context.
ColumnNotFound
A formula referenced a column that does not exist in the input data.
Carries the structured payload through to the FFI boundary so the
Python side can raise gamfit.ColumnNotFoundError with column,
role, available, similar, and tsv_hint attributes — issue
#305 / #343 (typed-dispatch migration; no string classification at
the boundary).
Trait Implementations§
Source§impl Clone for WorkflowError
impl Clone for WorkflowError
Source§fn clone(&self) -> WorkflowError
fn clone(&self) -> WorkflowError
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 WorkflowError
impl Debug for WorkflowError
Source§impl Display for WorkflowError
impl Display for WorkflowError
Source§impl Error for WorkflowError
impl Error for WorkflowError
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<&str> for WorkflowError
impl From<&str> for WorkflowError
Source§impl From<DataError> for WorkflowError
Typed lift from leaf data-layer errors. DataError::ColumnNotFound is
the variant of immediate interest — it preserves the structured fields
so gam-pyffi can dispatch to ColumnNotFoundError without parsing
human text. Other DataError variants degrade to the appropriate
workflow bucket (SchemaMismatch for row/column shape problems,
InvalidConfig for parse / encoding / empty / invalid-value sources)
since they don’t have a dedicated structured destination yet.
impl From<DataError> for WorkflowError
Typed lift from leaf data-layer errors. DataError::ColumnNotFound is
the variant of immediate interest — it preserves the structured fields
so gam-pyffi can dispatch to ColumnNotFoundError without parsing
human text. Other DataError variants degrade to the appropriate
workflow bucket (SchemaMismatch for row/column shape problems,
InvalidConfig for parse / encoding / empty / invalid-value sources)
since they don’t have a dedicated structured destination yet.
Source§impl From<FormulaDslError> for WorkflowError
Cross-module cascade: a FormulaDslError raised inside materialize /
fit_from_formula (via parse_formula, parse_surv_response, etc.) flows
up with its parser-layer source attached instead of stringifying into a
generic workflow configuration bucket.
impl From<FormulaDslError> for WorkflowError
Cross-module cascade: a FormulaDslError raised inside materialize /
fit_from_formula (via parse_formula, parse_surv_response, etc.) flows
up with its parser-layer source attached instead of stringifying into a
generic workflow configuration bucket.
Source§fn from(err: FormulaDslError) -> Self
fn from(err: FormulaDslError) -> Self
Source§impl From<String> for WorkflowError
Catchall lift for legacy Result<_, String> chains that flow into a
WorkflowError-returning function via ?. Maps to InvalidConfig since
the upstream call sites that still hand out bare strings are
configuration / setup helpers (FitConfig parsing, payload assembly, etc.)
that pre-date the typed-error migration. Specific leaves that carry
structured payload (DataError, FormulaDslError, EstimationError,
…) have their own dedicated From impls and bypass this fallback.
impl From<String> for WorkflowError
Catchall lift for legacy Result<_, String> chains that flow into a
WorkflowError-returning function via ?. Maps to InvalidConfig since
the upstream call sites that still hand out bare strings are
configuration / setup helpers (FitConfig parsing, payload assembly, etc.)
that pre-date the typed-error migration. Specific leaves that carry
structured payload (DataError, FormulaDslError, EstimationError,
…) have their own dedicated From impls and bypass this fallback.
Source§impl From<TermBuilderError> for WorkflowError
Typed lift from term-builder errors. TermBuilderError::ColumnNotFound
preserves the structured fields (name, role, available, similar,
tsv_hint) through to the FFI boundary so gam-pyffi can raise a
gamfit.ColumnNotFoundError with attributes set from the payload —
not from re-parsed prose. Other variants degrade into the closest
generic workflow bucket; the dedicated typed channels for those
failure classes can be added incrementally as their dispatch arrives.
impl From<TermBuilderError> for WorkflowError
Typed lift from term-builder errors. TermBuilderError::ColumnNotFound
preserves the structured fields (name, role, available, similar,
tsv_hint) through to the FFI boundary so gam-pyffi can raise a
gamfit.ColumnNotFoundError with attributes set from the payload —
not from re-parsed prose. Other variants degrade into the closest
generic workflow bucket; the dedicated typed channels for those
failure classes can be added incrementally as their dispatch arrives.
Source§fn from(err: TermBuilderError) -> Self
fn from(err: TermBuilderError) -> Self
Source§impl From<WorkflowError> for String
impl From<WorkflowError> for String
Source§fn from(err: WorkflowError) -> String
fn from(err: WorkflowError) -> String
Auto Trait Implementations§
impl Freeze for WorkflowError
impl RefUnwindSafe for WorkflowError
impl Send for WorkflowError
impl Sync for WorkflowError
impl Unpin for WorkflowError
impl UnsafeUnpin for WorkflowError
impl UnwindSafe for WorkflowError
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.