gluonts.exceptions module#
- exception gluonts.exceptions.GluonTSDataError[source]#
Bases:
gluonts.exceptions.GluonTSException
An exception indicating an error with the input data.
- exception gluonts.exceptions.GluonTSDateBoundsError[source]#
Bases:
gluonts.exceptions.GluonTSException
An exception indicating that .
- exception gluonts.exceptions.GluonTSException[source]#
Bases:
Exception
Base class for all GluonTS exceptions.
- exception gluonts.exceptions.GluonTSHyperparametersError[source]#
Bases:
gluonts.exceptions.GluonTSException
,ValueError
An exception wrapping a Pydantic
ValidationError
, usually thrown when the validation of avalidated()
initializer fails.
- exception gluonts.exceptions.GluonTSUserError[source]#
Bases:
gluonts.exceptions.GluonTSException
An exception indicating a user error.
- gluonts.exceptions.assert_data_error(condition: Any, message: str, *args, **kwargs) None [source]#
Delegates to
assert_gluonts()
with a fixedexception_class
value ofGluonTSDataError
.- 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.exceptions.assert_gluonts(exception_class: type, condition: Any, message: str, *args, **kwargs) None [source]#
If the given
condition
isFalse
, raises an exception of typeexception_class
with a message formatted from themessage
pattern using theargs
andkwargs
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.