-
-
Notifications
You must be signed in to change notification settings - Fork 96
fixed user trace!
overload compat. Both x
and user records now saved
#702
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
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #702 +/- ##
=========================================
- Coverage 8.69% 8.68% -0.02%
=========================================
Files 31 31
Lines 2496 2500 +4
=========================================
Hits 217 217
- Misses 2279 2283 +4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. I'd want a more first class integration with the callback and OptimizationState things in the package for this but that can be done later. Thanks!
@Vaibhavdixit02 Agreed, just wanted to keep the changes limited for this PR. No problem! |
Why did you close this @jonathanfischer97? |
@Vaibhavdixit02 Oops, my bad, thought branch was merged. Still getting the hang of contributing to public repos! |
OptimizationEvolutionary test failure looks real, can you take a look at it? |
@Vaibhavdixit02 Will do! |
@Vaibhavdixit02 Fixed the trace test, previous test was querying the trace of |
Thanks, this is great! |
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
trace!
functionality. Specifically, Evolutionary.jl allows user-defined overloads oftrace!
in order to save other values during optimization, via an generic interface. This functionality is advertised within the Evolutionary.jl docs, seen here:trace!
would be dispatched in-place of the existing overload in OptimizationEvolutionary, allowing the possibility of"x"
not being saved and thus throwing an error during construction ofOptimizationState
.Evolutionary.trace!
function, which calls the exposedtrace!
function. This overload adds"x"
to the existing"time"
key which will always be saved, prior to calling user methods and regardless of their existence."x"
as well as example user-defined trace record key are present in the output, which passed.