File: exception.py

package info (click to toggle)
python-bayesian-optimization 2.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 19,816 kB
  • sloc: python: 2,820; makefile: 26; sh: 9
file content (31 lines) | stat: -rw-r--r-- 871 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""This module contains custom exceptions for Bayesian Optimization."""

from __future__ import annotations

__all__ = [
    "BayesianOptimizationError",
    "NotUniqueError",
    "ConstraintNotSupportedError",
    "NoValidPointRegisteredError",
    "TargetSpaceEmptyError",
]


class BayesianOptimizationError(Exception):
    """Base class for exceptions in the Bayesian Optimization."""


class NotUniqueError(BayesianOptimizationError):
    """A point is non-unique."""


class ConstraintNotSupportedError(BayesianOptimizationError):
    """Raised when constrained optimization is not supported."""


class NoValidPointRegisteredError(BayesianOptimizationError):
    """Raised when an acquisition function depends on previous points but none are registered."""


class TargetSpaceEmptyError(BayesianOptimizationError):
    """Raised when the target space is empty."""