ax.exceptions¶
Constants¶
Core¶
-
exception
ax.exceptions.core.
AxError
(message: str, hint: str = '')[source]¶ Bases:
Exception
Base Ax exception.
All exceptions derived from AxError need to define a custom error message. Additionally, exceptions can define a hint property that provides additional guidance as to how to remedy the error.
-
exception
ax.exceptions.core.
AxWarning
(message: str, hint: str = '')[source]¶ Bases:
Warning
Base Ax warning.
All warnings derived from AxWarning need to define a custom warning message. Additionally, warnings can define a hint property that provides additional guidance as to how to remedy the warning.
-
exception
ax.exceptions.core.
DataRequiredError
(message: str, hint: str = '')[source]¶ Bases:
ax.exceptions.core.AxError
Raised when more observed data is needed by the model to continue the optimization.
Useful to distinguish when user needs to wait to request more trials until more data is available.
-
exception
ax.exceptions.core.
ExperimentNotReadyError
(message: str, hint: str = '', exposures_unavailable: bool = False)[source]¶ Bases:
ax.exceptions.core.AxError
Raised when failing to query data due to immature experiment.
Useful to distinguish data failure reasons in automated analyses.
-
exception
ax.exceptions.core.
MisconfiguredExperiment
(message: str, hint: str = '')[source]¶ Bases:
ax.exceptions.core.AxError
Raised when experiment has incomplete or incorrect information.
-
exception
ax.exceptions.core.
NoDataError
(message: str, hint: str = '')[source]¶ Bases:
ax.exceptions.core.AxError
Raised when no data is found for experiment in underlying data store.
Useful to distinguish data failure reasons in automated analyses.
-
exception
ax.exceptions.core.
OptimizationComplete
(message: str)[source]¶ Bases:
ax.exceptions.core.AxError
Raised when you hit SearchSpaceExhausted and GenerationStrategyComplete.
-
exception
ax.exceptions.core.
SearchSpaceExhausted
(message: str)[source]¶ Bases:
ax.exceptions.core.OptimizationComplete
Raised when using an algorithm that deduplicates points and no more new points can be sampled from the search space.
-
exception
ax.exceptions.core.
UnsupportedError
(message: str, hint: str = '')[source]¶ Bases:
ax.exceptions.core.AxError
Raised when an unsupported request is made.
UnsupportedError may seem similar to NotImplementedError (NIE). It differs in the following ways:
- UnsupportedError is not used for abstract methods, which
is the official NIE use case.
- UnsupportedError indicates an intentional and permanent lack of support.
It should not be used for TODO (another common use case of NIE).
-
exception
ax.exceptions.core.
UnsupportedPlotError
(message: str)[source]¶ Bases:
ax.exceptions.core.AxError
Raised when plotting functionality is not supported for the given configurations.
-
exception
ax.exceptions.core.
UserInputError
(message: str, hint: str = '')[source]¶ Bases:
ax.exceptions.core.AxError
Raised when the user passes in an invalid input
Data¶
-
exception
ax.exceptions.data_provider.
DataProviderError
(message: str, data_provider: str, data_provider_error: Any)[source]¶ Bases:
Exception
Base Exception for Ax DataProviders.
The type of the data provider must be included. The raw error is stored in the data_provider_error section, and an Ax-friendly message is stored as the actual error message.
Generation Strategy¶
-
exception
ax.exceptions.generation_strategy.
GenerationStrategyCompleted
(message: str)[source]¶ Bases:
ax.exceptions.core.OptimizationComplete
Special exception indicating that the generation strategy has been completed.
-
exception
ax.exceptions.generation_strategy.
GenerationStrategyRepeatedPoints
(message: str)[source]¶ Bases:
ax.exceptions.generation_strategy.GenerationStrategyCompleted
Special exception indicating that the generation strategy is repeatedly suggesting previously sampled points.
-
exception
ax.exceptions.generation_strategy.
MaxParallelismReachedException
(step_index: int, model_name: str, num_running: int)[source]¶ Bases:
ax.exceptions.core.AxError
Special exception indicating that maximum number of trials running in parallel set on a given step (as GenerationStep.max_parallelism) has been reached. Upon getting this exception, users should wait until more trials are completed with data, to generate new trials.
Model¶
-
exception
ax.exceptions.model.
CVNotSupportedError
(message: str, hint: str = '')[source]¶ Bases:
ax.exceptions.core.AxError
Raised when cross validation is applied to a model which doesn’t support it.
-
exception
ax.exceptions.model.
ModelError
(message: str, hint: str = '')[source]¶ Bases:
ax.exceptions.core.AxError
Raised when an error occurs during modeling.
Storage¶
-
exception
ax.exceptions.storage.
ImmutabilityError
(message: str, hint: str = '')[source]¶ Bases:
ax.exceptions.core.AxError
Raised when an attempt is made to update an immutable object.
-
exception
ax.exceptions.storage.
IncorrectDBConfigurationError
(message: str, hint: str = '')[source]¶ Bases:
ax.exceptions.core.AxError
Raised when an attempt is made to save and load an object, but the current engine and session factory is setup up incorrectly to process the call (e.g. current session factory will connect to a wrong database for the call).
-
exception
ax.exceptions.storage.
JSONDecodeError
(message: str, hint: str = '')[source]¶ Bases:
ax.exceptions.core.AxError
Raised when an error occurs during JSON decoding.
-
exception
ax.exceptions.storage.
JSONEncodeError
(message: str, hint: str = '')[source]¶ Bases:
ax.exceptions.core.AxError
Raised when an error occurs during JSON encoding.
-
exception
ax.exceptions.storage.
SQADecodeError
(message: str, hint: str = '')[source]¶ Bases:
ax.exceptions.core.AxError
Raised when an error occurs during SQA decoding.
-
exception
ax.exceptions.storage.
SQAEncodeError
(message: str, hint: str = '')[source]¶ Bases:
ax.exceptions.core.AxError
Raised when an error occurs during SQA encoding.