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 ert config from batch sim #9070

Merged

Conversation

frode-aarstad
Copy link
Contributor

@frode-aarstad frode-aarstad commented Oct 28, 2024

Issue
Resolves #9002

Approach
Short description of the approach

(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 -n logical -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

@frode-aarstad frode-aarstad self-assigned this Oct 28, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 29, 2024

Codecov Report

Attention: Patch coverage is 98.27586% with 2 lines in your changes missing coverage. Please review.

Project coverage is 90.75%. Comparing base (7ee89c1) to head (6f3d835).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/ert/config/ert_config.py 98.24% 1 Missing ⚠️
src/ert/simulator/batch_simulator_context.py 96.15% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9070      +/-   ##
==========================================
+ Coverage   90.72%   90.75%   +0.03%     
==========================================
  Files         350      350              
  Lines       21800    21833      +33     
==========================================
+ Hits        19777    19814      +37     
+ Misses       2023     2019       -4     
Flag Coverage Δ
cli-tests 39.09% <74.13%> (+0.07%) ⬆️
gui-tests 71.74% <70.68%> (+0.01%) ⬆️
performance-tests 49.29% <68.96%> (+0.04%) ⬆️
unit-tests 79.62% <97.41%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@frode-aarstad frode-aarstad force-pushed the remove-ert-config-from-batch-sim branch 2 times, most recently from 4d3c21d to e0a7721 Compare October 30, 2024 09:21
@@ -20,7 +20,7 @@ def execute_workflow(
msg = "Workflow {} is not in the list of available workflows"
logger.error(msg.format(workflow_name))
return
runner = WorkflowRunner(workflow, storage, ert_config=ert_config)
runner = WorkflowRunner(workflow=workflow, storage=storage, ert_config=ert_config)
Copy link
Contributor

Choose a reason for hiding this comment

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

OK change, but purely cosmetic and unrelated to this PR? Could be in a separate commit

@@ -83,6 +83,164 @@ def site_config_location() -> str:
)


def create_forward_model_json(
Copy link
Contributor

Choose a reason for hiding this comment

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

Supposing nothing was changed here, just a move?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

Copy link
Contributor

@yngve-sk yngve-sk left a comment

Choose a reason for hiding this comment

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

HMM, I see the number of parameters passed from the ert config became bit large, a lot of it is from having to make create_run_path generic so it can be invoked from both places. And we do need to get the info from the ErtConfig somehow but the way it is currently structured is making this very verbose. It might be worth thinking a bit more about whether we need to use the same create_run_path from everest as from ERT, I'm not entirely sure..

I think this deserves some more discussion at least. Would it maybe be possible to make BatchSimulator depend more directly on things from the EverestConfig instead sub-configs of the ErtConfig?

@frode-aarstad
Copy link
Contributor Author

HMM, I see the number of parameters passed from the ert config became bit large, a lot of it is from having to make create_run_path generic so it can be invoked from both places. And we do need to get the info from the ErtConfig somehow but the way it is currently structured is making this very verbose. It might be worth thinking a bit more about whether we need to use the same create_run_path from everest as from ERT, I'm not entirely sure..

I think this deserves some more discussion at least. Would it maybe be possible to make BatchSimulator depend more directly on things from the EverestConfig instead sub-configs of the ErtConfig?

I agree that some functions have become very verbose. In particular BatchSimulator and BatchContext. Perhaps its worth having a discussion how we can improve those two.

@frode-aarstad frode-aarstad added the release-notes:maintenance Automatically categorise as maintenance change in release notes label Oct 31, 2024
@frode-aarstad frode-aarstad force-pushed the remove-ert-config-from-batch-sim branch from e0a7721 to 88fa3ec Compare November 1, 2024 08:00
Copy link
Contributor

@yngve-sk yngve-sk left a comment

Choose a reason for hiding this comment

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

👍

@frode-aarstad frode-aarstad force-pushed the remove-ert-config-from-batch-sim branch from 88fa3ec to 6f3d835 Compare November 1, 2024 13:24
@frode-aarstad frode-aarstad merged commit 1488d88 into equinor:main Nov 1, 2024
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:maintenance Automatically categorise as maintenance change in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove ert config from BatchSimulator
3 participants