Skip to content

Commit

Permalink
fixup! Combine responses across realizations
Browse files Browse the repository at this point in the history
  • Loading branch information
yngve-sk committed Nov 26, 2024
1 parent d3e8b2f commit a24e6db
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tests/ert/unit_tests/data/test_integration_data.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import os
import pathlib
from datetime import datetime

import numpy as np
import polars
import pytest

from ert.config import ErtConfig
Expand Down Expand Up @@ -164,12 +162,10 @@ def test_that_measured_data_gives_error_on_missing_response(snake_oil_case_stora
experiment = storage.get_experiment_by_name("ensemble-experiment")
ensemble = experiment.get_ensemble_by_name("default_0")

for real in range(ensemble.ensemble_size):
# .save_responses() does not allow for saving directly with an empty ds
ds_path = ensemble._realization_dir(real) / "summary.parquet"
smry_df = polars.read_parquet(ds_path)
os.remove(ds_path)
smry_df.clear().write_parquet(ds_path)
smry_df = ensemble.load_responses(
"summary", tuple(range(ensemble.ensemble_size))
)
smry_df.clear().write_parquet(ensemble.mount_point / "summary.parquet")

ensemble.load_responses.cache_clear()

Expand Down

0 comments on commit a24e6db

Please sign in to comment.