equinor / semeio

Semeio is a collection of jobs and workflow jobs used in ert (https://github.com/equinor/ert).
https://github.com/equinor/semeio
GNU General Public License v3.0
10 stars 27 forks source link

Validate DESIGN_KW configuration at start up instead of when running forward model #641

Open eivindjahren opened 4 weeks ago

eivindjahren commented 4 weeks ago

The following list of errors can happen on running the forward model step. It should be validated at startup.

Also the following uncaught exceptions from extract_key_value can occurr which should be result in a better error message at startup.

File ".../python3.8/site-packages/semeio/forward_models/design_kw/design_kw.py", line 113, in extract_key_value
line_parts = shlex.split(line)
File "/usr/lib64/python3.8/shlex.py", line 311, in split
return list(lex)
File "/usr/lib64/python3.8/shlex.py", line 300, in __next__
token = self.get_token()
File "/usr/lib64/python3.8/shlex.py", line 109, in get_token
raw = self.read_token()
File "/usr/lib64/python3.8/shlex.py", line 191, in read_token
raise ValueError("No closing quotation")
ValueError: No closing quotation
File ".../python3.8/site-packages/semeio/forward_models/design_kw/design_kw.py", line 135, in extract_key_value
raise ValueError("\n".join(errors))
ValueError: No value found in line ...
jonathan-eq commented 2 weeks ago

@eivindjahren Should this be an error, stopping the user from proceeding? It is currently only a warning. WARNING - Key(s) [...] can only be used with prefix

eivindjahren commented 2 weeks ago

@eivindjahren Should this be an error, stopping the user from proceeding? It is currently only a warning. WARNING - Key(s) [...] can only be used with prefix

That is indicating that something might be wrong with the key so I guess its a warning. Generally, we haven't really looked into what is possible as some of these values may be generated on the compute node.

eivindjahren commented 2 weeks ago

It could be that <template_file> is generated by a previous forward model step. However, we believe it is unlikely, but we need to check that assumption. Propose the following steps: