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

Refactor everserver 2 #9777

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

frode-aarstad
Copy link
Contributor

@frode-aarstad frode-aarstad commented Jan 16, 2025

Issue
Resolves #9290

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 Jan 16, 2025
Copy link

codspeed-hq bot commented Jan 16, 2025

CodSpeed Performance Report

Merging #9777 will improve performances by 12.73%

Comparing frode-aarstad:refactor-everserver-2 (7389e7d) with main (e17b0b4)

Summary

⚡ 1 improvements
✅ 23 untouched benchmarks

Benchmarks breakdown

Benchmark main frode-aarstad:refactor-everserver-2 Change
test_direct_dark_performance_with_storage[gen_x: 20, sum_x: 20 reals: 10-gen_data_with_obs-get_record_observations] 2.6 ms 2.3 ms +12.73%

@frode-aarstad frode-aarstad added the release-notes:maintenance Automatically categorise as maintenance change in release notes label Jan 17, 2025
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, some minor comments and questions

src/everest/detached/jobs/everserver.py Outdated Show resolved Hide resolved
src/everest/detached/jobs/everserver.py Outdated Show resolved Hide resolved
tests/everest/test_detached.py Outdated Show resolved Hide resolved
tests/everest/test_logging.py Outdated Show resolved Hide resolved
tests/everest/test_everserver.py Outdated Show resolved Hide resolved
def extract_errors_from_file(path: str):
with open(path, encoding="utf-8") as f:
content = f.read()
return re.findall(r"(Error \w+.*)", content)


def wait_for_server_simple(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it be possible to join this with wait_for_server?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This function is simpler and does not have to handle the strange edge cases in wait_for_server

Copy link
Collaborator

@oyvindeide oyvindeide Jan 21, 2025

Choose a reason for hiding this comment

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

But some of those edge cases cant really happen anymore? Like this from line 155:

# For very small cases the optimization will finish and bring down the
# server before we can verify that it is running.

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.

Split everserver functionality between starting server and submitting experiment
2 participants