mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
refactor
This commit is contained in:
@@ -42,20 +42,24 @@ jobs:
|
||||
run: |
|
||||
brew install libomp # https://github.com/pytorch/pytorch/issues/20030
|
||||
brew install openmpi # Horovod on macOS requires OpenMPI, Gloo not currently supported
|
||||
|
||||
- name: Setup Windows
|
||||
if: runner.os == 'windows'
|
||||
run: |
|
||||
python -c "lines = [line for line in open('requirements-extra.txt').readlines() if not line.startswith('horovod')] ; open('requirements-extra.txt', 'w').writelines(lines)"
|
||||
|
||||
# TODO: remove after https://github.com/pytorch/pytorch/issues/32186 is resolved
|
||||
- name: Setup Windows on Latest
|
||||
if: runner.os == 'windows' && matrix.requires == 'latest'
|
||||
run: |
|
||||
python -c "req = open('requirements.txt').read().replace('torch>=1.1', 'torch<1.5') ; open('requirements.txt', 'w').write(req)"
|
||||
|
||||
- name: Set min. dependencies
|
||||
if: matrix.requires == 'minimal'
|
||||
run: |
|
||||
python -c "req = open('requirements.txt').read().replace('>', '=') ; open('requirements.txt', 'w').write(req)"
|
||||
python -c "req = open('requirements-extra.txt').read().replace('>', '=') ; open('requirements-extra.txt', 'w').write(req)"
|
||||
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
@@ -65,12 +69,6 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-${{ matrix.python-version }}-
|
||||
${{ runner.os }}-${{ matrix.python-version }}-
|
||||
- name: Cache datasets
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: tests/Datasets # This path is specific to Ubuntu
|
||||
# Look to see if there is a cache hit for the corresponding requirements file
|
||||
key: mnist-dataset
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
@@ -83,6 +81,13 @@ jobs:
|
||||
pip list
|
||||
shell: bash
|
||||
|
||||
- name: Cache datasets
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: tests/Datasets # This path is specific to Ubuntu
|
||||
# Look to see if there is a cache hit for the corresponding requirements file
|
||||
key: mnist-dataset
|
||||
|
||||
- name: Tests
|
||||
# env:
|
||||
# TOXENV: py${{ matrix.python-version }}
|
||||
@@ -91,6 +96,7 @@ jobs:
|
||||
# flake8 .
|
||||
coverage run --source pytorch_lightning -m py.test pytorch_lightning tests -v --doctest-modules --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml
|
||||
coverage report
|
||||
|
||||
- name: Upload pytest test results
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user