GithubHelp home page GithubHelp logo

equinor / webviz-ert Goto Github PK

View Code? Open in Web Editor NEW
12.0 14.0 24.0 510 KB

ERT webviz plugins

License: GNU General Public License v3.0

Python 92.74% CSS 1.50% Shell 0.78% Jinja 4.99%
ert webviz dash plotly fmu hacktoberfest

webviz-ert's Introduction

PyPI version Build Status Code style: black PyPI license

Web based visualization for ERT

What is Webviz-ert

Webviz-ert is a visualization tool for ERT based on dash and webviz-config.

Download project

The code is hosted on GitHub: https://github.com/equinor/webviz-ert

# From the downloaded project's root folder - to install
pip install .

Running tests

Make sure that you have a browser and driver available for running the tests, e.g. chrome / chromium and the chrome driver, which should be installed / downloaded as binaries and made available in the path.

# From the downloaded project's root folder - to run tests
pip install -r test_requirements.txt
cd tests
pytest

Run Webviz-ert

Webviz-ert connects automatically to a storage server running in ERT. Here are a few steps to get an example version of webviz-ert running.

# Run simulations in ert - <ert-root-folder>/test-data/local/poly_example/
ert ensemble_smoother --target-case smoother poly.ert

# After simulation has finished, start webviz-ert from the same location with
ert vis

# Alternatively, you might have to supply the config file if you're using the
# classic ert storage solution:
ert vis poly.ert

Example

Start up

startup

Plot viewer

plot_viewer

Observation Analyzer

observation_analyzer

Parameter comparison

parameter_comparison

Response correlation

response_correlation

webviz-ert's People

Contributors

anetteu avatar berland avatar dansava avatar eivindjahren avatar frode-aarstad avatar hnformentin avatar kvashchuka avatar kwinkunks avatar larsevj avatar maninfez avatar mortalisk avatar oysteoh avatar oyvindeide avatar pinkwah avatar snyk-bot avatar valentin-krasontovitsch avatar xjules avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webviz-ert's Issues

Create Observation Analyzer Viewer

Design a view that should server as an exploration / analyzer for observation related data: misfits, inactive and active observations. Additionally, it can serve as a workbench for manual (user defined) transformations applied on observations: scaling, deactivating.

Visualize results from MISFIT_PREPROCESSOR

To provide insight into the resulting observation scaling, we should provide a visualization of intermediate clusters, ie. observation groupings. These form the basis for further scaling.

One potential solution could be to visualize correlation matrices (top) and/or matrices with hierarchical clusterings on top (bottom) as demonstrated by @eivindsm

image
image

Another solution could be to exploit parallel coordinates for showing clustering results, for instance:
image

This is dependent of having the MISFIT_PREPROCESSOR job parameters internalized and exposed.

Visual representation of forward models

A relevant idea for webviz-ert: make a visual representation of the forward models; sequence, dependencies, and status during execution. Idea originally submitted by MOD SOUTH

Authentication issue on webviz

Currently the users getting logged out after a while, and it is not optimal how webviz does authentication. We should poke webviz team and make sure this is getting solved in a proper way by them or making an agreement that we will fix it.

Exceptions thrown for some responses in the observation analyzer page

For some of the responses an exception is thrown when using a database from the HM tutorial. The same responses works perfectly fine in the other views.

I have the database-file if needed for investigation. Stacktrace below

Traceback (most recent call last):
  File "/Users/OOH/code/virtualenvs/ert/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/OOH/code/virtualenvs/ert/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/OOH/code/virtualenvs/ert/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/OOH/code/virtualenvs/ert/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/OOH/code/virtualenvs/ert/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/OOH/code/virtualenvs/ert/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/OOH/code/virtualenvs/ert/lib/python3.8/site-packages/dash/dash.py", line 1059, in dispatch
    response.set_data(func(*args, outputs_list=outputs_list))
  File "/Users/OOH/code/virtualenvs/ert/lib/python3.8/site-packages/dash/dash.py", line 994, in add_context
    output_value = func(*args, **kwargs)  # %% callback invoked %%
  File "/Users/OOH/code/virtualenvs/ert/lib/python3.8/site-packages/ertviz/controllers/observation_response_controller.py", line 121, in _update_graph
    response_plots = [
  File "/Users/OOH/code/virtualenvs/ert/lib/python3.8/site-packages/ertviz/controllers/observation_response_controller.py", line 122, in <listcomp>
    _generate_plot(ensemble_id, data["color"])
  File "/Users/OOH/code/virtualenvs/ert/lib/python3.8/site-packages/ertviz/controllers/observation_response_controller.py", line 118, in _generate_plot
    plot = _create_misfits_plot(ensemble.responses[response], None, color)
  File "/Users/OOH/code/virtualenvs/ert/lib/python3.8/site-packages/ertviz/controllers/observation_response_controller.py", line 33, in _create_misfits_plot
    response.univariate_misfits_df(selected_realizations),
  File "/Users/OOH/code/virtualenvs/ert/lib/python3.8/site-packages/ertviz/models/response.py", line 66, in univariate_misfits_df
    return misfits_df.astype("float64")
  File "/Users/OOH/code/virtualenvs/ert/lib/python3.8/site-packages/pandas/core/generic.py", line 5546, in astype
    new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors,)
  File "/Users/OOH/code/virtualenvs/ert/lib/python3.8/site-packages/pandas/core/internals/managers.py", line 595, in astype
    return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
  File "/Users/OOH/code/virtualenvs/ert/lib/python3.8/site-packages/pandas/core/internals/managers.py", line 406, in apply
    applied = getattr(b, f)(**kwargs)
  File "/Users/OOH/code/virtualenvs/ert/lib/python3.8/site-packages/pandas/core/internals/blocks.py", line 2100, in astype
    return super().astype(dtype=dtype, copy=copy, errors=errors)
  File "/Users/OOH/code/virtualenvs/ert/lib/python3.8/site-packages/pandas/core/internals/blocks.py", line 595, in astype
    values = astype_nansafe(vals1d, dtype, copy=True)
  File "/Users/OOH/code/virtualenvs/ert/lib/python3.8/site-packages/pandas/core/dtypes/cast.py", line 941, in astype_nansafe
    raise TypeError(f"cannot astype a datetimelike from [{arr.dtype}] to [{dtype}]")
TypeError: cannot astype a datetimelike from [datetime64[ns]] to [float64]

Functionality for alternative filtering when AHM is not working properly

Options:

  • Filter on overall objective value / misfit
  • Filter on misfit for key observations relevant for the specific use of the predictions (eg rates & pressure & "flooding information" in an area where a well is considered
  • The above combined with realizations capturing the key uncertainties for the specific use (i.e. ensure capturing the relevant uncertainty span of the key parameters having effect on eg the deltaproduction of adding a new well)

Create DB file for webviz azure demo

The demo needs a db which is updated and supports the latest version of webviz-ert / ert api.
The file and the data needs to be open source / not closed data.

A suggestion would be dockerfile with ert api serving the data from the database in a bundle handed over to the webviz-config team

Create graph layout of ensembles

The layout of the ensemble graph in the ensemble-selector should be calculated to a reasonable tree layout. Currently we use predefined layouts from cytoscape, but this should be something that makes sense for multiple trees.

Make data loader configurable

Webviz-ert is now automatically connecting to a ert storage using the information registered in the storage_server.json lnked in a tmp folder, using the ert_shared.storage.connection module. There should be a way for the user to specify the folder containing the storage_server.json. If none is specified it would search in the current working directory, and lastly try the "registered" ert server. If it fails to find any storage server it should fail gracefully.

Make a better formatting of x_axis labels for missfits

As show here, the labels take a lot of space:
image.png

We need to format it more explanatory. Also this might be point for discussion as when we are to introduce labels (see #60) the label should describe the group rather than the missfit instead.

Discussion: caching vs data simplification for bigger datasets

Was running one iteration on snake_oil example and interaction with plots becomes unbearable slow.
Just selecting a new response (ie. populating the list box and selecting the response) takes several seconds. I know that we decided not to focus on the optimization issue yet, but still we should have it noted somewhere at least :)
image

Use async requests

...will have to wait probably until ert is using a prod server or some framework supporting multiple requests simultaneously.

Introduce groupings / labels into observations and responses

While working on misifts visualization an issue came up relating to how to visualize univariate misfits for a large number of observations. Currently each observation provides misfits stats, which in case of tens of thousands would be unreadable. One potential solution is to group observations into clusters (groups) and visualize misfits statistics of such a group instead (by aggregating misfits over the group).

Here, we can employ clustering results from misfits_preprocessor job for instance. The labels are not persisted yet though.

Another discussion relates to grouping of responses, which would provide additional hierarchical aspect, eg. show cumulative misfits statistics from a given response group. This reflects also the upcoming MultiResponseView plugin, which would automatically unroll all response plots from a given response group.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.