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

Fix fragmented df dm #10202

Merged
merged 3 commits into from
Mar 7, 2025
Merged

Fix fragmented df dm #10202

merged 3 commits into from
Mar 7, 2025

Conversation

larsevj
Copy link
Collaborator

@larsevj larsevj commented Mar 4, 2025

Issue
Resolves #10143

  • 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 'just rapid-tests')

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

@larsevj larsevj force-pushed the fix_fragmented_df_dm branch from f7adaf3 to 30c7c54 Compare March 4, 2025 11:02
@larsevj larsevj self-assigned this Mar 4, 2025
@larsevj larsevj added the release-notes:bug-fix Automatically categorise as bug fix in release notes label Mar 4, 2025
Copy link

codspeed-hq bot commented Mar 4, 2025

CodSpeed Performance Report

Merging #10202 will not alter performance

Comparing larsevj:fix_fragmented_df_dm (d047981) with main (97b76a2)

Summary

✅ 25 untouched benchmarks

Copy link
Contributor

@xjules xjules left a comment

Choose a reason for hiding this comment

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

The first commit requires a better explanation. But otherwise good job! 🚀

@xjules
Copy link
Contributor

xjules commented Mar 7, 2025

And what about: tests/ert/ui_tests/cli/analysis/test_design_matrix.py there is "DESIGN_MATRIX" in pd.Dataframe or ?

@larsevj
Copy link
Collaborator Author

larsevj commented Mar 7, 2025

And what about: tests/ert/ui_tests/cli/analysis/test_design_matrix.py there is "DESIGN_MATRIX" in pd.Dataframe or ?

The group name is still DESIGN_MATRIX, this change only matters if you interact directly with the df. I believe all tests in tests/ert/ui_tests/cli/analysis/test_design_matrix.py use the output from ert (parameters.txt or parameters.json).

@xjules
Copy link
Contributor

xjules commented Mar 7, 2025

And what about: tests/ert/ui_tests/cli/analysis/test_design_matrix.py there is "DESIGN_MATRIX" in pd.Dataframe or ?

The group name is still DESIGN_MATRIX, this change only matters if you interact directly with the df. I believe all tests in tests/ert/ui_tests/cli/analysis/test_design_matrix.py use the output from ert (parameters.txt or parameters.json).

You are correct. It is actually a dataset that is created out of load_parameters. So all good!

larsevj added 3 commits March 7, 2025 13:33
- Creates a dataframe for the default values and concatenates it with the
design matrix dataframe to avoid inserting many columns and 'defragmenting' the dataframe,
per Pandas warning.
@larsevj larsevj force-pushed the fix_fragmented_df_dm branch from 30c7c54 to d047981 Compare March 7, 2025 12:38
Copy link
Contributor

@xjules xjules left a comment

Choose a reason for hiding this comment

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

good job! 🚀

@larsevj larsevj merged commit ab2db39 into equinor:main Mar 7, 2025
27 checks passed
@larsevj larsevj deleted the fix_fragmented_df_dm branch March 7, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:bug-fix Automatically categorise as bug fix in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dataframe is heavily fragmented, in config/design_matrix.py
2 participants