[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
84e760808e
commit
c5b99a1f93
2 changed files with 10 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"]),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue