voiage.exceptions
Custom exception classes for the voiage library.
Defining custom exceptions allows users of the library to catch specific errors that originate from voiage and handle them appropriately, rather than relying on generic Python exceptions.
Classes
Section titled “Classes”- VoiageError Base class for all exceptions raised by the voiage library.
- ConfigurationError Raised when there is an issue with voiage configuration.
- InputError Raised when input data is invalid or inconsistent.
- DimensionMismatchError Raised when array dimensions are incompatible for an operation.
- MissingParameterError Raised when a required parameter is missing.
- DataFormatError Raised when input data is in an incorrect format.
- CalculationError Raised during a VOI calculation if an error occurs.
- NumericalError Raised when a numerical operation cannot produce a valid result.
- NonConvergenceError Raised if a numerical method (e.g., optimization, MCMC) fails to converge.
- InvalidMethodError Raised if an invalid method or algorithm is specified for a calculation.
- ConvergenceError Raised when an algorithm fails to converge within specified tolerances.
- EVSIMethodError Base class for errors specific to EVSI calculations.
- RegressionMetamodelError Raised for errors during the regression metamodeling step in EVSI.
- DataStructureError Raised for issues related to voiage’s internal data structures.
- SerializationError Raised when stable data cannot be serialized or deserialized.
- PlottingError Raised if an error occurs during plot generation.
- BackendError Raised for errors related to the computation backend (e.g., JAX, NumPy).
- MetamodelError Base class for errors related to metamodeling.
- MetamodelFitError Raised when a metamodel fails to fit the data.
- VoiageNotImplementedError Raised when a feature or method is not yet implemented.
- BackendNotAvailableError Raised when a requested backend or method capability is unavailable.
- OptionalDependencyError Raised when an optional dependency is not installed but is required for a feature.
Functions
Section titled “Functions”- raise_input_error Raise an input validation error with a consistent call pattern.
- raise_dimension_mismatch_error Raise a dimension mismatch error with a consistent call pattern.
- raise_value_error Raise a standard value error with an optional chained cause.
- raise_calculation_error Raise a calculation error with an optional chained cause.
- raise_import_error Raise an import error with a consistent call pattern.
- raise_runtime_error Raise a runtime error with a consistent call pattern.
- raise_type_error Raise a type error with a consistent call pattern.
- raise_optional_dependency_error Raise an optional dependency error with a consistent call pattern.
- raise_plotting_error Raise a plotting error with a consistent call pattern.
- raise_not_implemented_error Raise a not-implemented error with a consistent call pattern.
- raise_backend_not_available_error Raise an unavailable-backend error with a consistent call pattern.