Skip to content

Commit 7a8d0cc

Browse files
arthurfeeneypytorchmergebot
authored andcommitted
Correct LBFGS tolerance_grad doc string (#99792)
LBFGS' `tolerance_grad` parameter has had a default value of `1e-7` since #25240. The doc string wasn't updated in that PR to match the change https://github.com/pytorch/pytorch/blob/main/torch/optim/lbfgs.py#L207. no open issue for it, just happened to set it to 1e-7 and was surprised my results didn't change :-) eventually noticed inconsistency in the doc and seemed like an easy opportunity to figure out how to contribute. Pull Request resolved: #99792 Approved by: https://github.com/janeyx99
1 parent f602b3a commit 7a8d0cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch/optim/lbfgs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ class LBFGS(Optimizer):
205205
max_eval (int): maximal number of function evaluations per optimization
206206
step (default: max_iter * 1.25).
207207
tolerance_grad (float): termination tolerance on first order optimality
208-
(default: 1e-5).
208+
(default: 1e-7).
209209
tolerance_change (float): termination tolerance on function
210210
value/parameter changes (default: 1e-9).
211211
history_size (int): update history size (default: 100).

0 commit comments

Comments
 (0)