You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some reports (e.g. https://discourse.mc-stan.org/t/disabling-line-search/36062) optimization returning a point that has finite log density but infinite gradient. The current line search does not check that the gradient is finite. The line search could modified so that when the gradient is non-finite the corresponding log density value is considered to be -Inf and then line search would more likely keep out of problematic areas (I did this in GPstuff software many years ago)
The text was updated successfully, but these errors were encountered:
To add to this I have also been experiencing problems where if I start at a point close to the a mode, bfgs and lbfgs results in an error (newton is not feasible due to the dimensionality of the problem). I am using a cluster to perform inference and sometimes my take weeks to run. The cluster has a max walltime of about 5 days (which can not be changed due to capacity reasons). I hence resort to running a fixed number of iterations, saving the final iteration and starting a new job from the previous point which frequently results an error "line search could not make progress". I have been using cmdstan 2.34, have not updated to the latest version.
cpfiffer
added a commit
to cpfiffer/stan
that referenced
this issue
Aug 5, 2024
Related to stan-dev#3306
Modify the `WolfeLineSearch` function in `src/stan/optimization/bfgs_linesearch.hpp` to handle non-finite gradients.
* Check if the function value `func_val` is finite.
* Check if the gradient `gradx1` is finite.
* If either the function value or the gradient is non-finite, restart the line search with a smaller step size.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/stan-dev/stan/issues/3306?shareId=XXXX-XXXX-XXXX-XXXX).
There are some reports (e.g. https://discourse.mc-stan.org/t/disabling-line-search/36062) optimization returning a point that has finite log density but infinite gradient. The current line search does not check that the gradient is finite. The line search could modified so that when the gradient is non-finite the corresponding log density value is considered to be -Inf and then line search would more likely keep out of problematic areas (I did this in GPstuff software many years ago)
The text was updated successfully, but these errors were encountered: