-
Notifications
You must be signed in to change notification settings - Fork 110
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
Better error message when experiment is terminated by user #10158
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #10158 will not alter performanceComparing Summary
|
9c2e575
to
c0158cd
Compare
src/ert/run_models/base_run_model.py
Outdated
@@ -610,7 +615,7 @@ async def run_ensemble_evaluator_async( | |||
await evaluator._server_started | |||
if not (await self.run_monitor(ee_config, ensemble.iteration)): | |||
await evaluator_task | |||
return [] | |||
return _UserCancelled() |
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.
Is it a good practice to return Exceptions and raise it somewhere else?
Maybe it would be better to just do the extra logic already here, and raise it directly?
return _UserCancelled() | |
self.active_realizations = [False for _ in self.active_realizations] | |
raise _UserCancelled() |
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.
Agree with @jonathan-eq on this one. Besides, it might be that await evaluator_task
raises first if something fails (?)
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 now raises instead
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.
added a nicer error message if it fails while waiting for evaluator_task
src/ert/run_models/base_run_model.py
Outdated
@@ -94,6 +94,10 @@ def delete_runpath(run_path: str) -> None: | |||
shutil.rmtree(run_path) | |||
|
|||
|
|||
class _UserCancelled(Exception): |
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.
Do we want this exception to be private, if we intend for it to be raised up to a different module?
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.
Made it public. I guess it could be useful, but it was just added to control the exception handling inside base_run_model better
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 have some questions 🤔
fc25259
to
9946c2c
Compare
9946c2c
to
7d90b91
Compare
Issue
Resolves #9960
Approach
Short description of the approach
(Screenshot of new behavior in GUI if applicable)
git rebase -i main --exec 'just rapid-tests'
)When applicable