-
Notifications
You must be signed in to change notification settings - Fork 5
add support for hasconverged + conditional loading pkgs #8
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
This reverts commit 1c1c88a.
|
@torfjelde Any opinion on |
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.
Great work @zuhengxu :)
I've added some minor changes, but feel free to merge when that has been addressed.
src/train.jl
Outdated
|
|
||
| # return status of the optimiser for potential continuation of training | ||
| return θ, map(identity, opt_stats), st | ||
| return θ, map(identity, opt_stats[1:(i - 1)]), st |
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.
| return θ, map(identity, opt_stats[1:(i - 1)]), st | |
| return θ, map(identity, opt_stats), st |
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.
And just make opt_stats = [] and push!(opt_stats, stat) above (I can't make a suggestion to code that doesn't show up in the diff).
| using ..ReverseDiff | ||
| end | ||
|
|
||
| # ReverseDiff without compiled tape |
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.
We could probably support compilation of the tape using some shenanigans with Memoize.jl or something (to avoid compile re-compiling the tape on every call to value_and_gradient).
But let's not bother with this for now 👍 Maybe make an issue to keep track of it or smth?
Co-authored-by: Tor Erlend Fjelde <tor.github@gmail.com>
| Requires = "ae029012-a4dd-5104-9daa-d747884805df" | ||
| StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" | ||
|
|
||
| [weakdeps] | ||
| Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" |
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.
It seems compat entries for Enzyme and Requires are missing - I think this has to be fixed before tagging a release (packages with missing compat entries can't be added to the general registry IIRC).
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.
Good point! Yeah, I always forget adding compat entries for denpencies. Will include those in next PR (should be merged soon).
Uh oh!
There was an error while loading. Please reload this page.