From f2660acbf9cbc1c48c81a78164d53084604f08a0 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Fri, 19 Feb 2021 22:45:53 +0100 Subject: [PATCH] add sanity check on nb available GPUs (#6092) --- azure-pipelines.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6d4d49aff4..4d84253473 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -66,8 +66,9 @@ 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' - bash: | @@ -76,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' @@ -90,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