From 905c22edd83e75fece23bbdbdd37afe6fc794aae Mon Sep 17 00:00:00 2001 From: ArEnSc <6252325+ArEnSc@users.noreply.github.com> Date: Tue, 7 Jan 2025 18:55:27 -0500 Subject: [PATCH] Fix minor bug with function call that doesn't exist. (#195) Co-authored-by: Aryan --- finetrainers/utils/memory_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/finetrainers/utils/memory_utils.py b/finetrainers/utils/memory_utils.py index add8e0b..d7616b1 100644 --- a/finetrainers/utils/memory_utils.py +++ b/finetrainers/utils/memory_utils.py @@ -21,7 +21,7 @@ def get_memory_statistics(precision: int = 3) -> Dict[str, Any]: max_memory_allocated = torch.cuda.max_memory_allocated(device) max_memory_reserved = torch.cuda.max_memory_reserved(device) - elif torch.mps.is_available(): + elif torch.backends.mps.is_available(): memory_allocated = torch.mps.current_allocated_memory() else: