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

Optim.OptimizationState #1101

Open
nickbrady opened this issue Aug 2, 2024 · 3 comments
Open

Optim.OptimizationState #1101

nickbrady opened this issue Aug 2, 2024 · 3 comments

Comments

@nickbrady
Copy link

There seems to be some misalignment of the documentation with the Optim.OptimizationState:
https://docs.sciml.ai/Optimization/stable/API/optimization_state/

The fields in OptimizationState in the documentation are listed as follows:

Fields

iter: current iteration
u: current solution
objective: current objective value
gradient: current gradient
hessian: current hessian
original: if the solver has its own state object then it is stored here

but using the following code:

using Optim
println(fieldnames(Optim.OptimizationState))

gives
1: iteration
2: value
3: g_norm
4: metadata

@longemen3000
Copy link
Contributor

Note that this package is Optim.jl, whereas the documentation points to Optimization.jl. If you check that package, it has the struct with the correct fields:
https://github.com/SciML/Optimization.jl/blob/e987377adc6c6687a6108e5691ffaa8dd30cf26c/src/state.jl#L15

@nickbrady
Copy link
Author

Yes, I noticed that. But I guess the logical follow-up is why does Optim.jl point to the Optimization.jl documentation?

Perhaps that is out of the scope for this issue.

@pkofod
Copy link
Member

pkofod commented Sep 19, 2024

Where does Optim.jl point to Optimization? You are confusing the Optimization.jl documentation with this package I think.

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

3 participants