Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 0 additions & 100 deletions .github/workflows/arviz_compat.yml

This file was deleted.

89 changes: 0 additions & 89 deletions .github/workflows/jaxtests.yml

This file was deleted.

148 changes: 146 additions & 2 deletions .github/workflows/pytest.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: pytest
name: tests

on:
pull_request:
Expand All @@ -19,7 +19,6 @@ on:
- "codecov.yml"
- "scripts/*.sh"


# Tests are split into multiple jobs to accelerate the CI.
# Different jobs should be organized to take approximately the same
# time to complete (and not be prohibitely slow).
Expand Down Expand Up @@ -249,3 +248,148 @@ jobs:
env_vars: TEST_SUBSET
name: ${{ matrix.os }} ${{ matrix.floatx }}
fail_ci_if_error: false
jax:
strategy:
matrix:
os: [ubuntu-latest]
floatx: [float64]
test-subset:
- pymc/tests/test_sampling_jax.py
fail-fast: false
runs-on: ${{ matrix.os }}
env:
TEST_SUBSET: ${{ matrix.test-subset }}
AESARA_FLAGS: floatX=${{ matrix.floatx }},gcc__cxxflags='-march=native'
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v1
env:
# Increase this value to reset cache if environment-test-py39.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda-envs/environment-test-py39.yml') }}
- name: Cache multiple paths
uses: actions/cache@v2
env:
# Increase this value to reset cache if requirements.txt has not changed
CACHE_NUMBER: 0
with:
path: |
~/.cache/pip
$RUNNER_TOOL_CACHE/Python/*
~\AppData\Local\pip\Cache
key: ${{ runner.os }}-build-${{ matrix.python-version }}-${{
hashFiles('requirements.txt') }}
- uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
mamba-version: "*"
activate-environment: pymc-test-py39
channel-priority: strict
environment-file: conda-envs/environment-test-py39.yml
use-mamba: true
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Install pymc
run: |
conda activate pymc-test-py39
pip install -e .
python --version
- name: Install jax specific dependencies
run: |
conda activate pymc-test-py39
pip install "numpyro>=0.8.0"
pip install git+https://github.com/blackjax-devs/blackjax.git@main
- name: Run tests
run: |
python -m pytest -vv --cov=pymc --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
env_vars: TEST_SUBSET
name: JAX tests - ${{ matrix.os }} ${{ matrix.floatx }}
fail_ci_if_error: false
arviz:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
floatx: [float64]
test-subset:
- |
pymc/tests/test_parallel_sampling.py
pymc/tests/test_posteriors.py
pymc/tests/test_sampling.py

- |
pymc/tests/test_data_container.py
pymc/tests/test_idata_conversion.py
pymc/tests/test_missing.py
pymc/tests/test_model.py
pymc/tests/test_shape_handling.py
pymc/tests/test_shared.py
fail-fast: false
runs-on: ${{ matrix.os }}
env:
TEST_SUBSET: ${{ matrix.test-subset }}
AESARA_FLAGS: floatX=${{ matrix.floatx }},gcc__cxxflags='-march=native'
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v1
env:
# Increase this value to reset cache if environment-test-py39.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda-envs/environment-test-py39.yml') }}
- name: Cache multiple paths
uses: actions/cache@v2
env:
# Increase this value to reset cache if requirements.txt has not changed
CACHE_NUMBER: 0
with:
path: |
~/.cache/pip
$RUNNER_TOOL_CACHE/Python/*
~\AppData\Local\pip\Cache
key: ${{ runner.os }}-build-${{ matrix.python-version }}-${{
hashFiles('requirements.txt') }}
- uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
mamba-version: "*"
activate-environment: pymc-test-py39
channel-priority: strict
environment-file: conda-envs/environment-test-py39.yml
use-mamba: true
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Install pymc
run: |
conda activate pymc-test-py39
pip install -e .
python --version
- name: Install latest arviz
run: |
conda activate pymc-test-py39
pip uninstall arviz -y
pip install git+https://github.com/arviz-devs/arviz
- name: Run tests
run: |
python -m pytest -vv --cov=pymc --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
env_vars: TEST_SUBSET
name: ArviZ compat - ${{ matrix.os }} ${{ matrix.floatx }}
fail_ci_if_error: false
6 changes: 0 additions & 6 deletions buildosx

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/check_all_tests_are_covered.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def from_yaml():
"""
# First collect the matrix definitions from testing workflows
matrices = {}
for wf in ["pytest.yml", "arviz_compat.yml", "jaxtests.yml"]:
for wf in ["tests.yml"]:
wfname = wf.strip(".yml")
wfdef = yaml.safe_load(open(Path(".github", "workflows", wf)))
for jobname, jobdef in wfdef["jobs"].items():
Expand Down