Skip to content

Add max_memory keyword to the Everest config #10637

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

verveerpj
Copy link
Contributor

@verveerpj verveerpj commented Apr 15, 2025

Issue
Resolves #10624
Resolves #9569

Approach
Add the keyword, add to generated ert config

(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 '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: Add backport label to latest release (format: 'backport release-branch-name')

@verveerpj verveerpj added the release-notes:bug-fix Automatically categorise as bug fix in release notes label Apr 15, 2025
@verveerpj verveerpj self-assigned this Apr 15, 2025
@verveerpj verveerpj added this to SCOUT Apr 15, 2025
@verveerpj verveerpj moved this to In Progress in SCOUT Apr 15, 2025
@verveerpj verveerpj removed the status in SCOUT Apr 15, 2025
Copy link

codspeed-hq bot commented Apr 15, 2025

CodSpeed Performance Report

Merging #10637 will not alter performance

Comparing add-max_memory (d431fb3) with main (9097b8b)

Summary

✅ 25 untouched benchmarks

Copy link
Collaborator

@oyvindeide oyvindeide left a comment

Choose a reason for hiding this comment

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

Looks good, I have one question that is slightly more work, but think it might be worth it in the long run, not sure what you think?

@field_validator("max_memory")
@classmethod
def validate_max_memory(cls, max_memory: int | str | None) -> str | None:
if max_memory is None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we reuse this?

def _parse_realization_memory_str(realization_memory_str: str) -> int:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@@ -58,6 +59,29 @@ class SimulatorConfig(BaseModelWithContextSupport, extra="forbid"):
A value of 0 means unlimited runtime.
""",
)
max_memory: int | str | None = Field(
Copy link
Collaborator

Choose a reason for hiding this comment

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

This would entail a bigger refactor, which would also touch ert, but there is a concept in ert of generic queue options, and I think this one probably belongs with that

class QueueOptions(

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, I noted that also. It seems not everything lives in there though, for instance the QueueOptions base class does contain max_running, but not max_runtime, or realization_memory, they live in QueueConfig. Maybe realization_memory does belong in the options class since it is basically a property you set in the node. But maybe that is true for some of the other fields too? Changing that should maybe a separate issue since it touches ERT.

Also, then the question is if it changes the Everest config: Do we keep max_memory as a field in SimulatorConfig? Or does the user have to specify it in the queue-specific options?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is somewhat related to this issue #10628. If we had the same keyword for max memory for everest and ert it would simplify giving the user error messages like this.

@verveerpj verveerpj force-pushed the add-max_memory branch 4 times, most recently from 3383365 to cd96e46 Compare April 16, 2025 15:05
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
Status: No status
Development

Successfully merging this pull request may close these issues.

Not possible to set realization memory in Everest Unification of Int and Str input format in config file
3 participants