-
Notifications
You must be signed in to change notification settings - Fork 532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tolerate QN linesearch failures when it's harmless #3791
Tolerate QN linesearch failures when it's harmless #3791
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the theory behind this approach sounds fine to me- though it might lead to a marginal decrease in perf, it seems like it should provide a better solution in these cases. I just have one little nitpick and a question.
580cf77
to
687eb35
Compare
NB: sometimes, linesearch fails with |
Sorry, I should have changed the labels. The solution I propose here is not perfect (it would still report an error when the target seems to grow due to numerical error), and the problem itself is not really pressing (wrong errors in logs). Thus, after a short discussion with @tfeher, we've decided to postpone this until we get a better idea on how to address it. |
Update in the logic:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Artem for this PR! Please update the PR description to state under which circumstances the stopping condition could differ from the earlier version. Otherwise it looks good.
Codecov Report
@@ Coverage Diff @@
## branch-21.08 #3791 +/- ##
===============================================
Coverage ? 85.72%
===============================================
Files ? 230
Lines ? 18191
Branches ? 0
===============================================
Hits ? 15595
Misses ? 2596
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Artem for the update, the PR looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks Artem!
@gpucibot merge |
In some cases, the linesearch subroutine of the Quasi-Newton solver (logistic regression) may fail in a way that is tolerable for the solver. Currently, any linesearch failure makes the outer algorithm stop, and most of the time the found solution seems to be acceptable to a good precision. This proposal suggests to ignore some non-critical failures ( `LS_MAX_ITERS_REACHED` and `LS_INVALID_STEP_MIN`) and stop peacefully if the convergence check triggers or if the function change is too small. The PR mostly changes the logging behavior, with one small exception. The last condition in `update_and_check` won't trigger if the linesearch error is not critical and if the target function goes down (i.e. the solver still advances). Previously, the solver would stop independently of the target change. Authors: - Artem M. Chirkin (https://github.com/achirkin) Approvers: - Tamas Bela Feher (https://github.com/tfeher) - Corey J. Nolet (https://github.com/cjnolet) URL: rapidsai#3791
In some cases, the linesearch subroutine of the Quasi-Newton solver (logistic regression) may fail in a way that is tolerable for the solver. Currently, any linesearch failure makes the outer algorithm stop, and most of the time the found solution seems to be acceptable to a good precision. This proposal suggests to ignore some non-critical failures (
LS_MAX_ITERS_REACHED
andLS_INVALID_STEP_MIN
) and stop peacefully if the convergence check triggers or if the function change is too small.The PR mostly changes the logging behavior, with one small exception. The last condition in
update_and_check
won't trigger if the linesearch error is not critical and if the target function goes down (i.e. the solver still advances). Previously, the solver would stop independently of the target change.