mirror of https://github.com/razor-ai/soup.git
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>
This commit is contained in:
parent
cab3c0b0fb
commit
4010798e2b
|
|
@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||
|
||||
[project]
|
||||
name = "soup-cli"
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
description = "Fine-tune LLMs in one command. No SSH, no config hell."
|
||||
readme = "README.md"
|
||||
license = "MIT"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
"""Soup CLI — Fine-tune LLMs in one command."""
|
||||
|
||||
__version__ = "0.2.0"
|
||||
__version__ = "0.2.1"
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class SoupTrainerCallback(TrainerCallback):
|
|||
|
||||
if torch.cuda.is_available():
|
||||
used = torch.cuda.memory_allocated() / (1024**3)
|
||||
total = torch.cuda.get_device_properties(0).total_mem / (1024**3)
|
||||
total = torch.cuda.get_device_properties(0).total_memory / (1024**3)
|
||||
gpu_mem = f"{used:.1f}/{total:.1f} GB"
|
||||
except Exception:
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ def get_gpu_info() -> dict:
|
|||
import torch
|
||||
|
||||
if torch.cuda.is_available():
|
||||
total = torch.cuda.get_device_properties(0).total_mem
|
||||
total = torch.cuda.get_device_properties(0).total_memory
|
||||
total_gb = total / (1024**3)
|
||||
return {
|
||||
"memory_total": f"{total_gb:.1f} GB",
|
||||
|
|
|
|||
Loading…
Reference in New Issue