Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
fbshipit-source-id: 9e3285c6d741847d4e904454fed75aeed5396c38
  • Loading branch information
facebook-github-bot committed May 1, 2019
0 parents commit f458275
Show file tree
Hide file tree
Showing 354 changed files with 60,116 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[flake8]

# E704: the linter doesn't parse types properly
# T499, T484: silence mypy since using pyre for typechecking
# W503: black and flake8 disagree on how to place operators
# E231: black and flake8 disagree on whitespace after ','
# E203: black and flake8 disagree on whitespace before ':'
ignore = T484, T499, W503, E704, E231, E203

# Black really wants lines to be 88 chars...
max-line-length = 88
152 changes: 152 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@

# Created by https://www.gitignore.io/api/python
# Edit at https://www.gitignore.io/?templates=python

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
.DS_Store

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

### Python Patch ###
.venv/

# End of https://www.gitignore.io/api/python

# Cython
ax/utils/stats/sobol.c*

# Sphinx documentation
sphinx/build/

# Docusaurus site
website/yarn.lock
website/build/
website/i18n/
website/node_modules/

## Generated for tutorials
website/_tutorials/
website/static/files/
website/pages/tutorials/*
!website/pages/tutorials/index.js

## Generated for Sphinx
website/pages/api/
website/static/js/*
!website/static/js/mathjax.js
!website/static/js/plotUtils.js
!website/static/js/plots/*
website/static/_sphinx-sources/
69 changes: 69 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
language: python

python:
- 3.6

before_install:
# decrypting ssh key to be able to access private botorch repo
- openssl aes-256-cbc -K $encrypted_39ecd60da1dc_key -iv $encrypted_39ecd60da1dc_iv -in botorch_key.enc -out botorch_key -d
- chmod 600 botorch_key
- eval "$(ssh-agent -s)"
- ssh-add botorch_key

matrix:
include:
- name: "Tests: Python 3.6"
python: "3.6"
install:
- pip install cython numpy
# TODO: Remove once GPyTorch 0.3.2 is released and marked a dep. of botorch
- pip install -q git+https://github.com/cornellius-gp/gpytorch.git@32911e3b51901917c0f14101972581c1295b5edb
# TODO: Remove once PyTorch 1.1 is released and marked a dep. of botorch
- pip install -q torch_nightly -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
- pip install git+ssh://git@github.com/pytorch/botorch.git
- pip install -q -e .[dev,mysql,notebook]
script:
- pytest -ra
- name: "Tests: Python 3.7"
# Enable Python 3.7 w/o without globally enabling sudo and xenial dist
# See https://github.com/travis-ci/travis-ci/issues/9815
python: "3.7"
dist: xenial
install:
- pip install cython numpy
# TODO: Remove once GPyTorch 0.3.2 is released and marked a dep. of botorch
- pip install -q git+https://github.com/cornellius-gp/gpytorch.git@32911e3b51901917c0f14101972581c1295b5edb
# TODO: Remove once PyTorch 1.1 is released and marked a dep. of botorch
- pip install -q torch_nightly -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
- pip install git+ssh://git@github.com/pytorch/botorch.git
- pip install -q -e .[dev,mysql,notebook]
script:
- pytest -ra
- name: "Lint: black (Python 3.6)"
python: "3.6"
install:
- pip install black
script:
- black --check --diff .
- name: "Lint: flake8 (Python 3.6)"
python: "3.6"
install:
- pip install flake8
script:
# don't use .flake8 config for now, since don't need custom plugin
- flake8 --isolated --ignore=T484,T499,W503,E704,E231,E203 --max-line-length=88
- name: "Docs: Sphinx (Python 3.6)"
python: "3.6"
install:
- pip install cython numpy
# TODO: Remove once GPyTorch 0.3.2 is released and marked a dep. of botorch
- pip install -q git+https://github.com/cornellius-gp/gpytorch.git@32911e3b51901917c0f14101972581c1295b5edb
# TODO: Remove once PyTorch 1.1 is released and marked a dep. of botorch
- pip install -q torch_nightly -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
- pip install git+ssh://git@github.com/pytorch/botorch.git
- pip install -q -e .[dev,mysql,notebook,gpy]
script:
# warnings treated as errors
- sphinx-build -WT sphinx/source sphinx/build
# since -W flag breaks on first error, re-run without it to print all
- sphinx-build sphinx/source sphinx/build
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
v0.1.0 - 2019-04-30
Changelog added
Initial Ax release
2 changes: 2 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Code of Conduct
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.facebook.com/codeofconduct) so that you can understand what actions will and will not be tolerated.
60 changes: 60 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Contributing to Ax
We want to make contributing to this project as easy and transparent as
possible.

## Our Development Process
Coming soon.

## Pull Requests
We actively welcome your pull requests.

1. Fork the repo and create your branch from `master`.
2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes.
5. Make sure your code lints.
6. If you haven't already, complete the Contributor License Agreement ("CLA").

## Contributor License Agreement ("CLA")
In order to accept your pull request, we need you to submit a CLA. You only need
to do this once to work on any of Facebook's open source projects.

Complete your CLA here: <https://code.facebook.com/cla>

## Issues
We use GitHub issues to track public bugs. Please ensure your description is
clear and has sufficient instructions to be able to reproduce the issue.

Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe
disclosure of security bugs. In those cases, please go through the process
outlined on that page and do not file a public issue.

## Coding Style
We use the [`Black` code formatter](https://github.com/ambv/black) for all Python files. You can install the latest release via `pip install black` and run it over the library via `black ax`.

## Documentation

The Ax website was created with [Docusaurus](https://docusaurus.io/).
FontAwesome icons were used under the [Creative Commons Attribution 4.0 International](https://fontawesome.com/license).

### Building

You will need [Node](https://nodejs.org/en/) >= 8.x and [Yarn](https://yarnpkg.com/en/) >= 1.5
to build the Sphinx docs and Docusaurus site (which embeds the Sphinx docs inside). The
following command will both build the docs and serve the site locally:
```
cd scripts
./make_docs.sh
```

Open http://localhost:3000 (if doesn't automatically open).

Anytime you change the contents of the page, the page should auto-update.

### Publishing
The site is hosted as a GitHub page. Once Ax is live, we will generate a static
site and automatically push the output to the `gh-pages` branch via CircleCI.

## License
By contributing to Ax, you agree that your contributions will be licensed
under the LICENSE file in the root directory of this source tree.
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
MIT License

Copyright (c) 2018-present, Facebook, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading

0 comments on commit f458275

Please sign in to comment.