Skip to content

Initial release: Efficient Noise Calculation in Deep Learning-based M… #1

Initial release: Efficient Noise Calculation in Deep Learning-based M…

Initial release: Efficient Noise Calculation in Deep Learning-based M… #1

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
Linting:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
make dev-lint
- name: Lint with isort, black, docformatter, flake8
run: |
make lint
Build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.7", "3.8", "3.9"]
torchmetrics-version: ["0.11.4"]
ignore-lpips: ["false"]
include:
- os: ubuntu-latest
python-version: "3.9"
torchmetrics-version: "0.11.4"
ignore-lpips: "true"
- os: ubuntu-latest
python-version: "3.9"
torchmetrics-version: "0.6.0"
ignore-lpips: "false"
- os: ubuntu-latest
python-version: "3.9"
torchmetrics-version: "0.7.3"
ignore-lpips: "false"
env:
TORCHMETRICS: ${{ matrix.torchmetrics-version }}
IGNORE_LPIPS: ${{ matrix.ignore-lpips }}
name: py${{ matrix.python-version }}, torchmetrics-${{ matrix.torchmetrics-version }}, ignore-lpips-${{ matrix.ignore-lpips }}, ${{ matrix.os }}
timeout-minutes: 50
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install torch torchvision
if [[ $TORCHMETRICS == "latest" || -z $TORCHMETRICS ]]; then
echo "Installing latest torchmetrics"
pip install torchmetrics
else
pip install torchmetrics==$TORCHMETRICS
fi
make dev
pip install -e '.[alldev]'
if [[ $IGNORE_LPIPS == "true" ]]; then
pip uninstall -y lpips
fi
- name: Test with pytest
run: |
pip install pytest
pip install pytest-cov
MEDDLR_TEST_MODEL_ZOOS=True MEDDLR_TEST_DEPRECATED=True make test-cov
- name: Upload to codecov.io
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true