Prevent a crash on systems without an NVIDIA GPU

This commit is contained in:
oobabooga 2025-05-16 11:55:06 -07:00
parent 253e85a519
commit 38c50087fe

View file

@ -421,11 +421,9 @@ def get_nvidia_free_vram():
return total_free_vram_mib
except FileNotFoundError:
raise
# nvidia-smi not found (likely no NVIDIA drivers installed)
return -1
except Exception:
raise
# Handle any other unexpected exceptions
return -1