ax.exceptions¶

ax.exceptions.core module¶

exception ax.exceptions.core.AxError(message, hint='')[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.ExperimentNotReadyError(message, hint='')[source]

Raised when failing to query data due to immature experiment.

Useful to distinguish data failure reasons in automated analyses.

exception ax.exceptions.core.NoDataError(message, hint='')[source]

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.UnsupportedError(message, hint='')[source]

Raised when an unsupported request is made.

UnsupportedError may seem similar to NotImplementedError (NIE). It differs in the following ways:

1. UnsupportedError is not used for abstract methods, which
is the official NIE use case.
2. UnsupportedError indicates an intentional and permanent lack of support.
It should not be used for TODO (another common use case of NIE).

ax.exceptions.data_provider module¶

exception ax.exceptions.data_provider.DataProviderError(message, data_provider, data_provider_error)[source]

Bases: Exception

Base Exception for Ax DataProviders.

The type of the driver 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.

ax.exceptions.model module¶

exception ax.exceptions.model.ModelError(message, hint='')[source]

Raised when an error occurs during modeling.

ax.exceptions.storage module¶

exception ax.exceptions.storage.ImmutabilityError(message, hint='')[source]

Raised when an attempt is made to update an immutable object.

exception ax.exceptions.storage.JSONDecodeError(message, hint='')[source]

Raised when an error occurs during JSON decoding.

exception ax.exceptions.storage.JSONEncodeError(message, hint='')[source]

Raised when an error occurs during JSON encoding.

exception ax.exceptions.storage.SQADecodeError(message, hint='')[source]

Raised when an error occurs during SQA decoding.

exception ax.exceptions.storage.SQAEncodeError(message, hint='')[source]

Raised when an error occurs during SQA encoding.