Skip to content
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

Combine datasets & refactor observations to response configs #7563

Merged
merged 2 commits into from
May 28, 2024

Conversation

yngve-sk
Copy link
Contributor

@yngve-sk yngve-sk commented Apr 4, 2024

squash of #7495

Requires change in semeio: equinor/semeio#609

Copy link
Collaborator

@oyvindeide oyvindeide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still have a bit to go through, so some comments as I go along

src/ert/config/observations.py Outdated Show resolved Hide resolved
src/ert/dark_storage/common.py Outdated Show resolved Hide resolved
src/ert/dark_storage/endpoints/records.py Outdated Show resolved Hide resolved
src/ert/storage/local_ensemble.py Outdated Show resolved Hide resolved
src/ert/storage/local_ensemble.py Outdated Show resolved Hide resolved
src/ert/storage/local_ensemble.py Outdated Show resolved Hide resolved
tests/integration_tests/analysis/test_es_update.py Outdated Show resolved Hide resolved
@yngve-sk yngve-sk force-pushed the combine-ds-obs-squash branch 7 times, most recently from 2502dbf to 5519238 Compare April 5, 2024 11:47
@yngve-sk yngve-sk force-pushed the combine-ds-obs-squash branch 21 times, most recently from 5225777 to 01d711c Compare April 9, 2024 08:24
@yngve-sk yngve-sk requested a review from oyvindeide May 8, 2024 09:34
@yngve-sk yngve-sk force-pushed the combine-ds-obs-squash branch 5 times, most recently from d909193 to df528bf Compare May 21, 2024 06:54
@@ -39,8 +39,8 @@ def poly_template(monkeypatch):
yield folder


@pytest.mark.flaky(reruns=5)
@pytest.mark.limit_memory("130 MB")
# @pytest.mark.flaky(reruns=5)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not need flaky marker anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems not AFAIK, at least it hasn't been failing with the marker commented out

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it should be removed and not commented out

@yngve-sk yngve-sk force-pushed the combine-ds-obs-squash branch 3 times, most recently from 3125a80 to 01b4537 Compare May 24, 2024 07:49
@yngve-sk yngve-sk requested a review from oyvindeide May 24, 2024 08:24
@eivindjahren
Copy link
Contributor

closes #5065

@eivindjahren eivindjahren reopened this May 24, 2024
@yngve-sk yngve-sk force-pushed the combine-ds-obs-squash branch 5 times, most recently from 052226f to 45c2569 Compare May 27, 2024 12:50
Copy link
Collaborator

@oyvindeide oyvindeide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Really good job, thanks for your patience in a long review! I have some minor comments left, but just look at them and force push.

@@ -191,7 +191,6 @@ def _currentItemChanged(
response_name = observation_ds.attrs["response"]
response_ds = self._ensemble.load_responses(
response_name,
tuple(self._ensemble.get_realization_list_with_responses()),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing in None implicitly requests all realizations, so this was a bit redundant

Comment on lines 711 to 712
run_context.ensemble.unify_parameters()
run_context.ensemble.unify_responses()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these be in self.run_ensemble_evaluator instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work so yes

@@ -272,6 +272,10 @@ def close(self) -> None:
the storage.
"""

for ens in self._ensembles.values():
ens.unify_responses()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to check that we have write permission here

migrations = list(enumerate([to2, to3, to4, to5, to6], start=1))
print(f"Found storage with version: {version} at: {self.path}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove print

@@ -574,3 +582,5 @@ def _migrate_gen_kw(
}
)
ensemble.save_parameters(block.name, block.realization_index, dataset)

ensemble.unify_parameters()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call this once at the end instead?

@pytest.mark.parametrize(
"ert_version",
[
"8.4.9",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few new were just added, should also include them

@@ -39,8 +39,8 @@ def poly_template(monkeypatch):
yield folder


@pytest.mark.flaky(reruns=5)
@pytest.mark.limit_memory("130 MB")
# @pytest.mark.flaky(reruns=5)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it should be removed and not commented out

[datetime(2014, 9, 9)],
[datetime(2014, 9, 9)],
[datetime(2017, 9, 9)],
[datetime(2014, 1, 22)],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changed because of the ordering of keys?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, it seems to work with the old times also, so I'm just reverting it back to what it was

@@ -95,6 +97,7 @@ def test_migrate_case(data, storage, enspath):
bf.migrate_case(storage, enspath / "default", stack)

ensemble = storage.get_ensemble_by_name("default")
ensemble.unify_parameters()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically these are not needed now?

@yngve-sk yngve-sk force-pushed the combine-ds-obs-squash branch from b2a7932 to e876662 Compare May 28, 2024 06:11
@yngve-sk yngve-sk force-pushed the combine-ds-obs-squash branch from e876662 to dd60aeb Compare May 28, 2024 06:32
@yngve-sk yngve-sk merged commit a5273b5 into equinor:main May 28, 2024
36 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants