-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #681 from SciML/stateonly
Moved optstats to SciMLBase
- Loading branch information
Showing
5 changed files
with
34 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
""" | ||
$(TYPEDEF) | ||
Stores the optimization run's state at the current iteration | ||
and is passed to the callback function as the first argument. | ||
## 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 | ||
""" | ||
struct OptimizationState{X, O, G, H, S} | ||
iter::Int | ||
u::X | ||
objective::O | ||
grad::G | ||
hess::H | ||
original::S | ||
end | ||
|
||
function OptimizationState(; iter = 0, u = nothing, objective = nothing, | ||
grad = nothing, hess = nothing, original = nothing) | ||
OptimizationState(iter, u, objective, grad, hess, original) | ||
end |
This file was deleted.
Oops, something went wrong.