introduce multivariate cdf / quantiles (#447) #1600
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
name: tests | |
on: | |
schedule: | |
- cron: 00 00 * * 1 | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
fast-tests: | |
name: Fast tests Python ${{ matrix.python-version }} ${{ matrix.jax-version }} | |
runs-on: ubuntu-latest | |
# allow tests using the latest JAX to fail | |
continue-on-error: ${{ matrix.jax-version == 'jax-latest' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.9'] | |
jax-version: [jax-default, jax-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install tox | |
- name: Setup environment | |
run: | | |
tox -e py${{ matrix.python-version }}-${{ matrix.jax-version }} --notest -v | |
- name: Run tests | |
run: | | |
tox -e py${{ matrix.python-version }}-${{ matrix.jax-version }} --skip-pkg-install -- -m fast --memray -n auto -vv | |
gpu-tests: | |
name: Fast GPU tests Python 3.8 on ubuntu-20.04 | |
runs-on: [self-hosted, ott-gpu] | |
container: | |
image: docker://michalk8/cuda:11.3.0-ubuntu20.04 | |
options: --gpus="device=12" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
# `jax[cuda]<0.4` because of Docker issues: https://github.com/google/jax/issues/13758 | |
# `chex<0.1.7` because it requires `jax>=0.4.6` | |
# `flax<0.6.5` because it requires `jax>=0.4.2`, --no-deps because of `orbax` | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install -e".[test]" | |
python3 -m pip install "orbax-checkpoint" "orbax-export" "chex<0.1.7" | |
python3 -m pip install --no-deps "flax<0.6.5" | |
python3 -m pip install "jax[cuda]<0.4" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html | |
- name: Nvidia SMI | |
run: | | |
nvidia-smi | |
- name: Run tests | |
run: | | |
python3 -m pytest -m "fast and not cpu" --memray --durations 10 -vv | |
tests: | |
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.8', '3.10', '3.11'] | |
os: [ubuntu-latest] | |
include: | |
- python-version: '3.9' | |
os: macos-latest | |
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 -m pip install --upgrade pip | |
python -m pip install tox | |
- name: Setup environment | |
run: | | |
tox -e py${{ matrix.python-version }} --notest -v | |
- name: Run tests | |
run: | | |
tox -e py${{ matrix.python-version }} --skip-pkg-install | |
env: | |
PYTEST_ADDOPTS: --memray -vv | |
- name: Upload coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./coverage.xml | |
flags: tests-${{ matrix.os }}-${{ matrix.python-version }} | |
name: unittests | |
env_vars: OS,PYTHON | |
fail_ci_if_error: false | |
verbose: true |