From 6add6b2e538c31da78e3ac94f6e0ff5b6b4ad2b5 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Fri, 19 Feb 2021 21:57:35 +0100 Subject: [PATCH 1/3] add sanity check on nb available GPUs --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6d4d49aff40c1..cd63ec915c593 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -68,6 +68,7 @@ jobs: - script: | python tests/collect_env_details.py + python -c "import torch ; assert torch.cuda.device_count() >= 2" displayName: 'Env details' - bash: | From 3d2382427d43df942287e906fbfc29c1cae47ad5 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Fri, 19 Feb 2021 22:02:53 +0100 Subject: [PATCH 2/3] mgpu --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cd63ec915c593..82a9932ce37b0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -68,7 +68,7 @@ jobs: - script: | python tests/collect_env_details.py - python -c "import torch ; assert torch.cuda.device_count() >= 2" + python -c "import torch ; mgpu = torch.cuda.device_count() ; assert mgpu >= 2, f'GPU: {mgpu}'" displayName: 'Env details' - bash: | From 0b6c0b3026dd84943faddad996e60310a484715d Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Fri, 19 Feb 2021 22:17:42 +0100 Subject: [PATCH 3/3] bash --- azure-pipelines.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 82a9932ce37b0..4d84253473bbc 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -66,7 +66,7 @@ jobs: pip list displayName: 'Install dependencies' - - script: | + - bash: | python tests/collect_env_details.py python -c "import torch ; mgpu = torch.cuda.device_count() ; assert mgpu >= 2, f'GPU: {mgpu}'" displayName: 'Env details' @@ -77,7 +77,7 @@ jobs: ls -l legacy/checkpoints/ displayName: 'Get legacy checkpoints' - - script: | + - bash: | python -m coverage run --source pytorch_lightning -m pytest pytorch_lightning tests -v --durations=50 displayName: 'Testing: standard' @@ -91,11 +91,11 @@ jobs: codecov --token=$(CODECOV_TOKEN) --flags=gpu,pytest --name="GPU-coverage" --env=linux,azure displayName: 'Statistics' - - script: | + - bash: | python -m pytest benchmarks pl_examples -v --maxfail=2 --durations=0 displayName: 'Testing: extended' - - script: | + - bash: | python setup.py install --user --quiet bash pl_examples/run_ddp-example.sh pip uninstall -y pytorch-lightning