{"id":13586372,"url":"https://github.com/facebook/Ax","last_synced_at":"2025-04-07T15:31:52.914Z","repository":{"id":37396624,"uuid":"169880381","full_name":"facebook/Ax","owner":"facebook","description":"Adaptive Experimentation Platform","archived":false,"fork":false,"pushed_at":"2024-10-29T07:23:57.000Z","size":665157,"stargazers_count":2373,"open_issues_count":69,"forks_count":310,"subscribers_count":69,"default_branch":"main","last_synced_at":"2024-10-29T14:50:02.533Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://ax.dev","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/facebook.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-02-09T15:23:44.000Z","updated_at":"2024-10-29T10:09:42.000Z","dependencies_parsed_at":"2023-10-13T07:27:46.859Z","dependency_job_id":"d150cbad-8ad7-4f6f-a606-23e8d373d11e","html_url":"https://github.com/facebook/Ax","commit_stats":{"total_commits":2848,"total_committers":187,"mean_commits":"15.229946524064172","dds":0.8441011235955056,"last_synced_commit":"cd56b882b74409bf756bd4a50ffd7f7e1249bb39"},"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facebook%2FAx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facebook%2FAx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facebook%2FAx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facebook%2FAx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/facebook","download_url":"https://codeload.github.com/facebook/Ax/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223016387,"owners_count":17074037,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:05:31.276Z","updated_at":"2024-11-06T04:31:55.874Z","avatar_url":"https://github.com/facebook.png","language":"Python","readme":"\u003cimg width=\"300\" src=\"https://ax.dev/img/ax_logo_lockup.svg\" alt=\"Ax Logo\" /\u003e\n\n\u003chr/\u003e\n\n[![Support Ukraine](https://img.shields.io/badge/Support-Ukraine-FFD500?style=flat\u0026labelColor=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- **Versatility**: Ax supports different kinds of experiments, from dynamic\n  ML-assisted A/B testing, to hyperparameter optimization in machine learning.\n- **Customization**: Ax makes it easy to add new modeling and decision\n  algorithms, enabling research and development with minimal overhead.\n- **Production-completeness**: Ax comes with storage integration and ability to\n  fully save and reload experiments.\n- **Support for multi-modal and constrained experimentation**: Ax allows for\n  running and combining multiple experiments (e.g. simulation with a real-world\n  \"online\" A/B test) and for constrained optimization (e.g. improving\n  classification accuracy without significant increase in resource-utilization).\n- **Efficiency in high-noise setting**: Ax offers state-of-the-art algorithms\n  specifically geared to noisy experiments, such as simulations with\n  reinforcement-learning agents.\n- **Ease of use**: Ax includes 3 different APIs that strike different balances\n  between lightweight structure and flexibility. The Service API (recommended\n  for the vast majority of use-cases) provides an extensive, robust, and\n  easy-to-use interface to Ax; the Loop API enables particularly concise usage;\n  and the Developer API enables advanced experimental and methodological\n  control.\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\u003e\u003e\u003e from ax import optimize\n\u003e\u003e\u003e best_parameters, best_values, experiment, model = optimize(\n        parameters=[\n          {\n            \"name\": \"x1\",\n            \"type\": \"range\",\n            \"bounds\": [-10.0, 10.0],\n          },\n          {\n            \"name\": \"x2\",\n            \"type\": \"range\",\n            \"bounds\": [-10.0, 10.0],\n          },\n        ],\n        # Booth function\n        evaluation_function=lambda p: (p[\"x1\"] + 2*p[\"x2\"] - 7)**2 + (2*p[\"x1\"] + p[\"x2\"] - 5)**2,\n        minimize=True,\n    )\n\n# best_parameters contains {'x1': 1.02, 'x2': 2.97}; the global min is (1, 3)\n```\n\n## Installation\n\n### Requirements\n\nYou need Python 3.10 or later to run Ax.\n\nThe required Python dependencies are:\n\n- [botorch](https://www.botorch.org)\n- jinja2\n- pandas\n- scipy\n- sklearn\n- plotly \u003e=2.2.1\n\n### Stable Version\n\n#### Installing via pip\n\nWe recommend installing Ax via pip (even if using Conda environment):\n\n```\nconda install pytorch torchvision -c pytorch  # OSX only (details below)\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_Recommendation for MacOS users_: PyTorch is a required dependency of BoTorch,\nand can be automatically installed via pip. However, **we recommend you\n[install PyTorch manually](https://pytorch.org/get-started/locally/#anaconda-1)\nbefore installing Ax, using the Anaconda package manager**. Installing from\nAnaconda will link against MKL (a library that optimizes mathematical\ncomputation for Intel processors). This will result in up to an\norder-of-magnitude speed-up for Bayesian optimization, as at the moment,\ninstalling PyTorch from pip does not link against MKL.\n\nIf you need CUDA on MacOS, you will need to build PyTorch from source. Please\nconsult the PyTorch installation instructions above.\n\n#### Optional Dependencies\n\nTo use Ax with a notebook environment, you will need Jupyter. Install it first:\n\n```\npip install jupyter\n```\n\nIf you want to store the experiments in MySQL, you will need SQLAlchemy:\n\n```\npip install SQLAlchemy\n```\n\n### Latest Version\n\n#### Installing from Git\n\nYou can install the latest (bleeding edge) version from Git.\n\nFirst, see recommendation for installing PyTorch for MacOS users above.\n\nAt times, the bleeding edge for Ax can depend on bleeding edge versions of\nBoTorch (or GPyTorch). We therefore recommend installing those from Git as well:\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\npip install git+https://github.com/facebook/Ax.git#egg=ax-platform\n```\n\n#### Optional Dependencies\n\nIf using Ax in Jupyter notebooks:\n\n```\npip install git+https://github.com/facebook/Ax.git#egg=ax-platform[notebook]\n```\n\nTo support plotly-based plotting in newer Jupyter notebook versions\n\n```\npip install \"notebook\u003e=5.3\" \"ipywidgets==7.5\"\n```\n\n[See Plotly repo's README](https://github.com/plotly/plotly.py#jupyter-notebook-support)\nfor details and JupyterLab instructions.\n\nIf storing Ax experiments via SQLAlchemy in MySQL or SQLite:\n\n```\npip install git+https://github.com/facebook/Ax.git#egg=ax-platform[mysql]\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","funding_links":[],"categories":["Python","Experimentation","Pytorch \u0026 related libraries｜Pytorch \u0026 相关库","Pytorch \u0026 related libraries","超参数优化和AutoML","Jupyter Notebook","参数优化","\u003ca id=\"tools\"\u003e\u003c/a\u003e🛠️ Tools","AutoML","Machine Learning Framework"],"sub_categories":["Synthetic Data","Other libraries｜其他库:","Other libraries:","Data Management","Experiment Management","NLP"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffacebook%2FAx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffacebook%2FAx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffacebook%2FAx/lists"}