Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to PyTorch 1.6 in Drone CI #4393

Merged
merged 36 commits into from
Nov 3, 2020
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
96cc987
switch to 1.6
Oct 27, 2020
78d5921
readme
Oct 27, 2020
4f377c7
1.7
Oct 28, 2020
ce599e4
back to normal [ci skip]
Oct 28, 2020
9f8d257
horovodrun --verbose
Oct 30, 2020
bf7d0ac
try with apex
Oct 30, 2020
ca852e2
add apex test
Oct 31, 2020
361eae0
Merge remote-tracking branch 'origin/master' into ci/pt-1.6
Oct 31, 2020
45de308
change base
Oct 31, 2020
be907b6
description
Oct 31, 2020
f2e193a
Merge remote-tracking branch 'origin/master' into ci/pt-1.6
Nov 1, 2020
dce3d1e
test with 1.7
Nov 1, 2020
b0c9d47
back to 1.6
Nov 1, 2020
560f862
no gradient_clip_val
Nov 1, 2020
e38d330
re-add gradient_clip_val
Nov 1, 2020
34b621a
no amp
Nov 1, 2020
85b6aa7
Merge branch 'master' into ci/pt-1.6
SeanNaren Nov 2, 2020
9459226
Merge branch 'master' into ci/pt-1.6
SeanNaren Nov 2, 2020
4f8c16f
temp skip torch.cuda.amp + horovod test
Nov 2, 2020
e03830e
Merge branch 'master' into ci/pt-1.6
Nov 2, 2020
87447e1
Apply suggestion from code review
Nov 2, 2020
a731f0c
Fix formatting
Nov 2, 2020
915890c
Merge branch 'master' into ci/pt-1.6
SeanNaren Nov 2, 2020
eacf3d9
Merge branch 'master' into ci/pt-1.6
SeanNaren Nov 2, 2020
eca1cb8
Merge branch 'master' into ci/pt-1.6
SeanNaren Nov 2, 2020
6214585
Merge branch 'master' into ci/pt-1.6
SeanNaren Nov 2, 2020
84f185a
Merge branch 'master' into ci/pt-1.6
SeanNaren Nov 2, 2020
c96939d
Merge branch 'master' into ci/pt-1.6
SeanNaren Nov 2, 2020
b7bc017
Merge remote-tracking branch 'origin/master' into ci/pt-1.6
Nov 3, 2020
0877012
ddp
Nov 3, 2020
913ac84
Moved extended model outside of function to prevent pickling issue fo…
Nov 3, 2020
578411a
typo
Nov 3, 2020
f70f57a
Merge branch 'master' into ci/pt-1.6
tchaton Nov 3, 2020
1f9ce19
resolve bug
tchaton Nov 3, 2020
56954cf
extract automatic_automization
tchaton Nov 3, 2020
74dd9b6
Merge branch 'master' into ci/pt-1.6
tchaton Nov 3, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ name: torch-GPU

steps:
- name: testing
image: pytorchlightning/pytorch_lightning:base-cuda-py3.7-torch1.5
image: pytorchlightning/pytorch_lightning:base-cuda-py3.7-torch1.6

environment:
CODECOV_TOKEN:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Lightning can automatically export to ONNX or TorchScript for those cases.
| System / PyTorch ver. | 1.3 (min. req.)* | 1.4 | 1.5 | 1.6 | 1.7 (latest) |
| :---: | :---: | :---: | :---: | :---: | :---: |
| Conda py3.7 [linux] | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) |
| Linux py3.7 [GPUs**] | - | - | [![Build Status](http://104.154.220.231/api/badges/PyTorchLightning/pytorch-lightning/status.svg)](http://104.154.220.231/PyTorchLightning/pytorch-lightning) | - | - |
| Linux py3.7 [GPUs**] | - | - | - | [![Build Status](http://104.154.220.231/api/badges/PyTorchLightning/pytorch-lightning/status.svg)](http://104.154.220.231/PyTorchLightning/pytorch-lightning) | - |
| Linux py3.7 [TPUs***] | - | - | - | [![TPU tests](https://github.com/PyTorchLightning/pytorch-lightning/workflows/TPU%20tests/badge.svg)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22TPU+tests%22+branch%3Amaster) | - |
| Linux py3.6 / py3.7 / py3.8 | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | - | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) |
| OSX py3.6 / py3.7 | - | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) |
Expand Down
29 changes: 28 additions & 1 deletion tests/models/test_horovod.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import tests.base.develop_pipelines as tpipes
import tests.base.develop_utils as tutils
from pytorch_lightning import Trainer
from pytorch_lightning.utilities import APEX_AVAILABLE, NATIVE_AMP_AVALAIBLE
from tests.base import EvalModelTemplate
from tests.base.models import BasicGAN

Expand Down Expand Up @@ -126,8 +127,33 @@ def test_horovod_multi_gpu(tmpdir):
@pytest.mark.skipif(platform.system() == "Windows", reason="Horovod is not supported on Windows")
@pytest.mark.skipif(not _nccl_available(), reason="test requires Horovod with NCCL support")
@pytest.mark.skipif(torch.cuda.device_count() < 2, reason="test requires multi-GPU machine")
@pytest.mark.skipif(not APEX_AVAILABLE, reason="test requires apex")
def test_horovod_apex(tmpdir):
"""Test Horovod with multi-GPU support using apex amp."""
trainer_options = dict(
default_root_dir=str(tmpdir),
weights_save_path=str(tmpdir),
gradient_clip_val=1.0,
progress_bar_refresh_rate=0,
max_epochs=1,
limit_train_batches=0.4,
limit_val_batches=0.2,
gpus=2,
deterministic=True,
distributed_backend='horovod',
amp_backend='apex',
precision=16,
)
_run_horovod(trainer_options, on_gpu=True)


@pytest.mark.skip(reason="Skip till Horovod fixes integration with Native torch.cuda.amp")
@pytest.mark.skipif(platform.system() == "Windows", reason="Horovod is not supported on Windows")
@pytest.mark.skipif(not _nccl_available(), reason="test requires Horovod with NCCL support")
@pytest.mark.skipif(torch.cuda.device_count() < 2, reason="test requires multi-GPU machine")
@pytest.mark.skipif(not NATIVE_AMP_AVALAIBLE, reason="test requires torch.cuda.amp")
def test_horovod_amp(tmpdir):
"""Test Horovod with multi-GPU support."""
"""Test Horovod with multi-GPU support using native amp."""
trainer_options = dict(
default_root_dir=str(tmpdir),
weights_save_path=str(tmpdir),
Expand All @@ -139,6 +165,7 @@ def test_horovod_amp(tmpdir):
gpus=2,
deterministic=True,
distributed_backend='horovod',
amp_backend='native',
precision=16,
)
_run_horovod(trainer_options, on_gpu=True)
Expand Down