Skip to content

Commit

Permalink
update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Jun 14, 2022
1 parent 44a49c2 commit 2add5aa
Show file tree
Hide file tree
Showing 13 changed files with 84 additions and 72 deletions.
16 changes: 11 additions & 5 deletions .azure-pipelines/gpu-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ jobs:
clean: all

steps:
- bash: |
python -m pytest tests/benchmarks -v --durations=0
displayName: 'Testing: benchmarks'
env:
PL_RUNNING_BENCHMARKS: 1

- bash: |
pip install -e . -r requirements/strategies.txt
pip list
displayName: 'Install package'
- bash: |
python -m pytest tests/benchmarks -v --durations=0
displayName: 'Testing: benchmarks'
env:
PL_RUNNING_BENCHMARKS: 1
21 changes: 11 additions & 10 deletions .azure-pipelines/gpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,12 @@ jobs:
timeoutInMinutes: "100"
# how much time to give 'run always even if cancelled tasks' before stopping them
cancelTimeoutInMinutes: "2"

pool: azure-jirka-spot

container:
image: $(image)
# default shm size is 64m. Increase it to avoid:
# 'Error while creating shared memory: unhandled system error, NCCL version 2.7.8'
options: "--runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all --shm-size=512m"

workspace:
clean: all

Expand All @@ -56,8 +53,9 @@ jobs:
python -c "fname = 'requirements/strategies.txt' ; lines = [line for line in open(fname).readlines() if 'horovod' not in line] ; open(fname, 'w').writelines(lines)"
CUDA_VERSION_MM=$(python -c "import torch ; print(''.join(map(str, torch.version.cuda.split('.')[:2])))")
pip install "bagua-cuda$CUDA_VERSION_MM>=0.9.0"
pip install . --requirement requirements/devel.txt
pip install . --requirement requirements/strategies.txt
pip install -e .
pip install --requirement requirements/devel.txt
pip install --requirement requirements/strategies.txt
pip list
displayName: 'Install dependencies'
Expand All @@ -72,12 +70,15 @@ jobs:
- bash: bash .actions/pull_legacy_checkpoints.sh
displayName: 'Get legacy checkpoints'

- bash: |
python -m coverage run --source pytorch_lightning -m pytest pytorch_lightning tests --ignore tests/benchmarks -v --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=50
displayName: 'Testing: standard'
- bash: python -m coverage run --source pytorch_lightning -m pytest pytorch_lightning
workingDirectory: src
displayName: 'Testing: doctests'

- bash: |
bash tests/standalone_tests.sh
- bash: python -m coverage run --source pytorch_lightning -m pytest tests --ignore tests/benchmarks -v --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=50
displayName: 'Testing: unittests'

- bash: bash run_standalone_tests.sh
workingDirectory: test
env:
PL_USE_MOCKED_MNIST: "1"
displayName: 'Testing: standalone'
Expand Down
4 changes: 1 addition & 3 deletions .azure-pipelines/hpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ jobs:
timeoutInMinutes: "10"
# how much time to give 'run always even if cancelled tasks' before stopping them
cancelTimeoutInMinutes: "2"

pool: intel-hpus

workspace:
clean: all

Expand All @@ -33,7 +31,7 @@ jobs:
displayName: 'Instance HW info'
- bash: |
pip install . --requirement requirements/extra.txt
pip install -e .[extra]
pip install . --requirement requirements/test.txt
displayName: 'Install dependencies'
Expand Down
19 changes: 12 additions & 7 deletions .azure-pipelines/ipu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
# how long to run the job before automatically cancelling
timeoutInMinutes: "15"
pool: graphcore-ipus

workspace:
clean: all

Expand Down Expand Up @@ -55,7 +54,7 @@ jobs:
export GIT_TERMINAL_PROMPT=1
python ./requirements/adjust-versions.py requirements/extra.txt
python ./requirements/adjust-versions.py requirements/examples.txt
pip install . --requirement ./requirements/devel.txt
pip install -e . --requirement ./requirements/devel.txt
pip list
displayName: 'Install dependencies'
Expand All @@ -68,16 +67,22 @@ jobs:
set -eux
source ${{ variables.poplar_sdk }}/poplar-ubuntu*/enable.sh
source ${{ variables.poplar_sdk }}/popart-ubuntu*/enable.sh
python -c "import poptorch; print(poptorch.__version__)"
displayName: "Check poptorch installation"
- bash: |
source ${{ variables.poplar_sdk }}/poplar-ubuntu*/enable.sh
source ${{ variables.poplar_sdk }}/popart-ubuntu*/enable.sh
export POPTORCH_WAIT_FOR_IPU=1
export PL_RUN_IPU_TESTS=1
python -m coverage run --source pytorch_lightning -m pytest tests -vv --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=50
cd src
python -m pytest pytorch_lightning
displayName: 'DocTests'
- bash: |
source ${{ variables.poplar_sdk }}/poplar-ubuntu*/enable.sh
source ${{ variables.poplar_sdk }}/popart-ubuntu*/enable.sh
python -m coverage run --source pytorch_lightning -m pytest tests -vv --durations=50
env:
MKL_THREADING_LAYER: "GNU"
displayName: 'Testing: standard'
POPTORCH_WAIT_FOR_IPU: 1
PL_RUN_IPU_TESTS: 1
displayName: 'UnitTests'
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ references:
# the image uses python 2.7 by default, force a different version
pyenv global 3.7.3
python --version
pip install -r requirements/docs.txt
pip install -e . -r requirements/docs.txt
pip list
cd docs
make clean
Expand Down
52 changes: 26 additions & 26 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,35 @@
/docs/source/expertise_levels @williamfalcon @RobertLaurella

# Packages
/pytorch_lightning/accelerators @williamfalcon @tchaton @SeanNaren @awaelchli @justusschock @kaushikb11
/pytorch_lightning/callbacks @williamfalcon @tchaton @carmocca @borda @kaushikb11
/pytorch_lightning/core @tchaton @SeanNaren @borda @carmocca @justusschock @kaushikb11
/pytorch_lightning/distributed @williamfalcon @tchaton @awaelchli @kaushikb11
/pytorch_lightning/lite @tchaton @awaelchli @carmocca
/pytorch_lightning/loggers @tchaton @awaelchli @borda
/pytorch_lightning/loggers/wandb.py @borisdayma
/pytorch_lightning/loggers/neptune.py @shnela @HubertJaworski @pkasprzyk @pitercl @Raalsky @aniezurawski @kamil-kaczmarek
/pytorch_lightning/loops @tchaton @awaelchli @justusschock @carmocca
/pytorch_lightning/overrides @tchaton @SeanNaren @borda
/pytorch_lightning/plugins @tchaton @SeanNaren @awaelchli @justusschock
/pytorch_lightning/profiler @williamfalcon @tchaton @borda @carmocca
/pytorch_lightning/profiler/pytorch.py @nbcsm @guotuofeng
/pytorch_lightning/strategies @tchaton @SeanNaren @awaelchli @justusschock @kaushikb11
/pytorch_lightning/trainer @williamfalcon @borda @tchaton @SeanNaren @carmocca @awaelchli @justusschock @kaushikb11
/pytorch_lightning/trainer/connectors @tchaton @SeanNaren @carmocca @borda
/pytorch_lightning/tuner @SkafteNicki @borda @awaelchli
/pytorch_lightning/utilities @borda @tchaton @SeanNaren @carmocca
/src/pytorch_lightning/accelerators @williamfalcon @tchaton @SeanNaren @awaelchli @justusschock @kaushikb11
/src/pytorch_lightning/callbacks @williamfalcon @tchaton @carmocca @borda @kaushikb11
/src/pytorch_lightning/core @tchaton @SeanNaren @borda @carmocca @justusschock @kaushikb11
/src/pytorch_lightning/distributed @williamfalcon @tchaton @awaelchli @kaushikb11
/src/pytorch_lightning/lite @tchaton @awaelchli @carmocca
/src/pytorch_lightning/loggers @tchaton @awaelchli @borda
/src/pytorch_lightning/loggers/wandb.py @borisdayma
/src/pytorch_lightning/loggers/neptune.py @shnela @HubertJaworski @pkasprzyk @pitercl @Raalsky @aniezurawski @kamil-kaczmarek
/src/pytorch_lightning/loops @tchaton @awaelchli @justusschock @carmocca
/src/pytorch_lightning/overrides @tchaton @SeanNaren @borda
/src/pytorch_lightning/plugins @tchaton @SeanNaren @awaelchli @justusschock
/src/pytorch_lightning/profiler @williamfalcon @tchaton @borda @carmocca
/src/pytorch_lightning/profiler/pytorch.py @nbcsm @guotuofeng
/src/pytorch_lightning/strategies @tchaton @SeanNaren @awaelchli @justusschock @kaushikb11
/src/pytorch_lightning/trainer @williamfalcon @borda @tchaton @SeanNaren @carmocca @awaelchli @justusschock @kaushikb11
/src/pytorch_lightning/trainer/connectors @tchaton @SeanNaren @carmocca @borda
/src/pytorch_lightning/tuner @SkafteNicki @borda @awaelchli
/src/pytorch_lightning/utilities @borda @tchaton @SeanNaren @carmocca

# Specifics
/pytorch_lightning/trainer/connectors/logger_connector @tchaton @carmocca
/pytorch_lightning/trainer/progress.py @tchaton @awaelchli @carmocca
/src/pytorch_lightning/trainer/connectors/logger_connector @tchaton @carmocca
/src/pytorch_lightning/trainer/progress.py @tchaton @awaelchli @carmocca

# API
/pytorch_lightning/callbacks/base.py @williamfalcon @awaelchli @ananthsub @carmocca
/pytorch_lightning/core/datamodule.py @williamFalcon @awaelchli @ananthsub @carmocca
/pytorch_lightning/trainer/trainer.py @williamfalcon @tchaton @awaelchli
/pytorch_lightning/core/hooks.py @williamfalcon @tchaton @awaelchli @ananthsub @carmocca
/pytorch_lightning/core/lightning.py @williamfalcon @tchaton @awaelchli
/src/pytorch_lightning/callbacks/base.py @williamfalcon @awaelchli @ananthsub @carmocca
/src/pytorch_lightning/core/datamodule.py @williamFalcon @awaelchli @ananthsub @carmocca
/src/pytorch_lightning/trainer/trainer.py @williamfalcon @tchaton @awaelchli
/src/pytorch_lightning/core/hooks.py @williamfalcon @tchaton @awaelchli @ananthsub @carmocca
/src/pytorch_lightning/core/lightning.py @williamfalcon @tchaton @awaelchli

# Testing
/tests/helpers/boring_model.py @williamfalcon @tchaton @borda
Expand All @@ -60,4 +60,4 @@
/SECURITY.md @williamfalcon
/README.md @williamfalcon @edenlightning @borda
/setup.py @williamfalcon @borda @carmocca
/pytorch_lightning/__about__.py @williamfalcon @borda @carmocca
/src/pytorch_lightning/__about__.py @williamfalcon @borda @carmocca
8 changes: 4 additions & 4 deletions .github/workflows/ci_pkg-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ jobs:
# install as archive
pip install *.tar.gz
cd ..
python -c "import pytorch_lightning as pl ; print(pl.__version__)"
pip uninstall -y pytorch-lightning
python -c "import pytorch_lightning ; print(pytorch_lightning.__version__)"
pip uninstall -y pytorch_lightning
- name: Install | Uninstall package - wheel
working-directory: ./dist
run: |
# install as wheel
pip install *.whl
cd ..
python -c "import pytorch_lightning as pl ; print(pl.__version__)"
pip uninstall -y pytorch-lightning
python -c "import pytorch_lightning ; print(pytorch_lightning.__version__)"
pip uninstall -y pytorch_lightning
5 changes: 3 additions & 2 deletions .github/workflows/ci_test-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ jobs:
run: |
conda info
conda list
pip install -e .
pip install -r requirements/test.txt
- name: DocTests
run: |
coverage run --source pytorch_lightning -m pytest pytorch_lightning
working-directory: ./src
run: pytest pytorch_lightning --cov=pytorch_lightning

- name: Update all dependencies
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci_test-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,14 @@ jobs:
run: |
flag=$(python -c "print('--pre' if '${{matrix.release}}' == 'pre' else '')" 2>&1)
url=$(python -c "print('test/cpu/torch_test.html' if '${{matrix.release}}' == 'pre' else 'cpu/torch_stable.html')" 2>&1)
pip install -r requirements.txt --upgrade $flag --find-links "https://download.pytorch.org/whl/${url}"
pip install -e . --upgrade $flag --find-links "https://download.pytorch.org/whl/${url}"
pip install -r requirements/test.txt --upgrade
pip list
shell: bash

- name: DocTests
run: coverage run --source pytorch_lightning -m pytest pytorch_lightning
working-directory: ./src
run: pytest pytorch_lightning --cov=pytorch_lightning

- name: Install extra dependencies
run: |
Expand Down Expand Up @@ -123,8 +124,7 @@ jobs:
key: pl-dataset

- name: Sanity check
run: |
python requirements/check-avail-extras.py
run: python requirements/check-avail-extras.py

- name: UnitTests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_test-slow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
run: |
# adjust versions according installed Torch version
python ./requirements/adjust-versions.py requirements.txt ${{ matrix.pytorch-version }}
pip install -r requirements.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
pip install -e . --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
pip install -r requirements/test.txt
pip list
shell: bash
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ jobs:
pip list
- name: Type check
run: mypy --install-types --non-interactive
working-directory: ./src
run: mypy -p pytorch_lightning --install-types --non-interactive --verbose --config-file ../pyproject.toml --warn-unused-configs
13 changes: 6 additions & 7 deletions .github/workflows/docs-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-td${{ env.TIME_PERIOD }}-${{ hashFiles('requirements/base.txt') }}
key: ${{ runner.os }}-docs-test-pip-td${{ env.TIME_PERIOD }}-${{ hashFiles('requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-pip-td${{ env.TIME_PERIOD }}-
${{ runner.os }}-docs-test-pip-td${{ env.TIME_PERIOD }}-
- name: Install dependencies
run: |
Expand All @@ -42,9 +42,8 @@ jobs:
pip --version
pip install -q fire
# python -m pip install --upgrade --user pip
pip install -r requirements.txt --upgrade-strategy only-if-needed --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --quiet
pip install -e . --quiet -r requirements/docs.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
pip install -r requirements/devel.txt
pip install -r requirements/docs.txt
pip list
shell: bash

Expand Down Expand Up @@ -74,16 +73,16 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/base.txt') }}
key: ${{ runner.os }}-docs-make-pip-${{ hashFiles('requirements/base.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-docs-make-pip-
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake pandoc
pip --version
pip install --requirement requirements/docs.txt
pip install -e . --quiet -r requirements/docs.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
# install Texlive, see https://linuxconfig.org/how-to-install-latex-on-ubuntu-20-04-focal-fossa-linux
sudo apt-get update && sudo apt-get install -y texlive-latex-extra dvipng texlive-pictures
pip list
Expand Down
3 changes: 2 additions & 1 deletion dockers/tpu-tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ LABEL maintainer="PyTorchLightning <https://github.com/PyTorchLightning>"
COPY ./ ./pytorch-lightning/

# Pull the legacy checkpoints
RUN cd pytorch-lightning && bash .actions/pull_legacy_checkpoints.sh
RUN cd pytorch-lightning && \
bash .actions/pull_legacy_checkpoints.sh

RUN \
pip install -q fire && \
Expand Down

0 comments on commit 2add5aa

Please sign in to comment.