Do not (mis)use objective as state#1212
Conversation
935c749 to
93e8f31
Compare
| end | ||
|
|
||
| if g_calls(d) > 0 && !all(isfinite, gradient(d)) | ||
| if hasproperty(state, :g_x) && !all(isfinite, state.g_x) |
There was a problem hiding this comment.
could in principle add methods to isfinite_gradient and isfinite_hessian that you introduced for the objective? I suppose they are sufficiently similar in nature to share the function?
There was a problem hiding this comment.
if it's only used once of course... then it's maybe overkill :) I suppose in termination code as well..
c4d1eec to
d2071a1
Compare
8c40315 to
60a5fef
Compare
Benchmark Results (Julia vlts)Time benchmarks
Memory benchmarks
A plot of the benchmark results has been uploaded as an artifact at . |
938f2ec to
95ca2d8
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1212 +/- ##
==========================================
- Coverage 87.32% 86.77% -0.55%
==========================================
Files 45 45
Lines 3558 3539 -19
==========================================
- Hits 3107 3071 -36
- Misses 451 468 +17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
95ca2d8 to
92ae7aa
Compare
92ae7aa to
6182632
Compare
|
I suppose the artifacts need to be uniquely named |
|
Indeed, I already opened a PR on Friday: MilesCranmer/AirspeedVelocity.jl#120 |
Very much WIP, and I might have to start over again. Fixes #1210 (comment) by not (mis)using objective functions as states. Instead, this PR proposes to add
f_xandg_xfields to the optimization states (where needed), similar to already existingx_previous,f_x_previousandg_x_previousfields.