From 0d55b9830cb2ad1dc075cc9994aace3b400f4276 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 15 Mar 2021 10:35:04 +0100 Subject: [PATCH 01/25] update coverage config --- setup.cfg | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/setup.cfg b/setup.cfg index ab1e1e8c1addc..5c8abb9028904 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,6 +32,10 @@ markers = junit_duration_report = call +[coverage:run] +parallel = False +concurrency = thread, multiprocessing + [coverage:report] exclude_lines = pragma: no-cover @@ -47,11 +51,6 @@ omit = pytorch_lightning/utilities/xla_device_utils.py pytorch_lightning/utilities/distributed.py pytorch_lightning/tuner/auto_gpu_select.py - # TODO: temporary, until accelerator refactor is finished - pytorch_lightning/accelerators/accelerator.py - pytorch_lightning/plugins/training_type/*.py - pytorch_lightning/plugins/precision/*.py - pytorch_lightning/plugins/base_plugin.py [flake8] From e697a0abda7b821cff952304a6864485cb1316a3 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 15 Mar 2021 12:00:54 +0100 Subject: [PATCH 02/25] parallel --- setup.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 5c8abb9028904..965d0d3999d6b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,8 +33,8 @@ junit_duration_report = call [coverage:run] -parallel = False -concurrency = thread, multiprocessing +parallel = True +#concurrency = thread, multiprocessing [coverage:report] exclude_lines = From 8f73b59160fedddfa4a146677c2333e6774379a8 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 15 Mar 2021 12:07:38 +0100 Subject: [PATCH 03/25] parallel --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 965d0d3999d6b..eb9e17ed63f2d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,6 +35,7 @@ junit_duration_report = call [coverage:run] parallel = True #concurrency = thread, multiprocessing +concurrency = thread [coverage:report] exclude_lines = From ed71ae32e13d0bf066714558d0e464e02a1b7f73 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 15 Mar 2021 12:27:46 +0100 Subject: [PATCH 04/25] Apply suggestions from code review --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index eb9e17ed63f2d..685deb38653b3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,7 +35,7 @@ junit_duration_report = call [coverage:run] parallel = True #concurrency = thread, multiprocessing -concurrency = thread +concurrency = multiprocessing [coverage:report] exclude_lines = From 755ba8a508a80f755944cf75f1d50562d50fd2d4 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 15 Mar 2021 13:00:54 +0100 Subject: [PATCH 05/25] Apply suggestions from code review --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 685deb38653b3..eb9e17ed63f2d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,7 +35,7 @@ junit_duration_report = call [coverage:run] parallel = True #concurrency = thread, multiprocessing -concurrency = multiprocessing +concurrency = thread [coverage:report] exclude_lines = From d68eb27d9af9881127e592dc1c436c1baaae57b1 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 15 Mar 2021 13:25:25 +0100 Subject: [PATCH 06/25] paralel --- tests/special_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/special_tests.sh b/tests/special_tests.sh index 3fe9d6c0e277c..52a84266f1075 100644 --- a/tests/special_tests.sh +++ b/tests/special_tests.sh @@ -14,7 +14,7 @@ # Running special tests set -e export PL_RUNNING_SPECIAL_TESTS=1 -DEFAULTS="-m coverage run --source pytorch_lightning -a -m pytest --verbose --capture=no" +DEFAULTS="-m coverage run --source pytorch_lightning -a --parallel=false -m pytest --verbose --capture=no" python ${DEFAULTS} tests/trainer/optimization/test_manual_optimization.py::test_step_with_optimizer_closure_with_different_frequencies_ddp python ${DEFAULTS} tests/models/test_sync_batchnorm.py::test_sync_batchnorm_ddp python ${DEFAULTS} tests/plugins/test_deepspeed_plugin.py::test_invalid_deepspeed_defaults_no_precision From a79e507eac8d633e2ccb1e594aeaaeaa5a3db50f Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 15 Mar 2021 14:18:53 +0100 Subject: [PATCH 07/25] paralel --- tests/special_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/special_tests.sh b/tests/special_tests.sh index 52a84266f1075..cf3c7f9218e03 100644 --- a/tests/special_tests.sh +++ b/tests/special_tests.sh @@ -14,7 +14,7 @@ # Running special tests set -e export PL_RUNNING_SPECIAL_TESTS=1 -DEFAULTS="-m coverage run --source pytorch_lightning -a --parallel=false -m pytest --verbose --capture=no" +DEFAULTS="-m coverage run --source pytorch_lightning -a --parallel-mode=false -m pytest --verbose --capture=no" python ${DEFAULTS} tests/trainer/optimization/test_manual_optimization.py::test_step_with_optimizer_closure_with_different_frequencies_ddp python ${DEFAULTS} tests/models/test_sync_batchnorm.py::test_sync_batchnorm_ddp python ${DEFAULTS} tests/plugins/test_deepspeed_plugin.py::test_invalid_deepspeed_defaults_no_precision From 4d889ac216b69a5c3e26087df1c39e2b04bb91d9 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 15 Mar 2021 14:48:04 +0100 Subject: [PATCH 08/25] paralel --- setup.cfg | 2 +- tests/special_tests.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index eb9e17ed63f2d..e43ac14ced957 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,7 +33,7 @@ junit_duration_report = call [coverage:run] -parallel = True +#parallel = True #concurrency = thread, multiprocessing concurrency = thread diff --git a/tests/special_tests.sh b/tests/special_tests.sh index cf3c7f9218e03..3fe9d6c0e277c 100644 --- a/tests/special_tests.sh +++ b/tests/special_tests.sh @@ -14,7 +14,7 @@ # Running special tests set -e export PL_RUNNING_SPECIAL_TESTS=1 -DEFAULTS="-m coverage run --source pytorch_lightning -a --parallel-mode=false -m pytest --verbose --capture=no" +DEFAULTS="-m coverage run --source pytorch_lightning -a -m pytest --verbose --capture=no" python ${DEFAULTS} tests/trainer/optimization/test_manual_optimization.py::test_step_with_optimizer_closure_with_different_frequencies_ddp python ${DEFAULTS} tests/models/test_sync_batchnorm.py::test_sync_batchnorm_ddp python ${DEFAULTS} tests/plugins/test_deepspeed_plugin.py::test_invalid_deepspeed_defaults_no_precision From 3835df602d96338704746243cd3a5d6796e9ddfd Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 15 Mar 2021 16:56:57 +0100 Subject: [PATCH 09/25] combine --- setup.cfg | 2 +- tests/special_tests.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index e43ac14ced957..eb9e17ed63f2d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,7 +33,7 @@ junit_duration_report = call [coverage:run] -#parallel = True +parallel = True #concurrency = thread, multiprocessing concurrency = thread diff --git a/tests/special_tests.sh b/tests/special_tests.sh index 3fe9d6c0e277c..059f3a2bfaad0 100644 --- a/tests/special_tests.sh +++ b/tests/special_tests.sh @@ -14,7 +14,8 @@ # Running special tests set -e export PL_RUNNING_SPECIAL_TESTS=1 -DEFAULTS="-m coverage run --source pytorch_lightning -a -m pytest --verbose --capture=no" +python -m coverage combine --append +DEFAULTS="-m pytest --verbose --cov=pytorch_lightning --capture=no" python ${DEFAULTS} tests/trainer/optimization/test_manual_optimization.py::test_step_with_optimizer_closure_with_different_frequencies_ddp python ${DEFAULTS} tests/models/test_sync_batchnorm.py::test_sync_batchnorm_ddp python ${DEFAULTS} tests/plugins/test_deepspeed_plugin.py::test_invalid_deepspeed_defaults_no_precision From 124d299f95d223fc40302ed560d0106b41a384b6 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 15 Mar 2021 17:00:17 +0100 Subject: [PATCH 10/25] combine --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b7a2d851052ed..ac48f0284b9ac 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -86,6 +86,7 @@ jobs: displayName: 'Testing: special' - bash: | + python -m coverage combine python -m coverage report python -m coverage xml python -m coverage html From d65bc0115b2198e48bbfe8675b234013c39815f9 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Tue, 16 Mar 2021 19:22:19 +0100 Subject: [PATCH 11/25] . --- tests/special_tests.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/special_tests.sh b/tests/special_tests.sh index 059f3a2bfaad0..2978926d1c55c 100644 --- a/tests/special_tests.sh +++ b/tests/special_tests.sh @@ -14,7 +14,6 @@ # Running special tests set -e export PL_RUNNING_SPECIAL_TESTS=1 -python -m coverage combine --append DEFAULTS="-m pytest --verbose --cov=pytorch_lightning --capture=no" python ${DEFAULTS} tests/trainer/optimization/test_manual_optimization.py::test_step_with_optimizer_closure_with_different_frequencies_ddp python ${DEFAULTS} tests/models/test_sync_batchnorm.py::test_sync_batchnorm_ddp From 2d04601d45b682e373f3473a5e419db9e08b1a59 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Tue, 16 Mar 2021 19:36:10 +0100 Subject: [PATCH 12/25] .. --- tests/special_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/special_tests.sh b/tests/special_tests.sh index 2978926d1c55c..1ab3237729354 100644 --- a/tests/special_tests.sh +++ b/tests/special_tests.sh @@ -14,7 +14,7 @@ # Running special tests set -e export PL_RUNNING_SPECIAL_TESTS=1 -DEFAULTS="-m pytest --verbose --cov=pytorch_lightning --capture=no" +DEFAULTS="-m pytest --verbose --cov=pytorch_lightning --cov-append --capture=no" python ${DEFAULTS} tests/trainer/optimization/test_manual_optimization.py::test_step_with_optimizer_closure_with_different_frequencies_ddp python ${DEFAULTS} tests/models/test_sync_batchnorm.py::test_sync_batchnorm_ddp python ${DEFAULTS} tests/plugins/test_deepspeed_plugin.py::test_invalid_deepspeed_defaults_no_precision From 1954e9bcf1594cf717a3999efe583bbd3289f3fd Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Sat, 20 Mar 2021 11:04:43 +0100 Subject: [PATCH 13/25] .. --- .github/workflows/ci_test-base.yml | 3 ++- .github/workflows/ci_test-full.yml | 3 ++- azure-pipelines.yml | 2 +- setup.cfg | 9 +++++---- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci_test-base.yml b/.github/workflows/ci_test-base.yml index 0e84642e2f810..f4a8538f8d1dd 100644 --- a/.github/workflows/ci_test-base.yml +++ b/.github/workflows/ci_test-base.yml @@ -68,7 +68,8 @@ jobs: - name: Test Package [only] run: | # NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003 - python -m pytest pytorch_lightning -v --cov=pytorch_lightning --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml + # todo: after moving parallel and thread to coonfing, drop these options + python -m pytest pytorch_lightning -v --cov=pytorch_lightning --paralel-mode --concurrency=thread --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml - name: Upload pytest test results uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_test-full.yml b/.github/workflows/ci_test-full.yml index ba8d804414993..63a449c149da6 100644 --- a/.github/workflows/ci_test-full.yml +++ b/.github/workflows/ci_test-full.yml @@ -134,7 +134,8 @@ jobs: - name: Tests run: | # NOTE: do not include coverage report here, see: https://github.com/nedbat/coveragepy/issues/1003 - python -m pytest pytorch_lightning tests --cov=pytorch_lightning -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}.xml + # todo: after moving parallel and thread to coonfing, drop these options + python -m pytest pytorch_lightning tests -v --cov=pytorch_lightning --paralel-mode --concurrency=thread --durations=50 --junitxml=junit/test-results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}.xml - name: Examples run: | diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ac48f0284b9ac..994e4353519b0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -86,7 +86,7 @@ jobs: displayName: 'Testing: special' - bash: | - python -m coverage combine + # python -m coverage combine python -m coverage report python -m coverage xml python -m coverage html diff --git a/setup.cfg b/setup.cfg index eb9e17ed63f2d..61a97145932ed 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,10 +32,11 @@ markers = junit_duration_report = call -[coverage:run] -parallel = True -#concurrency = thread, multiprocessing -concurrency = thread +# todo: shall be fixed upon refactoring collecting stats from special DDP tests +;[coverage:run] +;parallel = True +;#concurrency = thread, multiprocessing +;concurrency = thread [coverage:report] exclude_lines = From eb06f9d5735412c297c011e713c9dbef07c100ef Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Sat, 20 Mar 2021 11:11:29 +0100 Subject: [PATCH 14/25] .. --- .github/workflows/ci_test-base.yml | 2 +- .github/workflows/ci_test-full.yml | 2 +- setup.cfg | 9 ++++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci_test-base.yml b/.github/workflows/ci_test-base.yml index f4a8538f8d1dd..b01f9d30a5aaa 100644 --- a/.github/workflows/ci_test-base.yml +++ b/.github/workflows/ci_test-base.yml @@ -69,7 +69,7 @@ jobs: run: | # NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003 # todo: after moving parallel and thread to coonfing, drop these options - python -m pytest pytorch_lightning -v --cov=pytorch_lightning --paralel-mode --concurrency=thread --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml + python -m pytest pytorch_lightning -v --cov=pytorch_lightning --parallel-mode --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml - name: Upload pytest test results uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_test-full.yml b/.github/workflows/ci_test-full.yml index 63a449c149da6..0d2f3955eedf6 100644 --- a/.github/workflows/ci_test-full.yml +++ b/.github/workflows/ci_test-full.yml @@ -135,7 +135,7 @@ jobs: run: | # NOTE: do not include coverage report here, see: https://github.com/nedbat/coveragepy/issues/1003 # todo: after moving parallel and thread to coonfing, drop these options - python -m pytest pytorch_lightning tests -v --cov=pytorch_lightning --paralel-mode --concurrency=thread --durations=50 --junitxml=junit/test-results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}.xml + python -m pytest pytorch_lightning tests -v --cov=pytorch_lightning --parallel-mode --durations=50 --junitxml=junit/test-results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}.xml - name: Examples run: | diff --git a/setup.cfg b/setup.cfg index 61a97145932ed..006ab028408d3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,12 +31,11 @@ markers = gpus_param_tests junit_duration_report = call - # todo: shall be fixed upon refactoring collecting stats from special DDP tests -;[coverage:run] -;parallel = True -;#concurrency = thread, multiprocessing -;concurrency = thread +[coverage:run] +# parallel = True +#concurrency = thread, multiprocessing +concurrency = thread [coverage:report] exclude_lines = From b7e2548eefe941fa52858b9f856db6524bed9568 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Sat, 20 Mar 2021 11:26:58 +0100 Subject: [PATCH 15/25] rev --- .github/workflows/ci_test-base.yml | 4 ++-- .github/workflows/ci_test-full.yml | 4 ++-- azure-pipelines.yml | 4 ++-- setup.cfg | 4 ++-- tests/special_tests.sh | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci_test-base.yml b/.github/workflows/ci_test-base.yml index b01f9d30a5aaa..45b9ae63443be 100644 --- a/.github/workflows/ci_test-base.yml +++ b/.github/workflows/ci_test-base.yml @@ -68,8 +68,7 @@ jobs: - name: Test Package [only] run: | # NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003 - # todo: after moving parallel and thread to coonfing, drop these options - python -m pytest pytorch_lightning -v --cov=pytorch_lightning --parallel-mode --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml + python -m pytest pytorch_lightning -v --cov=pytorch_lightning --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml - name: Upload pytest test results uses: actions/upload-artifact@v2 @@ -81,6 +80,7 @@ jobs: - name: Statistics if: success() run: | + coverage combine coverage report coverage xml diff --git a/.github/workflows/ci_test-full.yml b/.github/workflows/ci_test-full.yml index 0d2f3955eedf6..a759422880e92 100644 --- a/.github/workflows/ci_test-full.yml +++ b/.github/workflows/ci_test-full.yml @@ -134,8 +134,7 @@ jobs: - name: Tests run: | # NOTE: do not include coverage report here, see: https://github.com/nedbat/coveragepy/issues/1003 - # todo: after moving parallel and thread to coonfing, drop these options - python -m pytest pytorch_lightning tests -v --cov=pytorch_lightning --parallel-mode --durations=50 --junitxml=junit/test-results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}.xml + python -m pytest pytorch_lightning tests -v --cov=pytorch_lightning --durations=50 --junitxml=junit/test-results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}.xml - name: Examples run: | @@ -151,6 +150,7 @@ jobs: - name: Statistics if: success() run: | + coverage combine coverage report coverage xml diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 994e4353519b0..db5391017cbe7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -78,7 +78,7 @@ jobs: displayName: 'Get legacy checkpoints' - bash: | - python -m pytest pytorch_lightning tests -v --cov=pytorch_lightning --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=50 + python -m coverage run --source pytorch_lightning -m pytest pytorch_lightning tests -v --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=50 displayName: 'Testing: standard' - bash: | @@ -86,7 +86,7 @@ jobs: displayName: 'Testing: special' - bash: | - # python -m coverage combine + python -m coverage combine python -m coverage report python -m coverage xml python -m coverage html diff --git a/setup.cfg b/setup.cfg index 006ab028408d3..eb9e17ed63f2d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,9 +31,9 @@ markers = gpus_param_tests junit_duration_report = call -# todo: shall be fixed upon refactoring collecting stats from special DDP tests + [coverage:run] -# parallel = True +parallel = True #concurrency = thread, multiprocessing concurrency = thread diff --git a/tests/special_tests.sh b/tests/special_tests.sh index 1ab3237729354..cf3c7f9218e03 100644 --- a/tests/special_tests.sh +++ b/tests/special_tests.sh @@ -14,7 +14,7 @@ # Running special tests set -e export PL_RUNNING_SPECIAL_TESTS=1 -DEFAULTS="-m pytest --verbose --cov=pytorch_lightning --cov-append --capture=no" +DEFAULTS="-m coverage run --source pytorch_lightning -a --parallel-mode=false -m pytest --verbose --capture=no" python ${DEFAULTS} tests/trainer/optimization/test_manual_optimization.py::test_step_with_optimizer_closure_with_different_frequencies_ddp python ${DEFAULTS} tests/models/test_sync_batchnorm.py::test_sync_batchnorm_ddp python ${DEFAULTS} tests/plugins/test_deepspeed_plugin.py::test_invalid_deepspeed_defaults_no_precision From 506623391d14fc0479b0c9bf886ace76b4341794 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Sat, 20 Mar 2021 11:30:06 +0100 Subject: [PATCH 16/25] cb --- .github/workflows/ci_test-base.yml | 1 - .github/workflows/ci_test-full.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/ci_test-base.yml b/.github/workflows/ci_test-base.yml index 45b9ae63443be..0e84642e2f810 100644 --- a/.github/workflows/ci_test-base.yml +++ b/.github/workflows/ci_test-base.yml @@ -80,7 +80,6 @@ jobs: - name: Statistics if: success() run: | - coverage combine coverage report coverage xml diff --git a/.github/workflows/ci_test-full.yml b/.github/workflows/ci_test-full.yml index a759422880e92..f326ff503af0b 100644 --- a/.github/workflows/ci_test-full.yml +++ b/.github/workflows/ci_test-full.yml @@ -150,7 +150,6 @@ jobs: - name: Statistics if: success() run: | - coverage combine coverage report coverage xml From 5b66e6e6641cd667329cb0329c264de5414e60c4 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Sat, 20 Mar 2021 12:19:59 +0100 Subject: [PATCH 17/25] cb --- tests/special_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/special_tests.sh b/tests/special_tests.sh index cf3c7f9218e03..c381b5e9feeb6 100644 --- a/tests/special_tests.sh +++ b/tests/special_tests.sh @@ -14,7 +14,7 @@ # Running special tests set -e export PL_RUNNING_SPECIAL_TESTS=1 -DEFAULTS="-m coverage run --source pytorch_lightning -a --parallel-mode=false -m pytest --verbose --capture=no" +DEFAULTS="-m coverage run --source pytorch_lightning --append -m pytest --verbose --capture=no" python ${DEFAULTS} tests/trainer/optimization/test_manual_optimization.py::test_step_with_optimizer_closure_with_different_frequencies_ddp python ${DEFAULTS} tests/models/test_sync_batchnorm.py::test_sync_batchnorm_ddp python ${DEFAULTS} tests/plugins/test_deepspeed_plugin.py::test_invalid_deepspeed_defaults_no_precision From 9ecdb23d901afe22e489cc36ac1f45cb1f7f3aae Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Sat, 20 Mar 2021 13:10:14 +0100 Subject: [PATCH 18/25] drop --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index db5391017cbe7..1b81c4dfe4e14 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -82,6 +82,7 @@ jobs: displayName: 'Testing: standard' - bash: | + python -c "fname = 'setup.cfg' ; lines = [line for line in open(fname).readlines() if not line.startswith('parallel = True')] ; open(fname, 'w').writelines(lines)" sh tests/special_tests.sh displayName: 'Testing: special' From a9344bad6b2827274255f0212ade7c66974bb274 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Sat, 20 Mar 2021 14:54:01 +0100 Subject: [PATCH 19/25] drop --- azure-pipelines.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1b81c4dfe4e14..7854aa5ce175e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -87,7 +87,6 @@ jobs: displayName: 'Testing: special' - bash: | - python -m coverage combine python -m coverage report python -m coverage xml python -m coverage html From 8fddf72bda6e591f67bf7f9978c01eeff70de96d Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 22 Mar 2021 20:24:50 +0100 Subject: [PATCH 20/25] . --- requirements/test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/test.txt b/requirements/test.txt index 099a6fe43b6e6..05c6ee5f6a94e 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -2,7 +2,7 @@ coverage>5.2.0 codecov>=2.1 pytest>=6.0 pytest-cov>2.10 -# pytest-xdist +pytest-xdist flake8>=3.6 check-manifest twine==3.2 From f2dc66492d092963aa1b73123bdfe7461ef8651d Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 22 Mar 2021 20:58:04 +0100 Subject: [PATCH 21/25] .. --- .github/workflows/ci_test-full.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_test-full.yml b/.github/workflows/ci_test-full.yml index f326ff503af0b..e4e13d240af0b 100644 --- a/.github/workflows/ci_test-full.yml +++ b/.github/workflows/ci_test-full.yml @@ -134,7 +134,7 @@ jobs: - name: Tests run: | # NOTE: do not include coverage report here, see: https://github.com/nedbat/coveragepy/issues/1003 - python -m pytest pytorch_lightning tests -v --cov=pytorch_lightning --durations=50 --junitxml=junit/test-results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}.xml + python -m coverage run --source pytorch_lightning -m pytest pytorch_lightning tests pl_examples -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}.xml - name: Examples run: | From de8ccc40ce18be31eebfbfc2baed6be6642951b0 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 22 Mar 2021 23:30:50 +0100 Subject: [PATCH 22/25] ... --- .github/workflows/ci_test-full.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_test-full.yml b/.github/workflows/ci_test-full.yml index e4e13d240af0b..5a3e23a37fd0b 100644 --- a/.github/workflows/ci_test-full.yml +++ b/.github/workflows/ci_test-full.yml @@ -134,7 +134,7 @@ jobs: - name: Tests run: | # NOTE: do not include coverage report here, see: https://github.com/nedbat/coveragepy/issues/1003 - python -m coverage run --source pytorch_lightning -m pytest pytorch_lightning tests pl_examples -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}.xml + coverage run --source pytorch_lightning -m pytest pytorch_lightning tests -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}.xml - name: Examples run: | From 7d01453a25324aa26473025cc9116433fc6456d5 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Tue, 23 Mar 2021 21:25:47 +0100 Subject: [PATCH 23/25] ... --- .github/workflows/ci_test-base.yml | 2 +- .github/workflows/ci_test-conda.yml | 2 +- requirements/test.txt | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_test-base.yml b/.github/workflows/ci_test-base.yml index 0e84642e2f810..77363992718af 100644 --- a/.github/workflows/ci_test-base.yml +++ b/.github/workflows/ci_test-base.yml @@ -68,7 +68,7 @@ jobs: - name: Test Package [only] run: | # NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003 - python -m pytest pytorch_lightning -v --cov=pytorch_lightning --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml + coverage run --source pytorch_lightning -m pytest pytorch_lightning -v --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml - name: Upload pytest test results uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_test-conda.yml b/.github/workflows/ci_test-conda.yml index 812d06f310812..da853bf623d1b 100644 --- a/.github/workflows/ci_test-conda.yml +++ b/.github/workflows/ci_test-conda.yml @@ -44,7 +44,7 @@ jobs: - name: Tests run: | # NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003 - python -m pytest pytorch_lightning tests --cov=pytorch_lightning -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-torch${{ matrix.pytorch-version }}.xml + coverage run --source pytorch_lightning -m pytest pytorch_lightning tests -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-torch${{ matrix.pytorch-version }}.xml shell: bash -l {0} - name: Upload pytest results diff --git a/requirements/test.txt b/requirements/test.txt index 05c6ee5f6a94e..259cc2e2d6442 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,8 +1,8 @@ coverage>5.2.0 codecov>=2.1 pytest>=6.0 -pytest-cov>2.10 -pytest-xdist +#pytest-cov>2.10 +#pytest-xdist flake8>=3.6 check-manifest twine==3.2 From 00e0f8b44f88cfc7721e7fad7089e85d3572e778 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Tue, 23 Mar 2021 21:31:34 +0100 Subject: [PATCH 24/25] ... --- setup.cfg | 5 ----- 1 file changed, 5 deletions(-) diff --git a/setup.cfg b/setup.cfg index eb9e17ed63f2d..3775eb0070f7c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,11 +32,6 @@ markers = junit_duration_report = call -[coverage:run] -parallel = True -#concurrency = thread, multiprocessing -concurrency = thread - [coverage:report] exclude_lines = pragma: no-cover From 2b1738137a00812b1c681689d198dfcf70f64376 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Tue, 23 Mar 2021 22:12:16 +0100 Subject: [PATCH 25/25] . --- azure-pipelines.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7854aa5ce175e..d88a31ae9775a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -82,7 +82,6 @@ jobs: displayName: 'Testing: standard' - bash: | - python -c "fname = 'setup.cfg' ; lines = [line for line in open(fname).readlines() if not line.startswith('parallel = True')] ; open(fname, 'w').writelines(lines)" sh tests/special_tests.sh displayName: 'Testing: special'