Warn and skip constant parameter groups in all update strategies#13694
Conversation
9475101 to
4aab629
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13694 +/- ##
==========================================
- Coverage 89.58% 89.56% -0.02%
==========================================
Files 469 469
Lines 33419 33427 +8
==========================================
+ Hits 29938 29939 +1
- Misses 3481 3488 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
4aab629 to
a0796af
Compare
There was a problem hiding this comment.
Pull request overview
This PR addresses failures in ensemble updates when a parameter group is constant (zero variance across realizations) by explicitly detecting that condition, warning, and skipping the update while carrying the parameters over unchanged. This fits into ERT’s analysis update pipeline (_es_update + per-strategy implementations) by preventing update strategies from being invoked with empty/invalid parameter selections.
Changes:
- Add an early-exit in
perform_ensemble_updateto warn, emit a status event, and copy parameters unchanged when an entire parameter group has zero variance. - Harden the adaptive localization strategy to skip assimilation for batches where all parameters are zero-variance (empty update set).
- Add a regression unit test asserting a warning is logged and the posterior parameters equal the prior for constant parameters (for both global and adaptive strategies on
GenKwConfig).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tests/ert/unit_tests/analysis/test_es_update.py |
Adds regression test ensuring constant parameter groups are warned about and carried over unchanged (adaptive/global for GenKw). |
src/ert/analysis/_update_strategies/_adaptive.py |
Skips adaptive assimilation for batches where zero-variance filtering yields an empty update set. |
src/ert/analysis/_es_update.py |
Warns and skips updates when all parameters in a group have zero variance; carries them over unchanged to the posterior. |
|
Successfully created backport PR for |
Issue
Resolves #13695
git rebase -i main --exec 'just rapid-tests')When applicable