Skip to content

Commit 4010798

Browse files
Fix PyTorch 2.7 compatibility: total_mem → total_memory (v0.2.1)
PyTorch 2.7+ renamed `get_device_properties().total_mem` to `total_memory`. Fixed in gpu.py and callback.py. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cab3c0b commit 4010798

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "soup-cli"
7-
version = "0.2.0"
7+
version = "0.2.1"
88
description = "Fine-tune LLMs in one command. No SSH, no config hell."
99
readme = "README.md"
1010
license = "MIT"

soup_cli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Soup CLI — Fine-tune LLMs in one command."""
22

3-
__version__ = "0.2.0"
3+
__version__ = "0.2.1"

soup_cli/monitoring/callback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def on_log(
4747

4848
if torch.cuda.is_available():
4949
used = torch.cuda.memory_allocated() / (1024**3)
50-
total = torch.cuda.get_device_properties(0).total_mem / (1024**3)
50+
total = torch.cuda.get_device_properties(0).total_memory / (1024**3)
5151
gpu_mem = f"{used:.1f}/{total:.1f} GB"
5252
except Exception:
5353
pass

soup_cli/utils/gpu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def get_gpu_info() -> dict:
2525
import torch
2626

2727
if torch.cuda.is_available():
28-
total = torch.cuda.get_device_properties(0).total_mem
28+
total = torch.cuda.get_device_properties(0).total_memory
2929
total_gb = total / (1024**3)
3030
return {
3131
"memory_total": f"{total_gb:.1f} GB",

0 commit comments

Comments
 (0)