From d161ff52a527a0168569a5c6d5f313cbf7656d78 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 8 Jun 2026 12:25:38 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- unsloth/kernels/flex_attention.py | 3 +-- unsloth/models/_utils.py | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/unsloth/kernels/flex_attention.py b/unsloth/kernels/flex_attention.py index 7a0ad25142..e1e0dc399b 100644 --- a/unsloth/kernels/flex_attention.py +++ b/unsloth/kernels/flex_attention.py @@ -42,8 +42,7 @@ def _flex_is_dgx_spark(): if not (hasattr(torch, "cuda") and torch.cuda.is_available()): return False names = " ".join( - str(torch.cuda.get_device_name(i)).upper() - for i in range(torch.cuda.device_count()) + str(torch.cuda.get_device_name(i)).upper() for i in range(torch.cuda.device_count()) ) return any(t in names for t in ("GB10", "JMJWOA", "N1X", "DGX SPARK", "GB110")) except Exception: diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index 72fe785010..f21863c6b2 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -929,8 +929,7 @@ def is_dgx_spark(): if not (hasattr(torch, "cuda") and torch.cuda.is_available()): return False names = " ".join( - str(torch.cuda.get_device_name(i)).upper() - for i in range(torch.cuda.device_count()) + str(torch.cuda.get_device_name(i)).upper() for i in range(torch.cuda.device_count()) ) return any(token in names for token in _DGX_SPARK_DEVICE_TOKENS) except Exception: @@ -1041,7 +1040,6 @@ def patch_dgx_spark_dataloader_defaults(): return try: from transformers import training_args as _ta - Base = _ta.TrainingArguments except Exception: return