Source code for baybe.exceptions

"""Custom exceptions and warnings."""


##### Warnings #####
[docs] class UnusedObjectWarning(UserWarning): """ A method or function was called with undesired arguments which indicates an unintended user fault. """
##### Exceptions #####
[docs] class NotEnoughPointsLeftError(Exception): """ More recommendations are requested than there are viable parameter configurations left in the search space. """
[docs] class NoMCAcquisitionFunctionError(Exception): """ A Monte Carlo acquisition function is required but an analytical acquisition function has been selected by the user. """
[docs] class IncompatibleSearchSpaceError(Exception): """ A recommender is used with a search space that contains incompatible parts, e.g. a discrete recommender is used with a hybrid or continuous search space. """
[docs] class EmptySearchSpaceError(Exception): """The created search space contains no parameters."""
[docs] class NothingToSimulateError(Exception): """There is nothing to simulate because there are no testable configurations."""
[docs] class NoRecommendersLeftError(Exception): """A recommender is requested by a meta recommender but there are no recommenders left. """
[docs] class NumericalUnderflowError(Exception): """A computation would lead to numerical underflow."""
[docs] class OptionalImportError(Exception): """An attempt was made to import an optional but uninstalled dependency."""
[docs] class DeprecationError(Exception): """Signals the use of a deprecated mechanism to the user, interrupting execution."""
[docs] class UnidentifiedSubclassError(Exception): """A specified subclass cannot be found in the given class hierarchy."""
[docs] class UnmatchedAttributeError(Exception): """An attribute cannot be matched against a certain callable signature."""