From 9bc719699271d914e972af5e9f6e8ec3914e6520 Mon Sep 17 00:00:00 2001 From: Jirka Date: Tue, 2 Jun 2020 20:36:30 +0200 Subject: [PATCH 01/10] tests drop macOS py38 --- .github/workflows/ci-testing.yml | 3 +++ .mergify.yml | 2 +- README.md | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 99262031aed4d..4dbbbf6978435 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -19,6 +19,9 @@ jobs: # excludes PT 1.3 as it is missing on pypi - python-version: 3.8 requires: 'minimal' + # TODO: temporary suspension for hanging Batch finder + - python-version: 3.8 + os: 'macOS' # Timeout: https://stackoverflow.com/a/59076067/4521646 timeout-minutes: 15 diff --git a/.mergify.yml b/.mergify.yml index 3021251b91830..23557f08a932b 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -10,7 +10,7 @@ pull_request_rules: # no requested chnages from any reviewer - "#changes-requested-reviews-by=0" # this serves as ALL check has to pass as we have actually 27 tests in total - - "#status-success>=28" + - "#status-success>=27" # this is just in case since we rely on GPU tests (note: redundand to the above) - status-success=continuous-integration/drone/pr # this is patter-like, unofrunatly serves as `any(...)` (note: redundand to the above) diff --git a/README.md b/README.md index 387bd79f5df24..4b86e98a41f56 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ removed until codecov badge isn't empy. likely a config error showing nothing on | Linux py3.6 [CPU] | [![CircleCI](https://circleci.com/gh/PyTorchLightning/pytorch-lightning.svg?style=svg)](https://circleci.com/gh/PyTorchLightning/pytorch-lightning) | [![CircleCI](https://circleci.com/gh/PyTorchLightning/pytorch-lightning.svg?style=svg)](https://circleci.com/gh/PyTorchLightning/pytorch-lightning) | [![CircleCI](https://circleci.com/gh/PyTorchLightning/pytorch-lightning.svg?style=svg)](https://circleci.com/gh/PyTorchLightning/pytorch-lightning) | | Linux py3.7 [GPU] | - | - | [![Build Status](http://35.192.60.23/api/badges/PyTorchLightning/pytorch-lightning/status.svg)](http://35.192.60.23/PyTorchLightning/pytorch-lightning) | | Linux py3.6 / py3.7 / py3.8 | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | -| OSX py3.6 / py3.7 / py3.8| - | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | +| OSX py3.6 / py3.7 | - | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | | Windows py3.6 / py3.7 / py3.8 | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) |[![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | From 5fd9e85f22851628576559ac7df5aaab5f54c7a4 Mon Sep 17 00:00:00 2001 From: Jirka Date: Tue, 2 Jun 2020 22:03:52 +0200 Subject: [PATCH 02/10] ignore single test --- .github/workflows/ci-testing.yml | 3 --- .mergify.yml | 2 +- README.md | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 4dbbbf6978435..99262031aed4d 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -19,9 +19,6 @@ jobs: # excludes PT 1.3 as it is missing on pypi - python-version: 3.8 requires: 'minimal' - # TODO: temporary suspension for hanging Batch finder - - python-version: 3.8 - os: 'macOS' # Timeout: https://stackoverflow.com/a/59076067/4521646 timeout-minutes: 15 diff --git a/.mergify.yml b/.mergify.yml index 23557f08a932b..3021251b91830 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -10,7 +10,7 @@ pull_request_rules: # no requested chnages from any reviewer - "#changes-requested-reviews-by=0" # this serves as ALL check has to pass as we have actually 27 tests in total - - "#status-success>=27" + - "#status-success>=28" # this is just in case since we rely on GPU tests (note: redundand to the above) - status-success=continuous-integration/drone/pr # this is patter-like, unofrunatly serves as `any(...)` (note: redundand to the above) diff --git a/README.md b/README.md index 4b86e98a41f56..54cd75262fc50 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ removed until codecov badge isn't empy. likely a config error showing nothing on | Linux py3.6 [CPU] | [![CircleCI](https://circleci.com/gh/PyTorchLightning/pytorch-lightning.svg?style=svg)](https://circleci.com/gh/PyTorchLightning/pytorch-lightning) | [![CircleCI](https://circleci.com/gh/PyTorchLightning/pytorch-lightning.svg?style=svg)](https://circleci.com/gh/PyTorchLightning/pytorch-lightning) | [![CircleCI](https://circleci.com/gh/PyTorchLightning/pytorch-lightning.svg?style=svg)](https://circleci.com/gh/PyTorchLightning/pytorch-lightning) | | Linux py3.7 [GPU] | - | - | [![Build Status](http://35.192.60.23/api/badges/PyTorchLightning/pytorch-lightning/status.svg)](http://35.192.60.23/PyTorchLightning/pytorch-lightning) | | Linux py3.6 / py3.7 / py3.8 | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | -| OSX py3.6 / py3.7 | - | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | +| OSX py3.6 / py3.7 / py3.8 | - | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | | Windows py3.6 / py3.7 / py3.8 | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) |[![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | From ce95f09eb2b949e62d9c9eb290b2ec0d71daaadf Mon Sep 17 00:00:00 2001 From: Jirka Date: Tue, 2 Jun 2020 22:04:38 +0200 Subject: [PATCH 03/10] try freeze env --- tests/loggers/test_all.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/loggers/test_all.py b/tests/loggers/test_all.py index 54a54204fe28f..c0006cb3cc108 100644 --- a/tests/loggers/test_all.py +++ b/tests/loggers/test_all.py @@ -1,5 +1,7 @@ import inspect import pickle +import platform +import sys import pytest @@ -102,6 +104,9 @@ def test_loggers_pickle(tmpdir, monkeypatch, logger_class): pytest.param(dict(max_epochs=1, auto_scale_batch_size=True), id='Batch-size-Finder'), pytest.param(dict(max_epochs=3, auto_lr_find=True), id='LR-Finder'), ]) +# TODO: temporary suspension for hanging Batch finder +@pytest.mark.skipif((sys.version_info >= (3, 8) and platform.system() == "Darwin"), + reason="Temporary issue with Python 3.8 on macOS") def test_logger_reset_correctly(tmpdir, extra_params): """ Test that the tuners do not alter the logger reference """ tutils.reset_seed() From 75156218ed3c93b9184164e26e83fa94fcd8e8ab Mon Sep 17 00:00:00 2001 From: Jirka Date: Wed, 3 Jun 2020 00:03:24 +0200 Subject: [PATCH 04/10] drop --- tests/models/test_restore.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/models/test_restore.py b/tests/models/test_restore.py index 856df9225c70f..94a99f933bdf6 100644 --- a/tests/models/test_restore.py +++ b/tests/models/test_restore.py @@ -1,6 +1,8 @@ import glob import logging as log import os +import platform +import sys import pytest import torch @@ -214,6 +216,9 @@ def assert_good_acc(): model.unfreeze() +# TODO: temporary suspension for Python 3.8 on macOS +@pytest.mark.skipif((sys.version_info >= (3, 8) and platform.system() == "Darwin"), + reason="Temporary issue with Python 3.8 on macOS") def test_model_saving_loading(tmpdir): """Tests use case where trainer saves the model, and user loads it from tags independently.""" model = EvalModelTemplate() From 6898441993eb9421ef6d5f5f547584af2ab228dc Mon Sep 17 00:00:00 2001 From: Jirka Date: Wed, 3 Jun 2020 00:25:49 +0200 Subject: [PATCH 05/10] drop --- tests/models/test_cpu.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/models/test_cpu.py b/tests/models/test_cpu.py index 08d1bddbd8b42..26dce8372a131 100644 --- a/tests/models/test_cpu.py +++ b/tests/models/test_cpu.py @@ -1,5 +1,6 @@ import os import platform +import sys from collections import namedtuple import pytest @@ -279,6 +280,9 @@ def test_single_gpu_batch_parse(): assert batch[0].a.type() == 'torch.cuda.FloatTensor' +# TODO: temporary suspension for Python 3.8 on macOS +@pytest.mark.skipif((sys.version_info >= (3, 8) and platform.system() == "Darwin"), + reason="Temporary issue with Python 3.8 on macOS") def test_simple_cpu(tmpdir): """Verify continue training session on CPU.""" model = EvalModelTemplate() From 17a5eb2c39841658e9db5743fafb289b7f2ae50f Mon Sep 17 00:00:00 2001 From: Jirka Date: Wed, 3 Jun 2020 00:44:11 +0200 Subject: [PATCH 06/10] drop --- tests/models/test_hooks.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/models/test_hooks.py b/tests/models/test_hooks.py index 47b73eb9e715b..517af01b945a5 100644 --- a/tests/models/test_hooks.py +++ b/tests/models/test_hooks.py @@ -1,3 +1,6 @@ +import platform +import sys + from unittest.mock import MagicMock import pytest @@ -31,6 +34,9 @@ def on_before_zero_grad(self, optimizer): assert 0 == model.on_before_zero_grad_called +# TODO: temporary suspension for Python 3.8 on macOS +@pytest.mark.skipif((sys.version_info >= (3, 8) and platform.system() == "Darwin"), + reason="Temporary issue with Python 3.8 on macOS") def test_training_epoch_end_metrics_collection(tmpdir): """ Test that progress bar metrics also get collected at the end of an epoch. """ num_epochs = 3 From 8fef33290e2a26fd52a79ae39551a057dfb60520 Mon Sep 17 00:00:00 2001 From: Jirka Date: Wed, 3 Jun 2020 01:02:20 +0200 Subject: [PATCH 07/10] drop --- tests/models/test_restore.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/models/test_restore.py b/tests/models/test_restore.py index 94a99f933bdf6..09218cde21358 100644 --- a/tests/models/test_restore.py +++ b/tests/models/test_restore.py @@ -66,6 +66,9 @@ def test_running_test_pretrained_model_distrib(tmpdir, backend): tutils.run_prediction(dataloader, pretrained_model) +# TODO: temporary suspension for Python 3.8 on macOS +@pytest.mark.skipif((sys.version_info >= (3, 8) and platform.system() == "Darwin"), + reason="Temporary issue with Python 3.8 on macOS") def test_running_test_pretrained_model_cpu(tmpdir): """Verify test() on pretrained model.""" model = EvalModelTemplate() From d400636dda28536b136dbb465913d06ad667dbf8 Mon Sep 17 00:00:00 2001 From: Jirka Date: Wed, 3 Jun 2020 11:23:37 +0200 Subject: [PATCH 08/10] drop skips --- tests/loggers/test_all.py | 3 --- tests/models/test_cpu.py | 3 --- tests/models/test_hooks.py | 3 --- tests/models/test_restore.py | 6 ------ 4 files changed, 15 deletions(-) diff --git a/tests/loggers/test_all.py b/tests/loggers/test_all.py index c0006cb3cc108..243a4f57e28de 100644 --- a/tests/loggers/test_all.py +++ b/tests/loggers/test_all.py @@ -104,9 +104,6 @@ def test_loggers_pickle(tmpdir, monkeypatch, logger_class): pytest.param(dict(max_epochs=1, auto_scale_batch_size=True), id='Batch-size-Finder'), pytest.param(dict(max_epochs=3, auto_lr_find=True), id='LR-Finder'), ]) -# TODO: temporary suspension for hanging Batch finder -@pytest.mark.skipif((sys.version_info >= (3, 8) and platform.system() == "Darwin"), - reason="Temporary issue with Python 3.8 on macOS") def test_logger_reset_correctly(tmpdir, extra_params): """ Test that the tuners do not alter the logger reference """ tutils.reset_seed() diff --git a/tests/models/test_cpu.py b/tests/models/test_cpu.py index 26dce8372a131..a9c182200ea14 100644 --- a/tests/models/test_cpu.py +++ b/tests/models/test_cpu.py @@ -280,9 +280,6 @@ def test_single_gpu_batch_parse(): assert batch[0].a.type() == 'torch.cuda.FloatTensor' -# TODO: temporary suspension for Python 3.8 on macOS -@pytest.mark.skipif((sys.version_info >= (3, 8) and platform.system() == "Darwin"), - reason="Temporary issue with Python 3.8 on macOS") def test_simple_cpu(tmpdir): """Verify continue training session on CPU.""" model = EvalModelTemplate() diff --git a/tests/models/test_hooks.py b/tests/models/test_hooks.py index 517af01b945a5..c7158f21d7b3a 100644 --- a/tests/models/test_hooks.py +++ b/tests/models/test_hooks.py @@ -34,9 +34,6 @@ def on_before_zero_grad(self, optimizer): assert 0 == model.on_before_zero_grad_called -# TODO: temporary suspension for Python 3.8 on macOS -@pytest.mark.skipif((sys.version_info >= (3, 8) and platform.system() == "Darwin"), - reason="Temporary issue with Python 3.8 on macOS") def test_training_epoch_end_metrics_collection(tmpdir): """ Test that progress bar metrics also get collected at the end of an epoch. """ num_epochs = 3 diff --git a/tests/models/test_restore.py b/tests/models/test_restore.py index 09218cde21358..b9832db0d2fc7 100644 --- a/tests/models/test_restore.py +++ b/tests/models/test_restore.py @@ -66,9 +66,6 @@ def test_running_test_pretrained_model_distrib(tmpdir, backend): tutils.run_prediction(dataloader, pretrained_model) -# TODO: temporary suspension for Python 3.8 on macOS -@pytest.mark.skipif((sys.version_info >= (3, 8) and platform.system() == "Darwin"), - reason="Temporary issue with Python 3.8 on macOS") def test_running_test_pretrained_model_cpu(tmpdir): """Verify test() on pretrained model.""" model = EvalModelTemplate() @@ -219,9 +216,6 @@ def assert_good_acc(): model.unfreeze() -# TODO: temporary suspension for Python 3.8 on macOS -@pytest.mark.skipif((sys.version_info >= (3, 8) and platform.system() == "Darwin"), - reason="Temporary issue with Python 3.8 on macOS") def test_model_saving_loading(tmpdir): """Tests use case where trainer saves the model, and user loads it from tags independently.""" model = EvalModelTemplate() From 28f7bae1227c6687d2028f931406af200178550e Mon Sep 17 00:00:00 2001 From: Jirka Date: Wed, 3 Jun 2020 11:23:54 +0200 Subject: [PATCH 09/10] drop macOS py38 --- .github/workflows/ci-testing.yml | 3 +++ README.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 99262031aed4d..15447c5d5baa4 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -19,6 +19,9 @@ jobs: # excludes PT 1.3 as it is missing on pypi - python-version: 3.8 requires: 'minimal' + # temporary fix till hanging jobs on macOS for py38 is resolved + - python-version: 3.8 + os: 'macOS' # Timeout: https://stackoverflow.com/a/59076067/4521646 timeout-minutes: 15 diff --git a/README.md b/README.md index 54cd75262fc50..4b86e98a41f56 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ removed until codecov badge isn't empy. likely a config error showing nothing on | Linux py3.6 [CPU] | [![CircleCI](https://circleci.com/gh/PyTorchLightning/pytorch-lightning.svg?style=svg)](https://circleci.com/gh/PyTorchLightning/pytorch-lightning) | [![CircleCI](https://circleci.com/gh/PyTorchLightning/pytorch-lightning.svg?style=svg)](https://circleci.com/gh/PyTorchLightning/pytorch-lightning) | [![CircleCI](https://circleci.com/gh/PyTorchLightning/pytorch-lightning.svg?style=svg)](https://circleci.com/gh/PyTorchLightning/pytorch-lightning) | | Linux py3.7 [GPU] | - | - | [![Build Status](http://35.192.60.23/api/badges/PyTorchLightning/pytorch-lightning/status.svg)](http://35.192.60.23/PyTorchLightning/pytorch-lightning) | | Linux py3.6 / py3.7 / py3.8 | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | -| OSX py3.6 / py3.7 / py3.8 | - | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | +| OSX py3.6 / py3.7 | - | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | | Windows py3.6 / py3.7 / py3.8 | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) |[![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | From da129fb73a97aaf1ab8afdd7e93b764003471d00 Mon Sep 17 00:00:00 2001 From: Jirka Date: Wed, 3 Jun 2020 11:31:39 +0200 Subject: [PATCH 10/10] imports --- tests/loggers/test_all.py | 2 -- tests/models/test_cpu.py | 1 - tests/models/test_hooks.py | 3 --- tests/models/test_restore.py | 2 -- 4 files changed, 8 deletions(-) diff --git a/tests/loggers/test_all.py b/tests/loggers/test_all.py index 243a4f57e28de..54a54204fe28f 100644 --- a/tests/loggers/test_all.py +++ b/tests/loggers/test_all.py @@ -1,7 +1,5 @@ import inspect import pickle -import platform -import sys import pytest diff --git a/tests/models/test_cpu.py b/tests/models/test_cpu.py index a9c182200ea14..08d1bddbd8b42 100644 --- a/tests/models/test_cpu.py +++ b/tests/models/test_cpu.py @@ -1,6 +1,5 @@ import os import platform -import sys from collections import namedtuple import pytest diff --git a/tests/models/test_hooks.py b/tests/models/test_hooks.py index c7158f21d7b3a..47b73eb9e715b 100644 --- a/tests/models/test_hooks.py +++ b/tests/models/test_hooks.py @@ -1,6 +1,3 @@ -import platform -import sys - from unittest.mock import MagicMock import pytest diff --git a/tests/models/test_restore.py b/tests/models/test_restore.py index b9832db0d2fc7..856df9225c70f 100644 --- a/tests/models/test_restore.py +++ b/tests/models/test_restore.py @@ -1,8 +1,6 @@ import glob import logging as log import os -import platform -import sys import pytest import torch