Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/e2e/mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
print("ACCELERATOR: is ", os.getenv("ACCELERATOR"))
ACCELERATOR = os.getenv("ACCELERATOR")

# If GPU is requested but CUDA is not available, fall back to CPU
if ACCELERATOR == "gpu" and not torch.cuda.is_available():
print("Warning: GPU requested but CUDA is not available. Falling back to CPU.")
ACCELERATOR = "cpu"

STORAGE_BUCKET_EXISTS = "AWS_DEFAULT_ENDPOINT" in os.environ
print("STORAGE_BUCKET_EXISTS: ", STORAGE_BUCKET_EXISTS)

Expand Down
4 changes: 3 additions & 1 deletion tests/e2e/mnist_pip_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
--extra-index-url https://download.pytorch.org/whl/cu118
torch==2.5.1
torchvision==0.20.1
pytorch_lightning==1.9.5
torchmetrics==0.9.1
torchvision==0.20.1
minio
Loading