-
Notifications
You must be signed in to change notification settings - Fork 108
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
Use new API from iterative_ensemble_smoother #6634
Conversation
@dafeda @tommyod @kvashchuka I need some input. Looking into it, I figured I should employ the
But in doing this change, I also needed to include loading all parameters upon init of tot_num_params = sum(
len(source_fs.experiment.parameter_configuration[key])
for key in source_fs.experiment.parameter_configuration
)
param_groups = list(source_fs.experiment.parameter_configuration.keys())
ensemble_size = ens_mask.sum()
param_ensemble = _param_ensemble_for_projection(
source_fs, iens_active_index, ensemble_size, param_groups, tot_num_params
) where It does feel very natural using the
we then avoid loading all parameters, and have an algorithm and API that functions very elegantly with streaming of parameters. There is less code and I think the math is easier to grasp and understand that we are not messing up (avoiding the projection matrix + streaming -- the reason for passing all parameters on init I think). This is what is currently suggested in the PR. What are you thoughts? |
Note after talk with @dafeda If this is not already a test in |
|
Note-to-self
Suggested to-do changes.
This should fix a lot |
e6a80b9
to
e45eed6
Compare
I think this should resolve #5876 as well. |
Indeed it does. I am however not able to link the issue with the PR today 🤷 It is not coming up when searching for issues to close with this PR, and I cannot find the PR to link it from the issue. I am probably doing something wrong? If not, I will manually close it when this PR is merged. |
In addition to snapshots. Only current problem seems to be that ERT (in cli?) uses I think it is more clean to define a |
Some snapshot tests failing In
remains to check
|
this is because we are using the high-level API, but also looping over parameters. |
The test |
|
All tests are passing. Except manual snapshots
|
To fix failing snapshot tests, it must be possible to seed the update |
We are no longer guaranteeing to get the exact same result for row scaling with 1.0 and ES, only that they are sampled correctly and that they both are reproducible. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #6634 +/- ##
==========================================
- Coverage 83.78% 83.76% -0.03%
==========================================
Files 365 365
Lines 21293 21297 +4
Branches 948 948
==========================================
- Hits 17841 17839 -2
- Misses 3158 3164 +6
Partials 294 294 ☔ View full report in Codecov by Sentry. |
This affects ES, ES-MDA, IES, adaptive localization, and row-scaling.
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 now. The usage of the API looks good to be. I very much like the comments, making the code a bit easier to understand in the future.
Issue
Resolves #6474
Closes #5876