Skip to content
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

Return a different error for Line search failure #1309

Open
jachymb opened this issue Jan 17, 2025 · 0 comments
Open

Return a different error for Line search failure #1309

jachymb opened this issue Jan 17, 2025 · 0 comments

Comments

@jachymb
Copy link

jachymb commented Jan 17, 2025

When I run optimize, it sometimes exits with the error message

Optimization terminated with error: 
  Line search failed to achieve a sufficient decrease, no more progress can be made

returning the error code 1 to the OS.

However, this may happen after a good fit is found and written and actually indicates convergence and the failure is likely due to numerical weirdness near the optimum.

So I am not sure whether this should even be treated as an error. If yes, I would like to propose for cmdstan to return an error code different than 1 to the OS, so the shell calling it may decide to ignore it easily (where now parsing stderr would be required). Now, every error seems to simply return 1.

In fact, returning a different error code for each different possible problem would perhaps be nice, but this one particular case strikes me as actually not-always-a-problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant