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

Get number of iterations after optimization #388

Closed
ojwoodford opened this issue Oct 11, 2023 · 3 comments · Fixed by #389
Closed

Get number of iterations after optimization #388

ojwoodford opened this issue Oct 11, 2023 · 3 comments · Fixed by #389

Comments

@ojwoodford
Copy link

It would be great to have a way to retrieve the number of iterations that Ipopt performed during an optimization. This can be useful to understand whether a particular cost function is either slow to evaluate or slow to converge. It can also be used to have a more fine-grained comparison between optimizers.

@odow
Copy link
Member

odow commented Oct 11, 2023

This is not implemented because Ipopt does not provide a nice way of accessing after a solve.

The recommended alternative is to write a solver-specific callback:
https://github.com/jump-dev/Ipopt.jl#solver-specific-callbacks

I don't know if the iteration could is a reasonable comparison between solvers. Ipopt may use multiple functions evaluations per iteration.

To debug a solve, you generally need to look at the log and see how the barrier is progressing. It isn't as simple as a metric like iterations/second.

Is this so you can compare with NNLS?

@ojwoodford
Copy link
Author

ojwoodford commented Oct 11, 2023

Is this so you can compare with NNLS?

So I can compare with other solvers on non-linear least squares problems, yes.

I can see the number of iterations in the log. It's pretty comparable with other methods. It's always useful to see how much work a particular solver is able to do per "iteration", whatever that happens to mean in the context of a particular solver.

@odow
Copy link
Member

odow commented Oct 11, 2023

See #389

@odow odow closed this as completed in #389 Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants