Adding documentation for new metrics #1115
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: testing | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
push: | |
branches: master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
USING_COVERAGE: '3.7' | |
strategy: | |
max-parallel: 4 | |
matrix: | |
include: | |
- python-version: "3.7" | |
torchvision-version: "0.10.0" | |
- python-version: "3.7" | |
torchvision-version: "0.14.1" | |
- python-version: "3.10" | |
torchvision-version: "0.14.1" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache pip | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip # This path is specific to Ubuntu | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- name: Install dependencies | |
# It is important to freeze scikit-image to version < 0.21.0 because there they change the default number of | |
# dimensions in loaded images, which breaks image loading-related tests | |
# Might update the version in the future but tests need to be adjusted accordingly. | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install torchvision==${{ matrix.torchvision-version }} | |
pip install -r requirements.txt | |
pip install pytest \ | |
pytest-cov \ | |
tensorflow \ | |
libsvm \ | |
pybrisque \ | |
"scikit-image<=0.20.0" \ | |
pandas \ | |
tqdm | |
pip install --upgrade scipy | |
- name: Test with pytest | |
run: | | |
pytest -x --cov=./piq --cov-report=xml | |
- name: Upload coverage to Codecov | |
# Upload codecov reports only from a pipeline for a single version defined in the env variable | |
if: "contains(env.USING_COVERAGE, matrix.python-version)" | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: true |