From 9fb71dce7c0744f38ea212d522585c7bacfb71c3 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Wed, 8 Jan 2025 18:32:20 +0900 Subject: [PATCH] check --- .azure/gpu-tests-fabric.yml | 2 +- .azure/gpu-tests-pytorch.yml | 1 - requirements/pytorch/check-avail-extras.py | 4 ++++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.azure/gpu-tests-fabric.yml b/.azure/gpu-tests-fabric.yml index ce7f4d99fc6e5..058ff8af3beeb 100644 --- a/.azure/gpu-tests-fabric.yml +++ b/.azure/gpu-tests-fabric.yml @@ -120,7 +120,7 @@ jobs: set -e python requirements/collect_env_details.py python -c "import torch ; mgpu = torch.cuda.device_count() ; assert mgpu == 2, f'GPU: {mgpu}'" - python -c "import bitsandbytes" + python requirements/pytorch/check-avail-extras.py displayName: "Env details" - bash: python -m pytest lightning_fabric diff --git a/.azure/gpu-tests-pytorch.yml b/.azure/gpu-tests-pytorch.yml index 56ebc8a54b2a6..4f9bd1ddd687f 100644 --- a/.azure/gpu-tests-pytorch.yml +++ b/.azure/gpu-tests-pytorch.yml @@ -135,7 +135,6 @@ jobs: python requirements/collect_env_details.py python -c "import torch ; mgpu = torch.cuda.device_count() ; assert mgpu == 2, f'GPU: {mgpu}'" python requirements/pytorch/check-avail-extras.py - python -c "import bitsandbytes" displayName: "Env details" - bash: python -m pytest pytorch_lightning diff --git a/requirements/pytorch/check-avail-extras.py b/requirements/pytorch/check-avail-extras.py index 3ab8d2848c3f0..cebafa587a359 100644 --- a/requirements/pytorch/check-avail-extras.py +++ b/requirements/pytorch/check-avail-extras.py @@ -4,3 +4,7 @@ import matplotlib # noqa: F401 import omegaconf # noqa: F401 import rich # noqa: F401 + + import torch # noqa: F401 + if torch.cuda.is_available(): + import bitsandbytes # noqa: F401