Skip to content

fix(explain/lrp): identity rule on gate sigmoids so the uniform gate … #76

fix(explain/lrp): identity rule on gate sigmoids so the uniform gate …

fix(explain/lrp): identity rule on gate sigmoids so the uniform gate … #76

Workflow file for this run

name: test
on:
push:
branches:
- main
- master
- 'feat/**'
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.12']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install CPU torch + torchaudio (avoid CUDA wheels + ABI mismatch)
run: |
python -m pip install --upgrade pip
# torchaudio must come from the same CPU index as torch, otherwise the
# transitively-installed (braindecode) torchaudio has a mismatched ABI
# and fails to load its compiled _torchaudio.so.
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
- name: Install package (editable) with dev + legacy + explain extras
# Editable so coverage's source=["physioex"] measures the executed tree
# (a non-editable install runs the site-packages copy -> 0% reported).
# 'explain' pulls in zennit so the LRP tests run instead of skipping.
run: pip install -e .[dev,legacy,explain]
- name: Run test suite with coverage gate
env:
# Gated markers self-skip / deselect when their environment is absent:
# real_data -> PHYSIOEX_TEST_REAL_DATA, hf -> PHYSIOEX_TEST_HF, gpu -> CUDA.
PHYSIOEX_TEST_REAL_DATA: ""
PHYSIOEX_TEST_HF: ""
run: |
pytest -m "not real_data and not gpu and not hf" \
--cov=physioex \
--cov-report=term-missing \
--cov-report=xml \
--cov-fail-under=60
- name: Upload coverage XML
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.python-version }}
path: coverage.xml
if-no-files-found: ignore