Skip to content

Commit

Permalink
fix: max_iter with config.max_steps
Browse files Browse the repository at this point in the history
  • Loading branch information
gwkrsrch committed Jul 29, 2022
1 parent 537cc20 commit 4130973
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lightning_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def configure_optimizers(self):
)

if self.config.get("max_steps", None):
max_iter = min(self.config.max_steps, max_iter)
max_iter = min(self.config.max_steps, max_iter) if max_iter is not None else self.config.max_steps

assert max_iter is not None
optimizer = torch.optim.Adam(self.parameters(), lr=self.config.lr)
Expand Down

0 comments on commit 4130973

Please sign in to comment.