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

Remove DESIGN_MATRIX_GROUP for parameter_configuration in design matrix #9840

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

xjules
Copy link
Contributor

@xjules xjules commented Jan 22, 2025

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)

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'pytest tests/ert/unit_tests tests/everest -n auto --hypothesis-profile=fast -m "not integration_test"')

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Create Backport PR to latest release

@xjules xjules self-assigned this Jan 22, 2025
@xjules xjules added the release-notes:skip If there should be no mention of this in release notes label Jan 22, 2025
Copy link

codspeed-hq bot commented Jan 22, 2025

CodSpeed Performance Report

Merging #9840 will not alter performance

Comparing xjules:rem_dm_group (a8bdd9b) with main (02df6ee)

Summary

✅ 24 untouched benchmarks

@jonathan-eq
Copy link
Contributor

Will we have problems due to duplicate keys if we flatten the dict, before under DESIGN_MATRIX_GROUP?

@xjules
Copy link
Contributor Author

xjules commented Jan 23, 2025

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?

@jonathan-eq
Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Contributor Author

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....

Copy link
Contributor

@jonathan-eq jonathan-eq left a 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 👀

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)
Copy link
Contributor

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.
Copy link
Contributor

@larsevj larsevj left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@xjules xjules merged commit eed1db0 into equinor:main Jan 24, 2025
27 checks passed
@xjules xjules deleted the rem_dm_group branch January 24, 2025 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:skip If there should be no mention of this in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove DESIGN_MATRIX_GROUP label from design matrix config
3 participants