ConstantKernel
#521
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Run Test Suite | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_call: | |
jobs: | |
run_linter: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.8" | |
- name: Install dependencies | |
run: | | |
pip install flake8==4.0.1 flake8-print==4.0.0 pre-commit | |
pre-commit install | |
- name: Run linting | |
run: | | |
flake8 | |
- name: Run pre-commit checks | |
# skipping flake8 here (run separatey above b/c pre-commit does not include flake8-print) | |
run: | | |
SKIP=flake8 pre-commit run --files test/**/*.py gpytorch/**/*.py | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
run_unit_tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
pytorch-version: ["master", "stable"] | |
extras: ["with-extras", "no-extras"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.8" | |
- name: Install dependencies | |
run: | | |
if [[ ${{ matrix.pytorch-version }} = "master" ]]; then | |
pip install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html; | |
else | |
pip install torch==1.11+cpu -f https://download.pytorch.org/whl/torch_stable.html; | |
fi | |
pip install -e . | |
if [[ ${{ matrix.extras }} == "with-extras" ]]; then | |
pip install "pyro-ppl>=1.8"; | |
pip install pykeops; | |
pip install faiss-cpu; # Unofficial pip release: https://pypi.org/project/faiss-cpu/#history | |
fi | |
- name: Run unit tests | |
run: | | |
python -m unittest discover | |
run_examples: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.8" | |
- name: Install dependencies | |
run: | | |
pip install torch==1.11+cpu -f https://download.pytorch.org/whl/torch_stable.html | |
pip install pytest nbval jupyter tqdm matplotlib torchvision scipy | |
pip install -e . | |
pip install "pyro-ppl>=1.8"; | |
pip install pykeops; | |
pip install faiss-cpu; # Unofficial pip release: https://pypi.org/project/faiss-cpu/#history | |
- name: Run example notebooks | |
run: | | |
grep -l smoke_test examples/**/*.ipynb | xargs grep -L 'smoke_test = False' | CI=true xargs pytest --nbval-lax --current-env |