[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-07-04 01:30:42 +00:00
commit c5b99a1f93
2 changed files with 10 additions and 2 deletions

View file

@ -280,7 +280,13 @@ def _apply_fp8_training(transformer, on_event) -> bool:
def _pick_auto_precision(
prequant, device, free_gb, dense_gb, capability, has_fp8, has_torchao = True
prequant,
device,
free_gb,
dense_gb,
capability,
has_fp8,
has_torchao = True,
) -> str:
"""Pure policy for base_precision="auto": nf4 for a prequant base or no CUDA; else the
fastest dense mode whose weights + headroom (activations, optimizer, cache) fit the

View file

@ -450,7 +450,9 @@ class DiffusionTrainingService:
if "learning_rate" in ev
else s["learning_rate"]
)
grad_norm = _finite_or_none(ev["grad_norm"]) if "grad_norm" in ev else s["grad_norm"]
grad_norm = (
_finite_or_none(ev["grad_norm"]) if "grad_norm" in ev else s["grad_norm"]
)
s.update(
status = "running",
step = ev.get("step", s["step"]),