-
Notifications
You must be signed in to change notification settings - Fork 25
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
Account for ert and ert3 discrepancy when uploading parameter data to storage #192
Conversation
2bea1ae
to
1a22ee8
Compare
I did some testing of this PR and I can confirm that the visualiser no longer crashes 👍🏻 First, a comment on the behaviour of the visualiser: Second, a comment on the approach: I'm not entirely convinced that this should be resolved in |
d37df69
to
37e9f3a
Compare
webviz_ert/data_loader/__init__.py
Outdated
return df | ||
except DataLoaderException as e: | ||
logger.error(e) | ||
return self.get_ensemble_record_data( |
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 this necessary because the above only fetches ensemble wide data, and this call fetches realization by realization?
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.
Yes, that's right
874ece5
to
19df739
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
webviz_ert/models/ensemble_model.py
Outdated
@@ -98,7 +101,18 @@ def parameters( | |||
self, | |||
) -> Optional[Mapping[str, ParametersModel]]: | |||
if not self._parameters: | |||
parameter_names = self._data_loader.get_ensemble_parameters(self._id) | |||
parameter_names = [] | |||
# TODO Remove except code path after PR https://github.com/equinor/ert-storage/pull/180 is merged |
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 think TODO's are more likely to be picked up in issues, then in the code ;)
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.
Generally, that is right but the point of this TODO was to remind me that there is still something to be solved and removed before having a final version of the code and merging it.... like a TODO is meant to be right 🤔 ?
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.
Ah, so this is not ready for merging yet then? :)
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 now that the TODO was dealt with also jenkins should also pass once the new ert-storage release is in bleeding
I'm pressuming this is not the end of this effort? Would be nice to see the issues pointing laying out the remaining work before we merge this :) |
8f7864d
to
d0194f5
Compare
d0194f5
to
00a3826
Compare
Not really sure what "this effort" is that you are hinting at. This PR should enable webviz ert to properly display grouped ert3 parameters and plot them also get responses as ensemble wide records. |
Jenkins test this please |
@@ -113,7 +113,7 @@ class DataLoader: | |||
_instances: MutableMapping[ServerIdentifier, "DataLoader"] = {} | |||
|
|||
baseurl: str | |||
token: str | |||
token: Optional[str] |
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.
Could you explain why this is optional now?
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.
Not really sure why pylint was not complaining before about this, it just started, I guess it was updated recently.
The Dataloader __new__
definition looked like this for quite some time
def __new__(cls, baseurl: str, token: Optional[str] = None) -> "DataLoader":
So token is expected to he Optional[str]
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.
Thanks :)
df = pd.read_parquet(stream) | ||
return df | ||
try: | ||
if "::" in parameter_name: |
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.
This is what I meant by future work. It might be that I'm misunderstanding something, but is this not somewhat of a hack to avoid having to make ERT2 upload parameters as it should?
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.
Sure we can make ert2 upload parameters like ert3 does it, but I thought the idea was that the underlying Data structure is the same for both ert3 and ert2 it should not matter how they are uploaded, ert2 or ert3 style given that both ways are valid and supported by the storage API.
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 was expecting some tests verifying the current ::
logic...?
I did some testing and it seems like the original problems are fixed 👍🏻 I tried running the entire polynomial case with ert3 using
I guess we should either fix it here or create a new issue for it. I'm fine with either :) |
I think a new issue is required, I will create it. I think this never worked (the visualisation) it cannot find the The coefficients are added to storage before the experiment is run with |
#203 was added to track the issue reported ⬆️ |
8f23b8e
to
c5b3723
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.
Thanks for the update 👍🏻
Issue
Resolves: #191
It seems parameters are handled differently for ert3 and ert at the moment:
Approach
For a given parameter (i.e. coefficients) try to retrieve a global record (assuming the user has run ERT) if this fails for the same parameter try to retrieve a record for a realization index in the list of active realization of the run example.