[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-12 05:22:45 +00:00
commit 4af1200dd3
2 changed files with 3 additions and 0 deletions

View file

@ -750,6 +750,7 @@ def _nvidia_classify_spark_unified_memory(props: Any) -> tuple[str, bool]:
return "is_integrated", True
name_upper = (getattr(props, "name", "") or "").upper()
import re
for token in ("GB10", "GB110", "JMJWOA", "N1X", "DGX SPARK"):
# Whole-token match so "GB10" does not match a discrete "GB100"/"GB10X".
if re.search(r"(?<![A-Z0-9])" + re.escape(token) + r"(?![A-Z0-9])", name_upper):
@ -2458,6 +2459,7 @@ def run_training_process(*, event_queue: Any, stop_queue: Any, config: dict) ->
)
_names_u = (_smi.stdout or "").upper()
import re as _re
_spark_smi = any(
_re.search(r"(?<![A-Z0-9])" + _re.escape(t) + r"(?![A-Z0-9])", _names_u)
for t in ("GB10", "GB110", "JMJWOA", "N1X", "DGX SPARK")

View file

@ -51,6 +51,7 @@ def _flex_is_dgx_spark():
names = (out.stdout or "").upper()
# Whole-token match so "GB10" does not match a discrete "GB100"/"GB10X".
import re
return any(
re.search(r"(?<![A-Z0-9])" + re.escape(t) + r"(?![A-Z0-9])", names)
for t in ("GB10", "JMJWOA", "N1X", "DGX SPARK", "GB110")