Skip to main content

Adaptive Experimentation

Project description

Ax Logo

Build Status Build Status Build Status Build Status Build Status

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, a modern library for Bayesian optimization research built on PyTorch.

For full documentation and tutorials, see the Ax website

Why Ax?

  • Versatility: Ax supports different kinds of experiments, from dynamic ML-assisted A/B testing, to hyperparameter optimization in machine learning.
  • Customization: Ax makes it easy to add new modeling and decision algorithms, enabling research and development with minimal overhead.
  • Production-completeness: Ax comes with storage integration and ability to fully save and reload experiments.
  • Support for multi-modal and constrained experimentation: Ax allows for running and combining multiple experiments (e.g. simulation with a real-world "online" A/B test) and for constrained optimization (e.g. improving classification accuracy without signifant increase in resource-utilization).
  • Efficiency in high-noise setting: Ax offers state-of-the-art algorithms specifically geared to noisy experiments, such as simulations with reinforcement-learning agents.
  • Ease of use: Ax includes 3 different APIs that strike different balances between lightweight structure and flexibility. Using the most concise Loop API, a whole optimization can be done in just one function call. The Service API integrates easily with external schedulers. The most elaborate Developer API affords full algorithm customization and experiment introspection.

Getting Started

To run a simple optimization loop in Ax (using the Booth response surface as the artificial evaluation function):

>>> from ax import optimize
>>> best_parameters, best_values, experiment, model = optimize(
        parameters=[
          {
            "name": "x1",
            "type": "range",
            "bounds": [-10.0, 10.0],
          },
          {
            "name": "x2",
            "type": "range",
            "bounds": [-10.0, 10.0],
          },
        ],
        # Booth function
        evaluation_function=lambda p: p["x1"] + 2*p["x2"] - 7)**2 + (2*p["x1"] + p["x2"] - 5,
        minimize=True,
    )

# best_parameters contains {'x1': 1.02, 'x2': 2.97}; the global min is (1, 3)

Installation

Requirements

You need Python 3.6 or later to run Ax.

The required Python dependencies are:

  • botorch
  • jinja2
  • pandas
  • scipy
  • simplejson
  • sklearn
  • plotly >=2.2.1, <3.0

Installation via pip

We recommend installing Ax via pip. To do so, run:

pip3 install ax-platform

Recommendation for MacOS users: PyTorch is a required dependency of BoTorch, and can be automatically installed via pip. However, we recommend you install PyTorch manually before installing Ax, using the Anaconda package manager. Installing from Anaconda will link against MKL (a library that optimizes mathematical computation for Intel processors). This will result in up to an order-of-magnitude speed-up for Bayesian optimization, as at the moment, installing PyTorch from pip does not link against MKL.

Installing from source

To install from source:

  1. Make sure you have installed the botorch dependency.
  2. Download Ax from the Git repository.
  3. cd into the ax project and run:
pip3 install -e .

Note: When installing from source, Ax requires a compiler for Cython code.

Optional Dependencies

Depending on your intended use of Ax, you may want to install Ax with optional dependencies.

If using Ax in Jupyter notebooks:

pip3 install git+ssh://git@github.com/facebook/Ax.git#egg=Ax[notebook]

If storing Ax experiments via SQLAlchemy in MySQL or SQLite:

pip3 install git+ssh://git@github.com/facebook/Ax.git#egg=Ax[mysql]

Note that instead of installation from Git, you can also clone a local version of the repo and then pip install with desired flags from the root of the local repo, e.g.:

pip3 install -e .[mysql]

Join the Ax community

See the CONTRIBUTING file for how to help out. You will also need to install the dependencies needed for development, which are listed in DEV_REQUIRES in setup.py, as follows:

pip3 install git+ssh://git@github.com/facebook/Ax.git#egg=Ax[dev]

License

Ax is licensed under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

ax_platform-0.1.1-cp37-cp37m-manylinux1_x86_64.whl (982.1 kB view details)

Uploaded CPython 3.7m

ax_platform-0.1.1-cp37-cp37m-macosx_10_9_x86_64.whl (566.2 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

ax_platform-0.1.1-cp37-cp37m-macosx_10_6_intel.whl (773.0 kB view details)

Uploaded CPython 3.7m macOS 10.6+ intel

ax_platform-0.1.1-cp36-cp36m-manylinux1_x86_64.whl (983.6 kB view details)

Uploaded CPython 3.6m

ax_platform-0.1.1-cp36-cp36m-macosx_10_7_x86_64.whl (572.2 kB view details)

Uploaded CPython 3.6m macOS 10.7+ x86-64

File details

Details for the file ax_platform-0.1.1-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: ax_platform-0.1.1-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 982.1 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.8

File hashes

Hashes for ax_platform-0.1.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7f067f24f9abbdb4fb776c3561139fe6bc423697c440a41db88ccfba395ba4f8
MD5 13bd17b3ecf7f7f1048286e51ae74ef8
BLAKE2b-256 175b6b030416d815ebc88c2526b21bca2beb0e3f23acd2acbd41119d19cc4c52

See more details on using hashes here.

Provenance

File details

Details for the file ax_platform-0.1.1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: ax_platform-0.1.1-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 566.2 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.8

File hashes

Hashes for ax_platform-0.1.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f50c47133a48dd2c10f49064764d7ea66fc99a1c426ca6a027d5ece4f2b4213a
MD5 325560f3b650bc4f360d4f0e79b15475
BLAKE2b-256 5196d7e6e684d57fbec8d7a5918eeb194662090b8848361342a5e0a79978c411

See more details on using hashes here.

Provenance

File details

Details for the file ax_platform-0.1.1-cp37-cp37m-macosx_10_6_intel.whl.

File metadata

  • Download URL: ax_platform-0.1.1-cp37-cp37m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 773.0 kB
  • Tags: CPython 3.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.8

File hashes

Hashes for ax_platform-0.1.1-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 70057b9283f30026b16cca9dcb3d192a2d1741dd5d2996c3723ba36736c9ca5b
MD5 48a395198f094aa82a1afc7db9ee0df0
BLAKE2b-256 b9348cddb13e587a25ca4bd0deffbfa7aafe80d674cda83b364aef005f4a6afb

See more details on using hashes here.

Provenance

File details

Details for the file ax_platform-0.1.1-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: ax_platform-0.1.1-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 983.6 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.8

File hashes

Hashes for ax_platform-0.1.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 225c31847dfe7c5f9573ac94253c6ae5d7c3d6defcef98d6e1273b7e8f60efcb
MD5 87d6f7feba061f8487c9c396454ca82b
BLAKE2b-256 1e61ca93956931aa68b5ebb7855edfcd018600a0bf83e54e8df54b92a64b0092

See more details on using hashes here.

Provenance

File details

Details for the file ax_platform-0.1.1-cp36-cp36m-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: ax_platform-0.1.1-cp36-cp36m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 572.2 kB
  • Tags: CPython 3.6m, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.8

File hashes

Hashes for ax_platform-0.1.1-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 00bbca8963ec7d0eebc033aca0667df3f7c13c40bb38a439ad298ec015db6c26
MD5 c416746d8c157f3d7fe7a24092798c8c
BLAKE2b-256 d403b0e865886f029644a040c058446f683a2041f2fc451db843a6281223608e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page