Open avehtari opened 3 months ago
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.
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)