Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 10, 2023
1 parent d8b881d commit 09c2033
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nemo/collections/nlp/parts/nlp_overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,9 +774,7 @@ def optimizer_step(
return optimizer.step(**kwargs)

if isinstance(optimizer, torch.optim.LBFGS):
raise MisconfigurationException(
f"Native AMP and the LBFGS optimizer are not compatible (optimizer)."
)
raise MisconfigurationException(f"Native AMP and the LBFGS optimizer are not compatible (optimizer).")
assert not optimizer.fp32_grad_accumulation, "FP16 uses FP16 grad accumulation"
closure_result = closure()

Expand Down

0 comments on commit 09c2033

Please sign in to comment.