pymc_forecast.exceptions#
Exception taxonomy for pymc_forecast.
Package-specific errors derive from PymcForecastError, so callers
can catch that family with one clause. Specific subclasses exist where a
caller might plausibly branch on the failure mode. Plain argument validation
raises builtin exceptions instead: mostly ValueError/TypeError (e.g.
in metrics and features), plus KeyError for unknown names (prior names,
statespace var_names) and NotImplementedError for unsupported
statespace configurations.
- exception pymc_forecast.exceptions.AlignmentError[source]#
Bases:
PymcForecastError,ValueErrorInputs are malformed or do not align along the time dimension.
Covers data/covariate misalignment as well as invalid input shapes (e.g. no
"time"dim), invalid horizons or non-extendable time indices, misordered future indices, and covariate structure mismatches.
- exception pymc_forecast.exceptions.BacktestWindowError[source]#
Bases:
PymcForecastError,ValueErrorBacktest windowing parameters are invalid or admit no valid windows.
- exception pymc_forecast.exceptions.HorizonError[source]#
Bases:
PymcForecastError,ValueErrorForecast-horizon or model-structure misuse.
Raised when the train/forecast horizon cannot be derived or is inconsistent, and for related model-building misuse, e.g. missing model coords, horizon helpers used outside a model build, misuse of
.dist()orPriorobservation/noise specs, reserved predictive-output names (mu,expected_observation, …) already defined in the model, multivariate data passed topredict_mvn, or a model without the expectedobs/future variables.
- exception pymc_forecast.exceptions.MethodResolutionError[source]#
Bases:
PymcForecastError,ValueErrorA VI method, optimizer, or VI backend specification could not be resolved.
- exception pymc_forecast.exceptions.NotFittedError[source]#
Bases:
PymcForecastError,RuntimeErrorA predictive method was called on a forecaster that has not been fit.
- exception pymc_forecast.exceptions.OptionalDependencyError(package, extra, feature)[source]#
Bases:
PymcForecastError,ImportErrorAn optional dependency is required for the requested feature.
- Parameters: