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

Avoid raising runtime error when calling get_opt_status and no objectives and controls are stored in everest storage #10156

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

DanSava
Copy link
Contributor

@DanSava DanSava commented Feb 26, 2025

Issue
Resolves #10155

Approach
Return empty dict if no objectives and controls are stored in everest storage when calling get_opt_status

(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: Create Backport PR to latest release

…ives and controls are stored in everest storage
@DanSava DanSava self-assigned this Feb 26, 2025
@DanSava DanSava requested a review from yngve-sk February 26, 2025 09:33
Copy link

codspeed-hq bot commented Feb 26, 2025

CodSpeed Performance Report

Merging #10156 will improve performances by 13.65%

Comparing DanSava:update-get-opt-status (c2d62a8) with main (8025e0b)

Summary

⚡ 1 improvements
✅ 24 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
test_direct_dark_performance_with_storage[gen_x: 20, sum_x: 20 reals: 10-summary-get_record_observations] 1.5 ms 1.3 ms +13.65%

@yngve-sk
Copy link
Contributor

Overall looks good, I think get_opt_status is always invoked after an optimization run, and if there are no objectives in storage we can raise an explicit error about it.

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.

LGTM, I think erroring explicitly from within _get_opt_status is not feasible afterall since it is invoked during the optimization run. We should however give an explicit error if there are no objective results after running the optimization, but that is a for a separate PR.

@DanSava DanSava merged commit 27a0895 into equinor:main Feb 26, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Everest unclear error when forward model evaluation fails on first batch
2 participants