Skip to content

Test against stable #54

Test against stable

Test against stable #54

Workflow file for this run

name: Test against stable
on:
workflow_dispatch:
jobs:
tests-and-coverage-pip-stable:
name: Tests and coverage (pip, Python ${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.9", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install gpytorch
pip install .[test]
- name: Unit tests and coverage
run: |
pytest -ra --cov=. --cov-report term-missing
tests-conda-stable:
name: Tests (conda, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.9", "3.11"]
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
activate-environment: test
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: bash -l {0}
run: |
conda install -y -c pytorch pytorch cpuonly
conda install -y pip scipy pytest
conda install -y -c gpytorch gpytorch
conda install -y -c conda-forge pyro-ppl>=1.8.4
pip install .[test]
- name: Unit tests
shell: bash -l {0}
run: |
pytest -ra
tests-and-coverage-min-req-pip:
name: Tests and coverage min req. torch, gpytorch & linear_operator versions (pip, Python ${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
python-version: ["3.9", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python setup.py egg_info
req_txt="botorch.egg-info/requires.txt"
min_torch_version=$(grep '\btorch[>=]=' ${req_txt} | sed 's/[^0-9.]//g')
# HACK around the fact that pytorch does not offer a mac binary for 1.13.1 for py3.11 - TODO: Remove when bumping torch to 2.0.1
min_torch_version="$(if ${{ matrix.python-version == '3.11' }} && ${{ matrix.os == 'macos-latest' }}; then echo "2.0.1"; else echo "${min_torch_version}"; fi)"
min_gpytorch_version=$(grep '\bgpytorch[>=]=' ${req_txt} | sed 's/[^0-9.]//g')
min_linear_operator_version=$(grep '\blinear_operator[>=]=' ${req_txt} | sed 's/[^0-9.]//g')
pip install "torch==${min_torch_version}" "gpytorch==${min_gpytorch_version}" "linear_operator==${min_linear_operator_version}"
pip install .[test]
- name: Unit tests and coverage
run: |
pytest -ra --cov=. --cov-report term-missing
run_tutorials_stable_w_latest_ax:
name: Run tutorials without smoke test on min req. versions of PyTorch & GPyTorch and latest Ax
uses: ./.github/workflows/reusable_tutorials.yml
with:
smoke_test: false
use_stable_pytorch_gpytorch: true
use_stable_ax: false
run_tutorials_stable_smoke_test:
name: Run tutorials with smoke test on min req. versions of PyTorch & GPyTorch and latest Ax
uses: ./.github/workflows/reusable_tutorials.yml
with:
smoke_test: true
use_stable_pytorch_gpytorch: true
use_stable_ax: false