Skip to content
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

Add the GNKI tools and unit testing #407

Merged
merged 25 commits into from
Sep 24, 2024
Merged

Add the GNKI tools and unit testing #407

merged 25 commits into from
Sep 24, 2024

Conversation

odunbar
Copy link
Member

@odunbar odunbar commented Sep 4, 2024

Purpose

Closes #404
Closes #405
Closes #406
Coauthored by @rgjini

Content

  • Added basic GNKI struct taking in prior
  • Added update function,
  • Added some defaults for timestepper etc.
  • Coverage of unit testing passes
  • Docstrings

MISC

  • Also resolves some bugs in testing where we need to deepcopy(Unscented(..)) processes when reusing them as they store a history internally
  • Also resolves an "always-false" check statement where nameof(typeof(X)) == name should be Symbol(name). Replaced all cases with isa(X,name)
  • Also resolves bugs in github-actions where old packages are loaded instead of new ones, and resolves a related docs issue

Example output: Sinusoid N_ens=10, N_iter=5

Ran defaults with timestep = 1
i.e.

ensemble_kalman_process = EKP.EnsembleKalmanProcess(
    initial_ensemble,
    y,
    Γ,
    GaussNewtonInversion(prior),
    localization_method = Localizers.NoLocalization(),
    accelerator = DefaultAccelerator(),
) 

output
and with localization + accelerator, timestep =1 "bells and whistles"

ensemble_kalman_process = EKP.EnsembleKalmanProcess(
    initial_ensemble,
    y,
    Γ,
    GaussNewtonInversion(prior),
)

output


  • I have read and checked the items on the review checklist.

@odunbar odunbar requested a review from rgjini September 4, 2024 18:42
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The algorithm looks good to me!

Copy link
Collaborator

@rgjini rgjini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good to me! A couple questions: there are a few places with warnings saying certain lines are not covered by the tests, is that normal? I was also curious what ekp.verbose means? Is this something all the algorithms have?

@odunbar
Copy link
Member Author

odunbar commented Sep 23, 2024

Everything looks good to me! A couple questions: there are a few places with warnings saying certain lines are not covered by the tests, is that normal?

This means that we added some new lines of code that are untested - we require ~90% of the new code to be covered as a soft-rule so we can add a couple more tests to cover anything important that was missed

I was also curious what ekp.verbose means? Is this something all the algorithms have?

Yes, if we add verbose = true when creating the EKP object it prints some basic diagnostic-type information about the convergence

By the looks of it, I shall

  • improve the test coverage, just by making one of the pipelines use verbose=true across all tools to increase coverage
  • look at why the windows tests fail. It's nothing we did, rather it is a some package issue in the pipeline.

...Docs now fail due to different environment issue.

  • resolve docs-build issue...

@odunbar
Copy link
Member Author

odunbar commented Sep 23, 2024

All resolved - merging on tests passing and docs building

@odunbar odunbar merged commit 08c735e into main Sep 24, 2024
12 checks passed
@odunbar odunbar changed the title [WIP] Add the GNKI tools and unit testing Add the GNKI tools and unit testing Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants