Workflow log manage experiments - #14280
Conversation
|
Screenshots differ from baselines. A baseline update PR has been prepared: equinor/ert-testdata#94 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## workflow-log-gui-tab #14280 +/- ##
========================================================
+ Coverage 91.81% 91.85% +0.03%
========================================================
Files 487 487
Lines 35089 35152 +63
========================================================
+ Hits 32218 32288 +70
+ Misses 2871 2864 -7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Pull request overview
Adds persisted workflow output viewing to Manage experiments, reusing the existing workflow log widget.
Changes:
- Loads resilient JSONL workflow events from experiment storage.
- Adds a lazily loaded Workflows tab with iteration grouping and placeholders.
- Adds unit/UI coverage and updates workflow documentation.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/ert/run_models/event.py |
Adds workflow-event loading. |
src/ert/gui/experiments/view/workflow_log.py |
Adds bulk loading and stored-log view. |
src/ert/gui/experiments/view/__init__.py |
Exports the new view. |
src/ert/gui/tools/manage_experiments/storage_info_widget.py |
Adds the Workflows tab. |
tests/ert/unit_tests/run_models/test_workflow_event_loading.py |
Tests JSONL loading behavior. |
tests/ert/unit_tests/gui/experiments/view/test_workflow_log_widget.py |
Tests bulk event display. |
tests/ert/unit_tests/gui/experiments/view/test_workflow_log_view.py |
Tests stored-log view behavior. |
tests/ert/ui_tests/gui/test_manage_experiments_tool.py |
Tests the user workflow end-to-end. |
docs/ert/reference/workflows/complete_workflows.rst |
Documents persisted workflow output. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Screenshot tests now pass. The baseline update PR equinor/ert-testdata#94 has been closed. |
00fcfc9 to
b43cb48
Compare
Hooray! CodSpeed harness just leveled up!The base and head of this comparison were measured with different runner settings, so their benchmark values are not directly comparable. What changed between base and head:
Re-run the base with the same settings to get a valid performance comparison. Comparing Footnotes |
d52092f to
03d5dc9
Compare
| is a machine-readable file and users are encouraged to read the ERT log instead. | ||
| Output from hooks that run before the experiment is created, such as | ||
| :code:`PRE_EXPERIMENT`, is held back and written once the storage is created. | ||
| :code:`PRE_EXPERIMENT`, is held back and written once the experiment exists. |
There was a problem hiding this comment.
isn't this equivalent to storage is created?
There was a problem hiding this comment.
Storage is created before the experiment is created in it, and run_workflows uses experiment = ensemble.experiment if ensemble is not None else None. So I just thought experiment was more fitting
|
|
||
| self.setLayout(layout) | ||
|
|
||
| def _current_tab_changed(self, index: int) -> None: |
There was a problem hiding this comment.
this loads events every time we click. What about cached property? Maybe the data is not big though and it is fine.
| ).model_dump_json() | ||
|
|
||
|
|
||
| def test_that_the_workflows_tab_shows_the_output_stored_for_the_experiment( |
There was a problem hiding this comment.
Can these two tests be merge via parametrize?
There was a problem hiding this comment.
probably, but the asserts are very different, so imo its not cleaner.
xjules
left a comment
There was a problem hiding this comment.
This looks good only minor changes potentially to the test.
03d5dc9 to
ee44d7a
Compare
ee44d7a to
9b27b86
Compare
6c5dfc3 to
132ddc5
Compare
132ddc5 to
3ca47bf
Compare
3ca47bf to
44b2583
Compare
44b2583 to
52012b7
Compare
Workflow output is written to workflow_events.jsonl for every hooked workflow, but nothing could read it back, so output was only ever visible while the experiment was running. Add load_workflow_log_events, mirroring load_status_snapshot_event. An experiment that ran no workflows has no such file, which is not an error. Lines that fail to parse are skipped with a warning rather than discarding the file: an interrupted ERT can leave a half-written final line behind, and the output written before it is still worth showing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
WorkflowLogWidget could only be filled one event at a time, which suits a running experiment but not a stored one, where every event is known up front and rebuilding the iteration selector per event is wasteful. Add load_events to fill it in one go, and WorkflowLogView to wrap it with a placeholder for experiments that ran no workflows. The view reads a given path at most once, so the owning tab can load lazily without re-reading every time it is selected. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Workflow output could only be seen while an experiment was running. Add a Workflows tab to the experiment in Manage experiments so it can be read again afterwards, showing the same table the run dialog does. The tab sits at experiment level rather than ensemble level because PRE_EXPERIMENT and POST_EXPERIMENT hooks belong to no single iteration, and the widget already filters by iteration itself. Events are read when the tab is first opened rather than when the experiment is selected, so browsing experiments stays cheap. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Same as the WorkflowLogWidget names removed upstream: nothing looks this one up either. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
52012b7 to
5f2b321
Compare

Issue
Resolves #14279
Approach
Events are written in json on experiment level in storage.
when an experiment is selected in the "manage experiment" tab, we load the data and populate the same workflows window used when viewing a running experiment.
git rebase -i main --exec 'just rapid-tests')When applicable
merge screenshot-PR in ert-testdata before merging this PR.