Skip to content

Commit 4130973

Browse files
committed
fix: max_iter with config.max_steps
1 parent 537cc20 commit 4130973

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning_module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def configure_optimizers(self):
114114
)
115115

116116
if self.config.get("max_steps", None):
117-
max_iter = min(self.config.max_steps, max_iter)
117+
max_iter = min(self.config.max_steps, max_iter) if max_iter is not None else self.config.max_steps
118118

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

0 commit comments

Comments
 (0)