Skip to content

Commit

Permalink
Reformat code with black
Browse files Browse the repository at this point in the history
  • Loading branch information
mryab committed Nov 4, 2024
1 parent 32ed45f commit b462d79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hivemind/optim/grad_scaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,4 @@ def _unscale_grads_(

def are_grads_finite(self, optimizer: TorchOptimizer, use_cached: bool = False) -> bool:
opt_dict = self._found_inf_per_device(optimizer) if use_cached else self._check_inf_per_device(optimizer)
return not sum(v.item() for v in opt_dict.values())
return not sum(v.item() for v in opt_dict.values())

0 comments on commit b462d79

Please sign in to comment.