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

Make ahmanalysis not use libres facade #686

Merged
merged 7 commits into from
Feb 20, 2025

Conversation

yngve-sk
Copy link
Contributor

@yngve-sk yngve-sk commented Feb 5, 2025

Resolves #685

@yngve-sk yngve-sk force-pushed the stop-using-ertconfig-ahmanalysis branch 11 times, most recently from 3bd0524 to de659f8 Compare February 6, 2025 14:11
Copy link
Contributor

@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.

Looks good, have some comments

@yngve-sk yngve-sk force-pushed the stop-using-ertconfig-ahmanalysis branch from bd526dc to 05b1860 Compare February 11, 2025 07:58
@yngve-sk yngve-sk force-pushed the stop-using-ertconfig-ahmanalysis branch from 05b1860 to 69a6795 Compare February 11, 2025 09:01
Copy link
Contributor

@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! But can you also add an integration test where this runs from the ert cli?

@yngve-sk yngve-sk force-pushed the stop-using-ertconfig-ahmanalysis branch 2 times, most recently from d265001 to 4ef555f Compare February 19, 2025 09:39
Copy link
Contributor

@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! Some minor comments, also the tests are failing, but looks like some uv problem?


obs_keys = list(self.facade.get_observations().obs_vectors.keys())
key_map = _group_observations(self.facade, obs_keys, group_by)
if not workflow_args:
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this not default to empty list? If so, you can just have the else and skip this.

prior_name,
target_name,
prior_experiment = prior_ensemble.experiment
assert prior_ensemble is not None
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be above the previous line, and should give a better error message if we dont find an ensemble in storage.

@@ -51,7 +52,7 @@ def test_ahmanalysis_run(snake_oil_facade):
ks_df = pd.read_csv(output_dir / "ks.csv")
for keys in ks_df["Parameters"].tolist():
assert keys in parameters
assert ks_df.columns[1:].tolist() == group_obs
assert set(ks_df.columns[1:].tolist()) == set(group_obs)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The previous order is a bit arbitrary, and the All- usually come last in the dataframe as a consequence, I would opt for changing the test to be order agnostic rather than changing the order, though changing the order would be possible by sorting explicitly in make_obs_groups and then just putting those in there. Having the All* rows come last seems more sensible than a global sort to me at the moment.

@yngve-sk yngve-sk force-pushed the stop-using-ertconfig-ahmanalysis branch from 4ef555f to 44fcce3 Compare February 19, 2025 12:07
@yngve-sk yngve-sk force-pushed the stop-using-ertconfig-ahmanalysis branch from 44fcce3 to 3452b08 Compare February 19, 2025 12:15
@yngve-sk yngve-sk force-pushed the stop-using-ertconfig-ahmanalysis branch from 3452b08 to 5e2ab14 Compare February 19, 2025 12:53
@yngve-sk yngve-sk force-pushed the stop-using-ertconfig-ahmanalysis branch from 5e2ab14 to 1ef1f6e Compare February 19, 2025 14:06
@yngve-sk yngve-sk merged commit f3c3b5d into equinor:main Feb 20, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AHMAnalysis not working after ErtConfig change
2 participants