From 51170b24c4c7bba70db5d938a3a0b95c2eb5a7a2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 16:46:43 +0900 Subject: [PATCH] chore(format): run black on dev (#125) Co-authored-by: github-actions[bot] --- configs/config.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/configs/config.py b/configs/config.py index 9db1126..5232048 100644 --- a/configs/config.py +++ b/configs/config.py @@ -137,11 +137,11 @@ class Config(metaclass=Singleton): logging.warning("Using insecure weight loading for fairseq dictionary") except AttributeError: pass - + @staticmethod def get_default_batch_size() -> int: if not torch.cuda.is_available(): - #TODO: add non-cuda multicards + # TODO: add non-cuda multicards return 1 # 判断是否有能用来训练和加速推理的N卡 ngpu = torch.cuda.device_count() @@ -155,7 +155,10 @@ class Config(metaclass=Singleton): mem.append( int( torch.cuda.get_device_properties(i).total_memory - / 1024 / 1024 / 1024 + 0.4 + / 1024 + / 1024 + / 1024 + + 0.4 ) ) if if_gpu_ok: