Table Of Contents
Table Of Contents

gluonts.core.exception module

exception gluonts.core.exception.GluonTSDataError[source]

Bases: gluonts.core.exception.GluonTSException

An exception indicating an error with the input data.

exception gluonts.core.exception.GluonTSDateBoundsError[source]

Bases: gluonts.core.exception.GluonTSException

An exception indicating that .

exception gluonts.core.exception.GluonTSException[source]

Bases: Exception

Base class for all GluonTS exceptions.

exception gluonts.core.exception.GluonTSFatalError[source]

Bases: gluonts.core.exception.GluonTSException

An exception indicating an arbitrary cause that prohibits further execution of the program.

exception gluonts.core.exception.GluonTSForecasterNotFoundError[source]

Bases: gluonts.core.exception.GluonTSException

An exception indicating that a forecaster identified by the given name cannot be found in the current environment.

exception gluonts.core.exception.GluonTSHyperparameterParseError(key, value, type)[source]

Bases: gluonts.core.exception.GluonTSException

An exception indicating a parse error when trying to re-interpret a string value value for a parameter key as a value of type type.

exception gluonts.core.exception.GluonTSHyperparametersError[source]

Bases: gluonts.core.exception.GluonTSException

An exception wrapping a Pydantic ValidationError, usually thrown when the validation of a validated() initializer fails.

exception gluonts.core.exception.GluonTSInvalidRequestException[source]

Bases: gluonts.core.exception.GluonTSException

An exception indicating an invalid inference request.

exception gluonts.core.exception.GluonTSUserError[source]

Bases: gluonts.core.exception.GluonTSException

An exception indicating a user error.

gluonts.core.exception.assert_data_error(condition: bool, message: str, *args, **kwargs) → None[source]

Delegates to assert_gluonts() with a fixed exception_class value of GluonTSDataError.

Parameters:
  • condition – The condition that must be violated in order to raise the exception.
  • message – A message to pass as the only argument to the exception initializer.
  • args – An optional list of positional arguments to use when formatting the exception message.
  • kwargs – An optional list of key-value arguments to use when formatting the exception message.
gluonts.core.exception.assert_gluonts(exception_class: type, condition: bool, message: str, *args, **kwargs) → None[source]

If the given condition is False, raises an exception of type exception_class with a message formatted from the message pattern using the args and kwargs strings.

Parameters:
  • exception_class – The exception class of the raised exception.
  • condition – The condition that must be violated in order to raise the exception.
  • message – A message to pass as the only argument to the exception initializer.
  • args – An optional list of positional arguments to use when formatting the exception message.
  • kwargs – An optional list of key-value arguments to use when formatting the exception message.
gluonts.core.exception.reraise_error(origin_class: type, message: str = None, target_class: type = <class 'gluonts.core.exception.GluonTSUserError'>) → Callable[source]

Decorator that converts Origin to Target exception, where Origin is not an instance of CustomerError.

If message is not provided, the message of the causing exception is simply past to the GluonTSUserError. If message is specified, the GluonTSUserError will be constructed with that message and the causing exception is added as the cause.

Parameters:
  • origin_class – The type of the original exception.
  • message – A message to pass to the re-raised exception.
  • target_class – The type of hte re-raised exception.