-
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
Extract and log warnings from forward model steps #10050
Conversation
CodSpeed Performance ReportMerging #10050 will not alter performanceComparing Summary
|
7613b99
to
7ade322
Compare
src/ert/scheduler/job.py
Outdated
"Warning:" in line | ||
or "FutureWarning" in line | ||
or "DeprecationWarning" in line | ||
or "WARNING" in line |
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.
"Warning:" in line | |
or "FutureWarning" in line | |
or "DeprecationWarning" in line | |
or "WARNING" in line | |
"Warning" in line | |
or "warning" in line |
Would just checking this be sufficient, or would we pick up unwanted things?
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.
That is an open question for now :) . Probably no and yes.
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 will add some test code that makes it more specific what we want to include and not, based on what I can find in real life examples on scratch.
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.
Potentially we just want FutureWarnings first. Then we can add more later. The most permissive would be re.search('warning', line, re.IGNORECASE)
.
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.
In one example runpath..
$ grep -i warning *stdout* *stderr* | wc -l
15587
(of which 7000 are unique). I think we must be more specific.
7ade322
to
bd3d11f
Compare
Each individual forward model step is run in a separate subprocess and has no relation to Erts root logger. Thus, in order to log warnings, there is no other way than parsing the stdout and stderr files for anything that looks interesting. It is assumed that each realization will trigger approximately the same set of warnings, so the first realization to be finished will get the honour of exposing its warnings. Warning lines are truncated to 2048 characters in length, and identical warnings from the same file will be deduplicated (their count will be shown).
bd3d11f
to
4b95223
Compare
"Warning:" in line | ||
or "FutureWarning" in line | ||
or "DeprecationWarning" in line | ||
or "UserWarning" in line |
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 we sure why we want all these? If any one of those are from a know source, adding a comment about the intended source would be a good idea.
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 depends on our purpose, is this only for getting Future/DeprecationWarnings or do we also want to make a "service" to the users to be able to show warnings in the GUI at a later stage? (#9381 )
Each individual forward model step is run in a separate subprocess and has no relation to Erts root logger. Thus, in order to log warnings, there is no other way than parsing the stdout and stderr files for anything that looks interesting.
It is assumed that each realization will trigger approximately the same set of warnings, so the first realization to be finished will get the honour of exposing its warnings.
Issue
Resolves #10039
git rebase -i main --exec 'just rapid-tests'
)When applicable