-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* base tests * pil * wip * wip * wip * ignore * ignore * win * link * win * cpu * Apply suggestions from code review Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com> Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
- Loading branch information
Showing
8 changed files
with
156 additions
and
17 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: CI base testing | ||
|
||
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows | ||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the master branch | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
# Trigger the workflow on push or pull request | ||
# on: [push, pull_request] | ||
|
||
jobs: | ||
doctest: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
# max-parallel: 6 | ||
matrix: | ||
os: [ubuntu-20.04, windows-2019, macOS-10.15] | ||
python-version: [3.7] | ||
|
||
# Timeout: https://stackoverflow.com/a/59076067/4521646 | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# Github Actions: Run step on specific OS: https://stackoverflow.com/a/57948488/4521646 | ||
- name: Setup macOS | ||
if: runner.os == 'macOS' | ||
run: | | ||
brew install libomp # https://github.com/pytorch/pytorch/issues/20030 | ||
# Note: This uses an internal pip API and may not always work | ||
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow | ||
- name: Get pip cache | ||
id: pip-cache | ||
run: | | ||
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)" | ||
- name: Cache pip | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-pip-${{ hashFiles('requirements/base.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-pip- | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade --user pip | ||
pip install --requirement ./requirements/base.txt --quiet --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade-strategy only-if-needed | ||
pip install --requirement ./requirements/test.txt --quiet --upgrade-strategy only-if-needed | ||
# pip install tox coverage | ||
python --version | ||
pip --version | ||
pip list | ||
shell: bash | ||
|
||
- name: Cache datasets | ||
uses: actions/cache@v1 | ||
with: | ||
path: Datasets # This path is specific to Ubuntu | ||
# Look to see if there is a cache hit for the corresponding requirements file | ||
key: PL-dataset | ||
|
||
- name: Test Package [only] | ||
run: | | ||
# NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003 | ||
python -m pytest pytorch_lightning -v --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml --ignore=pytorch_lightning/loggers/comet.py --ignore=pytorch_lightning/loggers/mlflow.py --ignore=pytorch_lightning/loggers/neptune.py --ignore=pytorch_lightning/loggers/test_tube.py --ignore=pytorch_lightning/loggers/wandb.py --ignore=pytorch_lightning/metrics/sklearns.py | ||
# coverage report | ||
- name: Upload pytest test results | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }} | ||
path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml | ||
# Use always() to always run this step to publish test results when there are test failures | ||
if: always() |
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# the default package dependencies | ||
|
||
numpy>=1.15 # because some BLAS compilation issues | ||
tqdm>=4.41.0 | ||
torch>=1.3 | ||
tensorboard>=1.14 | ||
future>=0.17.1 # required for builtins in setup.py | ||
# pyyaml>=3.13 | ||
PyYAML>=5.1 # OmegaConf requirement | ||
PyYAML>=5.1 # OmegaConf requirement | ||
tqdm>=4.41.0 |