ax-platform


Nameax-platform JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/facebook/Ax
SummaryAdaptive Experimentation
upload_time2025-08-12 18:55:15
maintainerNone
docs_urlNone
authorFacebook, Inc.
requires_python>=3.10
licenseMIT
keywords experimentation optimization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <img width="300" src="https://ax.dev/img/ax_logo_lockup.svg" alt="Ax Logo" />

<hr/>

[![Support Ukraine](https://img.shields.io/badge/Support-Ukraine-FFD500?style=flat&labelColor=005BBB)](https://opensource.fb.com/support-ukraine)
[![Build Status](https://img.shields.io/pypi/v/ax-platform.svg)](https://pypi.org/project/ax-platform/)
[![Build Status](https://img.shields.io/pypi/pyversions/ax-platform.svg)](https://pypi.org/project/ax-platform/)
[![Build Status](https://img.shields.io/pypi/wheel/ax-platform.svg)](https://pypi.org/project/ax-platform/)
[![Build Status](https://github.com/facebook/Ax/workflows/Build%20and%20Test%20Workflow/badge.svg)](https://github.com/facebook/Ax/actions?query=workflow%3A%22Build+and+Test+Workflow%22)
[![codecov](https://codecov.io/gh/facebook/Ax/branch/main/graph/badge.svg)](https://codecov.io/gh/facebook/Ax)
[![Build Status](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)

Ax is an accessible, general-purpose platform for understanding, managing,
deploying, and automating adaptive experiments.

Adaptive experimentation is the machine-learning guided process of iteratively
exploring a (possibly infinite) parameter space in order to identify optimal
configurations in a resource-efficient manner. Ax currently supports Bayesian
optimization and bandit optimization as exploration strategies. Bayesian
optimization in Ax is powered by
[BoTorch](https://github.com/facebookexternal/botorch), a modern library for
Bayesian optimization research built on PyTorch.

For full documentation and tutorials, see the [Ax website](https://ax.dev)

## Why Ax?

- **Expressive API**: Ax has an expressive API that can address many real-world
  optimization tasks. It handles complex search spaces, multiple objectives,
  constraints on both parameters and outcomes, and noisy observations. It
  supports suggesting multiple designs to evaluate in parallel (both
  synchronously and asynchronously) and the ability to early-stop evaluations.

- **Strong performance out of the box**: Ax abstracts away optimization details
  that are important but obscure, providing sensible defaults and enabling
  practitioners to leverage advanced techniques otherwise only accessible to
  optimization experts.

- **State-of-the-art methods**: Ax leverages state-of-the-art Bayesian
  optimization algorithms implemented in [BoTorch](https://botorch.org/), to
  deliver strong performance across a variety of problem classes.

- **Flexible:** Ax is highly configurable, allowing researchers to plug in novel
  optimization algorithms, models, and experimentation flows.

- **Production ready:** Ax offers automation and orchestration features as well
  as robust error handling for real-world deployment at scale.

## Getting Started

To run a simple optimization loop in Ax (using the
[Booth response surface](https://www.sfu.ca/~ssurjano/booth.html) as the
artificial evaluation function):

```python
>>> from ax import Client, RangeParameterConfig

>>> client = Client()
>>> client.configure_experiment(
      parameters=[
          RangeParameterConfig(
              name="x1",
              bounds=(-10.0, 10.0),
              parameter_type=ParameterType.FLOAT,
          ),
          RangeParameterConfig(
              name="x2",
              bounds=(-10.0, 10.0),
              parameter_type=ParameterType.FLOAT,
          ),
      ],
)
>>> client.configure_optimization(objective="-1 * booth")

>>> for _ in range(20):
>>>     for trial_index, parameters in client.get_next_trials(max_trials=1).items():
>>>         client.complete_trial(
>>>             trial_index=trial_index,
>>>             raw_data={
>>>                 "booth": (parameters["x1"] + 2 * parameters["x2"] - 7) ** 2
>>>                 + (2 * parameters["x1"] + parameters["x2"] - 5) ** 2
>>>             },
>>>         )

>>> client.get_best_parameterization()
```

## Installation

Ax requires Python 3.10 or newer. A full list of Ax's direct dependencies can be
found in [setup.py](https://github.com/facebook/Ax/blob/main/setup.py).

We recommend installing Ax via pip, even if using Conda environment:

```shell
pip install ax-platform
```

Installation will use Python wheels from PyPI, available for
[OSX, Linux, and Windows](https://pypi.org/project/ax-platform/#files).

_Note_: Make sure the `pip` being used to install `ax-platform` is actually the
one from the newly created Conda environment. If you're using a Unix-based OS,
you can use `which pip` to check.

### Installing with Extras

Ax can be installed with additional dependencies, which are not included in the
default installation. For example, in order to use Ax within a Jupyter notebook,
install Ax with the `notebook` extra:

```shell
pip install "ax-platform[notebook]"
```

Extras for using Ax with MySQL storage (`mysql`), for running Ax's tutorial's
locally (`tutorials`), and for installing all dependencies necessary for
developing Ax (`dev`) are also available.

## Install Ax from source

You can install the latest (bleeding edge) version from GitHub using `pip`.

The bleeding edge for Ax depends on bleeding edge versions of BoTorch and
GPyTorch. We therefore recommend installing those from Github, as well as
setting the following environment variables to allow the Ax to use the latest
version of both BoTorch and GPyTorch.

```shell
export ALLOW_LATEST_GPYTORCH_LINOP=true
export ALLOW_BOTORCH_LATEST=true

pip install git+https://github.com/cornellius-gp/gpytorch.git
pip install git+https://github.com/pytorch/botorch.git

pip install 'git+https://github.com/facebook/Ax.git#egg=ax-platform'
```

## Join the Ax Community

### Getting help

Please open an issue on our [issues page](https://github.com/facebook/Ax/issues)
with any questions, feature requests or bug reports! If posting a bug report,
please include a minimal reproducible example (as a code snippet) that we can
use to reproduce and debug the problem you encountered.

### Contributing

See the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out.

When contributing to Ax, we recommend cloning the
[repository](https://github.com/facebook/Ax) and installing all optional
dependencies:

```
pip install git+https://github.com/cornellius-gp/linear_operator.git
pip install git+https://github.com/cornellius-gp/gpytorch.git
export ALLOW_LATEST_GPYTORCH_LINOP=true
pip install git+https://github.com/pytorch/botorch.git
export ALLOW_BOTORCH_LATEST=true
git clone https://github.com/facebook/ax.git --depth 1
cd ax
pip install -e .[tutorial]
```

See recommendation for installing PyTorch for MacOS users above.

The above example limits the cloned directory size via the
[`--depth`](https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---depthltdepthgt)
argument to `git clone`. If you require the entire commit history you may remove
this argument.

## License

Ax is licensed under the [MIT license](./LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/facebook/Ax",
    "name": "ax-platform",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "Experimentation, Optimization",
    "author": "Facebook, Inc.",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/17/64/2989f4041e97287d890e33731d2b6443800e88933d705722e3356676c79d/ax_platform-1.1.0.tar.gz",
    "platform": null,
    "description": "<img width=\"300\" src=\"https://ax.dev/img/ax_logo_lockup.svg\" alt=\"Ax Logo\" />\n\n<hr/>\n\n[![Support Ukraine](https://img.shields.io/badge/Support-Ukraine-FFD500?style=flat&labelColor=005BBB)](https://opensource.fb.com/support-ukraine)\n[![Build Status](https://img.shields.io/pypi/v/ax-platform.svg)](https://pypi.org/project/ax-platform/)\n[![Build Status](https://img.shields.io/pypi/pyversions/ax-platform.svg)](https://pypi.org/project/ax-platform/)\n[![Build Status](https://img.shields.io/pypi/wheel/ax-platform.svg)](https://pypi.org/project/ax-platform/)\n[![Build Status](https://github.com/facebook/Ax/workflows/Build%20and%20Test%20Workflow/badge.svg)](https://github.com/facebook/Ax/actions?query=workflow%3A%22Build+and+Test+Workflow%22)\n[![codecov](https://codecov.io/gh/facebook/Ax/branch/main/graph/badge.svg)](https://codecov.io/gh/facebook/Ax)\n[![Build Status](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)\n\nAx is an accessible, general-purpose platform for understanding, managing,\ndeploying, and automating adaptive experiments.\n\nAdaptive experimentation is the machine-learning guided process of iteratively\nexploring a (possibly infinite) parameter space in order to identify optimal\nconfigurations in a resource-efficient manner. Ax currently supports Bayesian\noptimization and bandit optimization as exploration strategies. Bayesian\noptimization in Ax is powered by\n[BoTorch](https://github.com/facebookexternal/botorch), a modern library for\nBayesian optimization research built on PyTorch.\n\nFor full documentation and tutorials, see the [Ax website](https://ax.dev)\n\n## Why Ax?\n\n- **Expressive API**: Ax has an expressive API that can address many real-world\n  optimization tasks. It handles complex search spaces, multiple objectives,\n  constraints on both parameters and outcomes, and noisy observations. It\n  supports suggesting multiple designs to evaluate in parallel (both\n  synchronously and asynchronously) and the ability to early-stop evaluations.\n\n- **Strong performance out of the box**: Ax abstracts away optimization details\n  that are important but obscure, providing sensible defaults and enabling\n  practitioners to leverage advanced techniques otherwise only accessible to\n  optimization experts.\n\n- **State-of-the-art methods**: Ax leverages state-of-the-art Bayesian\n  optimization algorithms implemented in [BoTorch](https://botorch.org/), to\n  deliver strong performance across a variety of problem classes.\n\n- **Flexible:** Ax is highly configurable, allowing researchers to plug in novel\n  optimization algorithms, models, and experimentation flows.\n\n- **Production ready:** Ax offers automation and orchestration features as well\n  as robust error handling for real-world deployment at scale.\n\n## Getting Started\n\nTo run a simple optimization loop in Ax (using the\n[Booth response surface](https://www.sfu.ca/~ssurjano/booth.html) as the\nartificial evaluation function):\n\n```python\n>>> from ax import Client, RangeParameterConfig\n\n>>> client = Client()\n>>> client.configure_experiment(\n      parameters=[\n          RangeParameterConfig(\n              name=\"x1\",\n              bounds=(-10.0, 10.0),\n              parameter_type=ParameterType.FLOAT,\n          ),\n          RangeParameterConfig(\n              name=\"x2\",\n              bounds=(-10.0, 10.0),\n              parameter_type=ParameterType.FLOAT,\n          ),\n      ],\n)\n>>> client.configure_optimization(objective=\"-1 * booth\")\n\n>>> for _ in range(20):\n>>>     for trial_index, parameters in client.get_next_trials(max_trials=1).items():\n>>>         client.complete_trial(\n>>>             trial_index=trial_index,\n>>>             raw_data={\n>>>                 \"booth\": (parameters[\"x1\"] + 2 * parameters[\"x2\"] - 7) ** 2\n>>>                 + (2 * parameters[\"x1\"] + parameters[\"x2\"] - 5) ** 2\n>>>             },\n>>>         )\n\n>>> client.get_best_parameterization()\n```\n\n## Installation\n\nAx requires Python 3.10 or newer. A full list of Ax's direct dependencies can be\nfound in [setup.py](https://github.com/facebook/Ax/blob/main/setup.py).\n\nWe recommend installing Ax via pip, even if using Conda environment:\n\n```shell\npip install ax-platform\n```\n\nInstallation will use Python wheels from PyPI, available for\n[OSX, Linux, and Windows](https://pypi.org/project/ax-platform/#files).\n\n_Note_: Make sure the `pip` being used to install `ax-platform` is actually the\none from the newly created Conda environment. If you're using a Unix-based OS,\nyou can use `which pip` to check.\n\n### Installing with Extras\n\nAx can be installed with additional dependencies, which are not included in the\ndefault installation. For example, in order to use Ax within a Jupyter notebook,\ninstall Ax with the `notebook` extra:\n\n```shell\npip install \"ax-platform[notebook]\"\n```\n\nExtras for using Ax with MySQL storage (`mysql`), for running Ax's tutorial's\nlocally (`tutorials`), and for installing all dependencies necessary for\ndeveloping Ax (`dev`) are also available.\n\n## Install Ax from source\n\nYou can install the latest (bleeding edge) version from GitHub using `pip`.\n\nThe bleeding edge for Ax depends on bleeding edge versions of BoTorch and\nGPyTorch. We therefore recommend installing those from Github, as well as\nsetting the following environment variables to allow the Ax to use the latest\nversion of both BoTorch and GPyTorch.\n\n```shell\nexport ALLOW_LATEST_GPYTORCH_LINOP=true\nexport ALLOW_BOTORCH_LATEST=true\n\npip install git+https://github.com/cornellius-gp/gpytorch.git\npip install git+https://github.com/pytorch/botorch.git\n\npip install 'git+https://github.com/facebook/Ax.git#egg=ax-platform'\n```\n\n## Join the Ax Community\n\n### Getting help\n\nPlease open an issue on our [issues page](https://github.com/facebook/Ax/issues)\nwith any questions, feature requests or bug reports! If posting a bug report,\nplease include a minimal reproducible example (as a code snippet) that we can\nuse to reproduce and debug the problem you encountered.\n\n### Contributing\n\nSee the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out.\n\nWhen contributing to Ax, we recommend cloning the\n[repository](https://github.com/facebook/Ax) and installing all optional\ndependencies:\n\n```\npip install git+https://github.com/cornellius-gp/linear_operator.git\npip install git+https://github.com/cornellius-gp/gpytorch.git\nexport ALLOW_LATEST_GPYTORCH_LINOP=true\npip install git+https://github.com/pytorch/botorch.git\nexport ALLOW_BOTORCH_LATEST=true\ngit clone https://github.com/facebook/ax.git --depth 1\ncd ax\npip install -e .[tutorial]\n```\n\nSee recommendation for installing PyTorch for MacOS users above.\n\nThe above example limits the cloned directory size via the\n[`--depth`](https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---depthltdepthgt)\nargument to `git clone`. If you require the entire commit history you may remove\nthis argument.\n\n## License\n\nAx is licensed under the [MIT license](./LICENSE).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Adaptive Experimentation",
    "version": "1.1.0",
    "project_urls": {
        "Homepage": "https://github.com/facebook/Ax"
    },
    "split_keywords": [
        "experimentation",
        " optimization"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ef131a5b603c53b1d5a6735eb3fad0bdf8d19b841c3eadbe7cfaf583c3e671a8",
                "md5": "69967a4e652d2743f1b0b48933db8ac8",
                "sha256": "6a38e261ba86a68fa44e4a8bd7146b1e0872c5c4bc1c4645572ca924542f5b96"
            },
            "downloads": -1,
            "filename": "ax_platform-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "69967a4e652d2743f1b0b48933db8ac8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 1539804,
            "upload_time": "2025-08-12T18:55:13",
            "upload_time_iso_8601": "2025-08-12T18:55:13.319639Z",
            "url": "https://files.pythonhosted.org/packages/ef/13/1a5b603c53b1d5a6735eb3fad0bdf8d19b841c3eadbe7cfaf583c3e671a8/ax_platform-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "17642989f4041e97287d890e33731d2b6443800e88933d705722e3356676c79d",
                "md5": "576f833796da60cfaca5bb2313202b06",
                "sha256": "3c9a268acc68a70167c6a003686137ebcb6ec745a444d972d400b2d3f170e2b2"
            },
            "downloads": -1,
            "filename": "ax_platform-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "576f833796da60cfaca5bb2313202b06",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 28500747,
            "upload_time": "2025-08-12T18:55:15",
            "upload_time_iso_8601": "2025-08-12T18:55:15.458365Z",
            "url": "https://files.pythonhosted.org/packages/17/64/2989f4041e97287d890e33731d2b6443800e88933d705722e3356676c79d/ax_platform-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-12 18:55:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "facebook",
    "github_project": "Ax",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ax-platform"
}
        
Elapsed time: 2.26585s