From 40ed03cddb67907d33edd74f3bf9360d3b97981e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20Gallou=C3=A9dec?= <45557362+qgallouedec@users.noreply.github.com> Date: Fri, 6 Oct 2023 14:45:24 +0200 Subject: [PATCH] mps.is_available -> mps.is_built --- stable_baselines3/common/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable_baselines3/common/utils.py b/stable_baselines3/common/utils.py index 8928233..97ad152 100644 --- a/stable_baselines3/common/utils.py +++ b/stable_baselines3/common/utils.py @@ -521,7 +521,7 @@ def get_available_accelerator() -> str: Return the available accelerator (currently checking only for CUDA and MPS device) """ - if hasattr(th, "has_mps") and th.backends.mps.is_available(): + if hasattr(th, "has_mps") and th.backends.mps.is_built(): # MacOS Metal GPU return "mps" elif th.cuda.is_available():