@@ -29,19 +29,15 @@ jobs:
29
29
timeout-minutes : 20
30
30
steps :
31
31
- uses : actions/checkout@v2
32
- # - name: Set up Python ${{ matrix.python-version }}
33
- # uses: actions/setup-python@v2
34
- # with:
35
- # python-version: ${{ matrix.python-version }}
36
32
37
- # TODO: use conda instead
38
33
# https://docs.conda.io/projects/conda/en/4.6.0/_downloads/52a95608c49671267e40c689e0bc00ca/conda-cheatsheet.pdf
39
34
- name : Setup conda
40
35
uses : s-weigand/setup-conda@v1
41
36
with :
42
37
update-conda : true
43
38
python-version : ${{ matrix.python-version }}
44
39
conda-channels : anaconda, conda-forge
40
+ activate-conda : true
45
41
46
42
# TODO: add conda/pip caching
47
43
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow
@@ -55,27 +51,21 @@ jobs:
55
51
# ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pytorch-version }}-pip-
56
52
57
53
- name : Install stable PyTorch version
58
- if : matrix.pytorch-version <= 1.5
54
+ if : matrix.pytorch-version <= 1.6
59
55
run : |
60
56
conda install pytorch=${{ matrix.pytorch-version }} --channel pytorch
61
- conda list
62
57
shell : bash
63
58
64
59
- name : Install nightly PyTorch version
65
- if : matrix.pytorch-version > 1.5
60
+ if : matrix.pytorch-version > 1.6
66
61
run : |
67
62
conda install pytorch=${{ matrix.pytorch-version }} --channel pytorch-nightly
68
- conda list
69
63
shell : bash
70
64
71
65
- name : Install dependencies
72
66
run : |
73
- python -c "fname = 'requirements/base.txt' ; lines = [line for line in open(fname).readlines() if not line.startswith('torch')] ; open(fname, 'w').writelines(lines)"
74
67
# python -m pip install --upgrade --user pip
75
- conda install --file ./requirements/base.txt --quiet --channel conda-forge
76
- HOROVOD_BUILD_ARCH_FLAGS="-mfma" conda install --file ./requirements/extra.txt --quiet --channel conda-forge
77
- conda install --file ./requirements/test.txt --quiet --channel conda-forge
78
- conda install --file ./requirements/examples.txt --quiet --channel conda-forge
68
+ HOROVOD_BUILD_ARCH_FLAGS="-mfma" conda env update --file environment.yml --name base
79
69
python --version
80
70
conda info
81
71
conda list
84
74
- name : Reinstall Horovod if necessary
85
75
if : runner.os != 'windows' && matrix.python-version != '3.8'
86
76
run : |
77
+ # conda activate base
87
78
HOROVOD_BUILT=$(python -c "import horovod.torch; horovod.torch.nccl_built(); print('SUCCESS')")
88
79
if [[ $HOROVOD_BUILT != "SUCCESS" ]]; then
89
80
pip uninstall -y horovod
101
92
102
93
- name : Tests
103
94
run : |
95
+ # conda activate base
104
96
# NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003
105
97
python -m pytest pytorch_lightning tests pl_examples -v --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
106
98
# coverage report
0 commit comments