ax.preview

A preview of future Ax API

Configs

class ax.preview.api.configs.ChoiceParameterConfig(name: str, values: List[float] | List[int] | List[str] | List[bool], parameter_type: ParameterType, is_ordered: bool | None = None, dependent_parameters: dict[float | int | str | bool, str] | None = None)[source]

Bases: object

ChoiceParameterConfig allows users to specify the a discrete dimension of an experiment’s search space and will internally validate the inputs.

dependent_parameters: dict[float | int | str | bool, str] | None = None
is_ordered: bool | None = None
name: str
parameter_type: ParameterType
values: List[float] | List[int] | List[str] | List[bool]
class ax.preview.api.configs.DatabaseConfig(url: str)[source]

Bases: object

url: str
class ax.preview.api.configs.ExperimentConfig(name: str, parameters: list[~ax.preview.api.configs.RangeParameterConfig | ~ax.preview.api.configs.ChoiceParameterConfig], parameter_constraints: list[str] = <factory>, description: str | None = None, owner: str | None = None)[source]

Bases: object

ExperimentConfig allows users to specify the SearchSpace and OptimizationConfig of an Experiment and validates their inputs jointly.

This will also be the construct that handles transforming string-based inputs (the objective, parameter constraints, and output constraints) into their corresponding Ax class using SymPy.

description: str | None = None
name: str
owner: str | None = None
parameter_constraints: list[str]
parameters: list[RangeParameterConfig | ChoiceParameterConfig]
class ax.preview.api.configs.GenerationStrategyConfig(num_trials: int | None = None, num_initialization_trials: int | None = None, maximum_parallelism: int | None = None)[source]

Bases: object

maximum_parallelism: int | None = None
num_initialization_trials: int | None = None
num_trials: int | None = None
class ax.preview.api.configs.OrchestrationConfig(parallelism: int = 1, tolerated_trial_failure_rate: float = 0.5, seconds_between_polls: float = 1.0)[source]

Bases: object

parallelism: int = 1
seconds_between_polls: float = 1.0
tolerated_trial_failure_rate: float = 0.5
class ax.preview.api.configs.ParameterScaling(value)[source]

Bases: Enum

The ParameterScaling enum allows users to specify which scaling to apply during candidate generation. This is useful for parameters that should not be explored on the same scale, such as learning rates and batch sizes.

LINEAR = 'linear'
LOG = 'log'
class ax.preview.api.configs.ParameterType(value)[source]

Bases: Enum

The ParameterType enum allows users to specify the type of a parameter.

BOOL = 'bool'
FLOAT = 'float'
INT = 'int'
STRING = 'str'
class ax.preview.api.configs.RangeParameterConfig(name: str, bounds: tuple[float, float], parameter_type: ParameterType, step_size: float | None = None, scaling: ParameterScaling | None = None)[source]

Bases: object

RangeParameterConfig allows users to specify the a continuous dimension of an experiment’s search space and will internally validate the inputs.

bounds: tuple[float, float]
name: str
parameter_type: ParameterType
scaling: ParameterScaling | None = None
step_size: float | None = None