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 restart experiment by updating shapshot only #8692

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

xjules
Copy link
Contributor

@xjules xjules commented Sep 13, 2024

Issue
Resolves #8032

Approach
When restart happens just re-use the old snapshot model.

(Screenshot of new behavior in GUI if applicable)
image

The only issue is that the number of realizations (in the status bar) is different than what GUI shows.

  • 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 tests pass locally (after every commit!)

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

@xjules xjules added the release-notes:improvement Automatically categorise as improvement in release notes label Sep 13, 2024
@xjules xjules self-assigned this Sep 13, 2024
@codecov-commenter
Copy link

codecov-commenter commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.35%. Comparing base (535e314) to head (c858fd4).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8692      +/-   ##
==========================================
+ Coverage   91.30%   91.35%   +0.05%     
==========================================
  Files         342      342              
  Lines       20978    20982       +4     
==========================================
+ Hits        19153    19168      +15     
+ Misses       1825     1814      -11     
Flag Coverage Δ
cli-tests 39.56% <30.76%> (+0.04%) ⬆️
gui-tests 73.48% <100.00%> (+<0.01%) ⬆️
performance-tests 50.04% <92.30%> (-0.05%) ⬇️
unit-tests 79.83% <92.30%> (+<0.01%) ⬆️

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.

all_realizations = self._iter_snapshot[current_iter].reals
current_progress = 0.0
realization_count = len(all_realizations)
# realization_count = len(all_realizations)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# realization_count = len(all_realizations)

@@ -404,7 +405,10 @@ def _current_progress(self) -> tuple[float, int]:
]:
done_realizations += 1

realization_progress = float(done_realizations) / len(all_realizations)
# realization_progress = float(done_realizations) / len(all_realizations)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# realization_progress = float(done_realizations) / len(all_realizations)

Copy link
Contributor

@jonathan-eq jonathan-eq left a comment

Choose a reason for hiding this comment

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

Looks very good, just remove the comments and we are ready to merge 🚗 💨

@jonathan-eq
Copy link
Contributor

Also, should we change the button text? Restart can be misinterpreted, and should in this case be something along the lines of Restart failed realizations.

@xjules
Copy link
Contributor Author

xjules commented Sep 23, 2024

Also, should we change the button text? Restart can be misinterpreted, and should in this case be something along the lines of Restart failed realizations.

Hm, the button would become quite huge wouldn't it? :)

@jonathan-eq
Copy link
Contributor

Also, should we change the button text? Restart can be misinterpreted, and should in this case be something along the lines of Restart failed realizations.

Hm, the button would become quite huge wouldn't it? :)

Yes, we would have to rephrase it for something better 🤔

Copy link
Contributor

@jonathan-eq jonathan-eq left a comment

Choose a reason for hiding this comment

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

Looks great to me! ☘️

Fix restart test to expect the total number of realizations when restart happens
Update progress bar info on total number of reals
@xjules
Copy link
Contributor Author

xjules commented Sep 25, 2024

New screenshot:

image

@xjules xjules enabled auto-merge (rebase) September 25, 2024 07:23
@xjules xjules merged commit 21af329 into equinor:main Sep 25, 2024
50 checks passed
@xjules xjules deleted the fix_restart branch September 25, 2024 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:improvement Automatically categorise as improvement in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restart experiment (or realization) from GUI does unexpected things
3 participants