Skip to content

Commit a0e45dc

Browse files
authored
Some minor CI cleanup (#10088)
1 parent 38090e4 commit a0e45dc

File tree

23 files changed

+64
-151
lines changed

23 files changed

+64
-151
lines changed

.github/workflows/ci_dockers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
fail-fast: false
4747
matrix:
4848
python_version: ["3.7"]
49-
xla_version: ["1.6", "1.8", "nightly"]
49+
xla_version: ["1.6", "1.8", "1.10"]
5050
steps:
5151
- name: Checkout
5252
uses: actions/checkout@v2

.github/workflows/ci_test-base.yml

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# this jobs runs `pytest` over the source directory. It does not install any extra dependencies.
2+
# this is useful to catch errors where an import has been added which is not part of the basic dependencies.
13
name: CI basic testing
24

35
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
@@ -13,10 +15,10 @@ jobs:
1315
runs-on: ${{ matrix.os }}
1416
strategy:
1517
fail-fast: false
16-
# max-parallel: 6
1718
matrix:
18-
os: [ubuntu-20.04, windows-2019, macOS-10.15]
19-
python-version: [3.8]
19+
os: [ubuntu-20.04]
20+
# this will install stable torch
21+
python-version: [3.9]
2022

2123
# Timeout: https://stackoverflow.com/a/59076067/4521646
2224
timeout-minutes: 20
@@ -27,12 +29,6 @@ jobs:
2729
with:
2830
python-version: ${{ matrix.python-version }}
2931

30-
# Github Actions: Run step on specific OS: https://stackoverflow.com/a/57948488/4521646
31-
- name: Setup macOS
32-
if: runner.os == 'macOS'
33-
run: |
34-
brew install libomp # https://github.com/pytorch/pytorch/issues/20030
35-
3632
- name: Weekly reset caching
3733
run: echo "::set-output name=period::$(python -c 'import time ; days = time.time() / 60 / 60 / 24 ; print(int(days / 7))' 2>&1)"
3834
id: times
@@ -54,21 +50,14 @@ jobs:
5450
5551
- name: Install dependencies
5652
run: |
57-
python -m pip install --upgrade --user pip
58-
pip install --requirement ./requirements.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
59-
pip install "pytest>6.0" "pytest-cov>2.10" --upgrade-strategy only-if-needed
6053
python --version
54+
python -m pip install --upgrade --user pip
6155
pip --version
56+
pip install --requirement requirements.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
57+
pip install --requirement requirements/test.txt
6258
pip list
6359
shell: bash
6460

65-
- name: Cache datasets
66-
uses: actions/cache@v2
67-
with:
68-
path: Datasets # This path is specific to Ubuntu
69-
# Look to see if there is a cache hit for the corresponding requirements file
70-
key: PL-dataset
71-
7261
- name: Test Package [only]
7362
run: |
7463
# NOTE: run coverage on tests does not propagate failure status for Win, https://github.com/nedbat/coveragepy/issues/1003

.github/workflows/ci_test-conda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: PyTorch & Conda
33
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
44
on: # Trigger the workflow on push or pull request, but only for the master branch
55
push:
6-
branches: [ master, "release/*" ]
6+
branches: [master, "release/*"]
77
pull_request:
88
branches: [master, "release/*"]
99

.github/workflows/ci_test-full.yml

Lines changed: 18 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -45,36 +45,24 @@ jobs:
4545
run: echo "::set-output name=period::$(python -c 'import time ; days = time.time() / 60 / 60 / 24 ; print(int(days / 7))' 2>&1)"
4646
id: times
4747

48-
- name: Update pip
48+
- name: Upgrade pip
4949
run: |
50+
python --version
5051
# needed for `pip cache` command
51-
pip install --quiet "pip==20.2" --upgrade --user
52+
pip install --upgrade pip --user
53+
pip --version
5254
5355
# Github Actions: Run step on specific OS: https://stackoverflow.com/a/57948488/4521646
5456
- name: Setup macOS
5557
if: runner.os == 'macOS'
5658
run: |
57-
brew install libomp # https://github.com/pytorch/pytorch/issues/20030
5859
brew install openmpi libuv # Horovod on macOS requires OpenMPI, Gloo not currently supported
5960
6061
- name: Setup Windows
6162
if: runner.os == 'windows'
6263
run: |
6364
python .github/prune-packages.py requirements/extra.txt "horovod"
6465
65-
# todo: re-enable when allow testing py 3.9 with min config, atm some Hydra issues
66-
#- name: Adjust minimal for Python 3.9
67-
# if: matrix.requires == 'minimal' && matrix.python-version == 3.9
68-
# run: |
69-
# import re
70-
# def _req(fname, ptn, ver):
71-
# req = re.sub(ptn, ver, open(fname).read())
72-
# open(fname, 'w').write(req)
73-
#
74-
# _req('requirements.txt', r'torch>=[\d\.]+', 'torch>=1.8.0')
75-
# _req('requirements/extra.txt', r'onnxruntime>=[\d\.]+', 'onnxruntime>=1.7.0')
76-
# shell: python
77-
7866
- name: Set min. dependencies
7967
if: matrix.requires == 'minimal'
8068
run: |
@@ -104,37 +92,35 @@ jobs:
10492
unzip -o checkpoints.zip
10593
ls -l checkpoints/
10694
107-
# todo: re-enable testing with Horovod
108-
- name: py3.9 - temp skip Horovod
109-
if: matrix.python-version == 3.9
95+
- name: Install dependencies
11096
run: |
111-
# pip uninstall -y horovod
112-
python .github/prune-packages.py requirements/extra.txt "horovod"
97+
flag=$(python -c "print('--pre' if '${{matrix.release}}' == 'pre' else '')" 2>&1)
98+
pip install --requirement requirements.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade $flag
99+
# adjust versions according installed Torch version
100+
python ./requirements/adjust_versions.py requirements/examples.txt
101+
pip install --requirement requirements/examples.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
102+
pip install --requirement requirements/test.txt --upgrade
103+
pip list
104+
shell: bash
113105

114-
- name: Install dependencies
106+
- name: Install extra dependencies
115107
env:
116-
# MAKEFLAGS: "-j2"
117108
HOROVOD_BUILD_ARCH_FLAGS: "-mfma"
118109
HOROVOD_WITHOUT_MXNET: 1
119110
HOROVOD_WITHOUT_TENSORFLOW: 1
120111
run: |
121-
python --version
122-
pip --version
123-
# python -m pip install --upgrade --user pip
124-
flag=$(python -c "print('--pre' if '${{matrix.release}}' == 'pre' else '')" 2>&1)
125-
pip install --requirement requirements.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade $flag
126112
# adjust versions according installed Torch version
127113
python ./requirements/adjust_versions.py requirements/extra.txt
128-
python ./requirements/adjust_versions.py requirements/examples.txt
129-
pip install --requirement ./requirements/devel.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
114+
pip install --requirement ./requirements/extra.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
130115
pip list
131116
shell: bash
132117

133118
- name: Reinstall Horovod if necessary
134-
# todo: re-enable horovod on py3.9 when it will be supported
135-
if: runner.os != 'windows' && matrix.python-version != 3.9
119+
if: runner.os != 'windows'
136120
env:
137121
HOROVOD_BUILD_ARCH_FLAGS: "-mfma"
122+
HOROVOD_WITHOUT_MXNET: 1
123+
HOROVOD_WITHOUT_TENSORFLOW: 1
138124
run: |
139125
HOROVOD_BUILT=$(python -c "import horovod.torch; horovod.torch.nccl_built(); print('SUCCESS')" || true)
140126
if [[ $HOROVOD_BUILT != "SUCCESS" ]]; then

.github/workflows/code-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@master
1515
- uses: actions/setup-python@v2
1616
with:
17-
python-version: 3.8
17+
python-version: 3.9
1818
- name: Install mypy
1919
run: |
2020
grep mypy requirements/test.txt | xargs -0 pip install

.github/workflows/docs-checks.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ jobs:
1414
- uses: actions/checkout@v2
1515
with:
1616
submodules: true
17-
# lfs: true
1817
- uses: actions/setup-python@v2
1918
with:
20-
python-version: 3.7
19+
python-version: 3.9
2120

2221
- name: Weekly reset caching
2322
run: echo "::set-output name=period::$(python -c 'import time ; days = time.time() / 60 / 60 / 24 ; print(int(days / 7))' 2>&1)"
@@ -66,7 +65,7 @@ jobs:
6665
# lfs: true
6766
- uses: actions/setup-python@v2
6867
with:
69-
python-version: 3.7
68+
python-version: 3.9
7069

7170
# Note: This uses an internal pip API and may not always work
7271
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow
@@ -83,7 +82,6 @@ jobs:
8382
sudo apt-get update
8483
sudo apt-get install -y cmake pandoc
8584
pip --version
86-
# pip install --requirement requirements.txt --upgrade-strategy only-if-needed --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --quiet
8785
pip install --requirement requirements/docs.txt
8886
# install Texlive, see https://linuxconfig.org/how-to-install-latex-on-ubuntu-20-04-focal-fossa-linux
8987
sudo apt-get update && sudo apt-get install -y texlive-latex-extra dvipng texlive-pictures

.github/workflows/events-nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- uses: actions/checkout@v2
2222
- uses: actions/setup-python@v2
2323
with:
24-
python-version: 3.8
24+
python-version: 3.9
2525

2626
- name: Install dependencies
2727
run: >-
@@ -54,7 +54,7 @@ jobs:
5454
fail-fast: false
5555
matrix:
5656
python_version: ["3.7"]
57-
xla_version: ["1.6", "1.7", "1.8", "1.9"] # todo: , "nightly"
57+
xla_version: ["1.6", "1.7", "1.8", "1.9"]
5858

5959
steps:
6060
- name: Checkout

.github/workflows/legacy-checkpoints.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
- uses: actions/setup-python@v2
1414
with:
15-
python-version: 3.8
15+
python-version: 3.9
1616

1717
- name: Install dependencies
1818
run: |

.github/workflows/release-docker.yml

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
- name: Publish Latest to Docker
4040
uses: docker/[email protected]
41-
# only on releases AND latest PT and py
41+
# only on releases and latest Python and PyTorch
4242
if: matrix.python_version == 3.9 && matrix.pytorch_version == 1.9
4343
with:
4444
repository: pytorchlightning/pytorch_lightning
@@ -48,25 +48,3 @@ jobs:
4848
build_args: PYTHON_VERSION=${{ matrix.python_version }},PYTORCH_VERSION=${{ matrix.pytorch_version }},LIGHTNING_VERSION=${{ steps.get_version.outputs.RELEASE_VERSION }}
4949
tags: "latest"
5050
timeout-minutes: 55
51-
52-
# nvidia-PL:
53-
# runs-on: ubuntu-20.04
54-
# if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'release'
55-
# steps:
56-
# - name: Checkout
57-
# uses: actions/checkout@v2
58-
#
59-
# - name: Get release version
60-
# id: get_version
61-
# run: echo "::set-output name=RELEASE_VERSION::$(echo ${GITHUB_REF##*/})"
62-
#
63-
# - name: Publish Releases to Docker
64-
# uses: docker/[email protected]
65-
# with:
66-
# repository: nvcr.io/pytorchlightning/pytorch_lightning
67-
# username: ${{ secrets.DOCKER_USERNAME }}
68-
# password: ${{ secrets.DOCKER_PASSWORD }}
69-
# dockerfile: dockers/nvidia/Dockerfile
70-
# build_args: LIGHTNING_VERSION=${{ steps.get_version.outputs.RELEASE_VERSION }}
71-
# tags: "${{ steps.get_version.outputs.RELEASE_VERSION }}-nvidia"
72-
# timeout-minutes: 55

.github/workflows/release-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v2
1717
- uses: actions/setup-python@v2
1818
with:
19-
python-version: 3.8
19+
python-version: 3.9
2020

2121
- name: Install dependencies
2222
run: >-
@@ -90,7 +90,7 @@ jobs:
9090

9191
- uses: actions/setup-python@v2
9292
with:
93-
python-version: 3.8
93+
python-version: 3.9
9494

9595
- name: Weekly reset caching
9696
run: echo "::set-output name=period::$(python -c 'import time ; days = time.time() / 60 / 60 / 24 ; print(int(days / 7))' 2>&1)"

0 commit comments

Comments
 (0)