[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-06-08 12:25:38 +00:00
commit d161ff52a5
2 changed files with 2 additions and 5 deletions

View file

@ -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:

View file

@ -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