-
Notifications
You must be signed in to change notification settings - Fork 19
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
WIP: adding momentum-inspired accelerators to EKP #322
Conversation
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.
Looks great so far - just adding some hints as you go.
As you may have seen the Unscented version is a bit trickier to parse, so we can look at how to get an interface working here later.
Last commit shows an initial version (not yet functional) of what NesterovAccelerator could look like. Notes:
|
First, if you have addressed my comments above, feel free to "Resolve conversation" on them On your points
|
Yes, good point about the timestep. Note also that the timestep is implemented in EKP as a rescaling of the observation error covariance; please check the consistency of this with the timestep in momentum EKI. |
EDIT: Moved to a new issues for a different PR Some notes regarding UKI. It saves only the mean and cov of the ensemble, in
|
72a7c11
to
47706c6
Compare
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.
Hi Sydney a couple of comments to help us to the finish line on this one
initial_ensemble, | ||
y_obs, | ||
Γy, | ||
process, |
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.
To be safe, I would create a new process object for each test. There is no guarantee that they aren't modified during the calls to EKP updates.
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.
LGTM! Thanks for all the work!
This looks great Sydney! Thank you for all the hard work! It almost looks ready to go. Could you please just verify that I would also prefer to add a warning that states that acceleration for EKS is experimental, although still allowing the user to do it. What do you think @odunbar? |
So we did add a unit test for ETKI (see L116 in the added runtests file) which seems to run and converge, so i think we are covered there. I think we can defer the actual acceleration experiment for the next PR (with proper examples). For EKS, this is a good point. Sydney, could you add a warning for when someone creates the accelerator and the EKP object is of type Sampler? Just saying that it is an experimental feature and may affect behaviour |
Move EKP state update to Accelerator function initial setup of Nesterov momentum fixes for indexing, typos, constructors undo accidental test changes accelerator struct fixes sanity-check comparison on simple problem fixed index shift, added function to set accelerator ICs add exp sin example convergence plots reproduced multi-trial convergence results on exp sin IP fix bug with accelerator setup in default case visualize momentum acceleration in EKI,EKS processes darcy in progress accelerator work and unit tests formatting undo formatting Move EKP state update to Accelerator function initial setup of Nesterov momentum fixes for indexing, typos, constructors undo accidental test changes accelerator struct fixes sanity-check comparison on simple problem fixed index shift, added function to set accelerator ICs add exp sin example convergence plots reproduced multi-trial convergence results on exp sin IP fix bug with accelerator setup in default case visualize momentum acceleration in EKI,EKS processes darcy in progress accelerator work and unit tests ignore UKI, fix tests Delete examples/LearningRateSchedulers/compare_schedulers_accelerated.jl Delete examples/Sinusoid/exp_sin_multi_comparison.pdf Delete examples/Sinusoid/exp_sin.pdf Delete examples/Sinusoid/exp_sin_.pdf Delete examples/Sinusoid/exp_sin_eki.pdf Delete examples/Sinusoid/exp_sin_eks.pdf Delete examples/Sinusoid/exp_sin_multi_comparison_a.pdf Delete examples/Sinusoid/exp_sin_multi_comparison_b.pdf Delete examples/Sinusoid/exp_sin_multi_comparison_c.pdf Delete examples/Sinusoid/exp_sin_narrow.pdf Delete examples/Sinusoid/exp_sin_targeted.pdf Delete examples/Sinusoid/exp_sin_shifted.pdf Delete examples/Sinusoid/exp_sin_wide.pdf Delete examples/Sinusoid/exp_sinusoid_example_accelerated.jl Delete examples/Sinusoid/exp_sinusoid_example_comparison.jl Delete examples/Sinusoid/sinusoid_example_accelerated.jl Delete test/Accelerators directory Accelerator tests will be condensed with EKP tests Delete output/ensembles_acc.pdf Delete output/error_vs_spread_over_iteration_acc.pdf Delete output/error_vs_spread_over_time_acc.pdf Delete exp_sin_.pdf restore original Project.toml Delete examples/Darcy/darcy_accelerated.jl changed test @info printing, formatting Delete output/ensembles.pdf Delete output/error_vs_spread_over_iteration.pdf Delete output/error_vs_spread_over_time.pdf Delete examples/Darcy/output/data_storage.jld2 Delete examples/Darcy/output/parameter_storage.jld2 fix test file include EKTI test code coverage fixes code cleanup Warning for accelerated EKS process
LGTM! |
bors r+ |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Purpose
Closes #323
Content
Current results from nonlinear inversion unit tests: