-
Notifications
You must be signed in to change notification settings - Fork 104
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
Cli monitor for ert3 #2960
Cli monitor for ert3 #2960
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2960 +/- ##
==========================================
+ Coverage 65.43% 65.47% +0.03%
==========================================
Files 640 641 +1
Lines 50599 50640 +41
Branches 4438 4438
==========================================
+ Hits 33111 33158 +47
+ Misses 15996 15986 -10
- Partials 1492 1496 +4
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry if this is still WIP, but I left some comments. Seems some stuff is missing.
Other than that, looks good! I like the concurrent.future
use!
ert3/evaluator/_evaluator.py
Outdated
|
||
return result | ||
|
||
|
||
def evaluate( | ||
ensemble: Ensemble, | ||
ensemble: Ensemble, cli: bool = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the cli
flag? Is it ever used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is used, but it might be set as default and instead having a gui
there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you check line 115, EvaluatorTracker is not created by default but only when cli==True
. It could be created by default, but do something special when we will go after gui.
This is okay since the legacy tracker is nuked. |
Do this in a separate PR: #3006 |
|
Edit Did #3045 instead |
1eed498
to
1d77338
Compare
#dd18455 introduces Can we write an issue now that states " It could of course be introduced directly in this PR, but in the interest of keeping the PR small, the above suggestion might be preferable? |
Refactoring |
9cf822c
to
2b28f67
Compare
07eacc4
to
21b6631
Compare
@@ -28,52 +27,3 @@ def test_format_running_time(self): | |||
|
|||
for t in tests: | |||
self.assertEqual(t["expected"], format_running_time(t["seconds"])) | |||
|
|||
def test_calculate_progress(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these not possible to test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since _calculate_progress
function was removed I guess there is no need of having this test anymore 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will rewrite this for the _progress()
method of EvaluatorTracker
where all the functionality now lies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a bug for calculation of _progress()
#3092
I suggest we resolve this outside of this PR.
This was found because a test now needs to ensure that total realizations are also fetched correctly.
This was not the case before, as only the maths given correct numbers were tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments, but this is really great 👏
Looks very good, only had some minor comments! |
@sondreso I separated the
what do you think? |
I think that makes the most sense yes! |
bf91dce
to
814c38d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! THanks!
@@ -48,9 +49,10 @@ def _track(): | |||
|
|||
@pytest.mark.timeout(60) | |||
@pytest.mark.parametrize( | |||
"monitor_events,brm_mutations,expected_progress", | |||
"run_model, monitor_events,brm_mutations,expected_progress", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps "blacken" this string by adding space after comma manually.
Tested on a couple of ert3 examples, works fine, also with --local-test-run. Increases the user experience! |
It includes a new EvaluatorTracker with the mypy annotation located in ert.tracker.evaluator_tracker. ert3 run evaluation supports now the monitoring, which is enabled by default. A new ERT3RunModel is introduced, which is a simplified version of BaseRunModel. ERT3RunModel is required by legacy monitoring classes. A new EvaluatorConnectionInfo class is introduced used to exchange connection info between EvaluatorTracker and monitors. Co-authored-by: kvashchuka <kvashchuk.anna@gmail.com> Co-authored-by: blunde1 <BERL@equinor.com>
814c38d
to
cf0a130
Compare
Issue
Resolves #2944
Resolves #2894
Approach
This combines the following two PRs (which will be closed):
#2944
#2903
Pre review checklist
Adding labels helps the maintainers when writing release notes, see sections and the
corresponding labels here: https://github.com/equinor/ert/blob/main/.github/release.yml