Skip to content

Commit b85a2a5

Browse files
committed
Fix warning
1 parent d47c586 commit b85a2a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stable_baselines3/common/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ def get_available_accelerator() -> str:
521521
Return the available accelerator
522522
(currently checking only for CUDA and MPS device)
523523
"""
524-
if hasattr(th, "has_mps") and th.backends.mps.is_built():
524+
if hasattr(th, "backends") and th.backends.mps.is_built():
525525
# MacOS Metal GPU
526526
return "mps"
527527
elif th.cuda.is_available():

0 commit comments

Comments
 (0)