Skip to content

Remove jax.jit decorators on MCMC functions. #132

Remove jax.jit decorators on MCMC functions.

Remove jax.jit decorators on MCMC functions. #132

Workflow file for this run

name: CI
on:
# Trigger the workflow on push or pull request,
# only on the main branch
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
lint_and_typecheck:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache dir
id: pip-cache
run: |
python -m pip install --upgrade pip
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install -e '.[testing]'
- name: Lint with flake8
run: |
flake8 .
- name: Lint with pylint
run: |
pylint --fail-under 9.75 ferminet
- name: Type check with pytype
run: |
pytype ferminet
build:
name: "build ${{ matrix.name-prefix }} (py ${{ matrix.python-version }} on ${{ matrix.os }})"
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name-prefix: "all tests"
python-version: '3.10'
os: ubuntu-latest
package-overrides: "none"
- name-prefix: "all tests"
python-version: '3.11'
os: ubuntu-latest
package-overrides: "none"
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache dir
id: pip-cache
run: |
python -m pip install --upgrade pip
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install -e '.[testing]'
if [ ${{ matrix.package-overrides }} != none ]; then
pip install ${{ matrix.package-overrides }}
fi
- name: Run tests
run: |
python -m pytest
- name: Run multi-device tests
if: matrix.python-version == '3.10'
run: |
FERMINET_CHEX_N_CPU_DEVICES=2 python -m pytest ferminet/tests/train_test.py