-
Notifications
You must be signed in to change notification settings - Fork 110
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
Remove DESIGN_MATRIX_GROUP for parameter_configuration in design matrix #9840
Conversation
CodSpeed Performance ReportMerging #9840 will not alter performanceComparing Summary
|
Will we have problems due to duplicate keys if we flatten the dict, before under DESIGN_MATRIX_GROUP? |
Not sure what you mean by this? This only removes the parameter_configuration as dict or you meant something else? |
I misunderstood what was meant by DESIGN_MATRIX_GROUP in this context. I will look over it again 👍 |
@@ -77,7 +77,7 @@ def test_merge_multiple_occurrences( | |||
design_matrix_1.merge_with_other(design_matrix_2) | |||
else: | |||
design_matrix_1.merge_with_other(design_matrix_2) | |||
design_params = design_matrix_1.parameter_configuration.get("DESIGN_MATRIX", []) | |||
design_params = design_matrix_1.parameter_configuration |
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.
Can parameter_configuration be None? Maybe we should add or []
at the end?
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.
then the test will fail. I can do assert though....
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.
I think maybe @larsevj should have a look at this too 👀
src/ert/config/design_matrix.py
Outdated
pc_other = dm_other.parameter_configuration[DESIGN_MATRIX_GROUP] | ||
pc_self = self.parameter_configuration[DESIGN_MATRIX_GROUP] | ||
pc_other = dm_other.parameter_configuration | ||
pc_self = self.parameter_configuration | ||
assert isinstance(pc_other, GenKwConfig) |
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.
Are you able to remove these asserts now? parameter_configuration is now simply a GenKwConfig, and so the type hints should be changed if possible in a couple of places? Maybe the name should be changed as well.
The dictionary introduced in parameter configuration in design matrix config seems to be not necessary and thus removing it. The type will those become GenKwConfig directly.
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 👍
Issue
Resolves #9718
Approach
The dictionary introduced in parameter configuration in design matrix config seems not to be necessary. ✂️
(Screenshot of new behavior in GUI if applicable)
git rebase -i main --exec 'pytest tests/ert/unit_tests tests/everest -n auto --hypothesis-profile=fast -m "not integration_test"'
)When applicable