diff --git a/src/everest/api/everest_data_api.py b/src/everest/api/everest_data_api.py index c6837ecda73..b56009c5467 100644 --- a/src/everest/api/everest_data_api.py +++ b/src/everest/api/everest_data_api.py @@ -157,10 +157,9 @@ def summary_values(self, batches=None, keys=None): simulations = self.simulations data_frames = [] storage = open_storage(self._config.storage_dir, "r") + experiment = next(storage.experiments) for batch_id in batches: - case_name = f"batch_{batch_id}" - experiment = storage.get_experiment_by_name(f"experiment_{case_name}") - ensemble = experiment.get_ensemble_by_name(case_name) + ensemble = experiment.get_ensemble_by_name(f"batch_{batch_id}") summary = ensemble.load_all_summary_data() if not summary.empty: columns = set(summary.columns) diff --git a/src/everest/bin/everload_script.py b/src/everest/bin/everload_script.py index 77a32668c86..4488eb48e35 100755 --- a/src/everest/bin/everload_script.py +++ b/src/everest/bin/everload_script.py @@ -185,11 +185,10 @@ def reload_data(ever_config: EverestConfig, backup_path=None) -> None: def _internalize_batch( ensemble_path: str, run_path_format: str, batch_id, batch_data ) -> None: - case_name = "batch_{}".format(batch_id) batch_size = batch_data.shape[0] with open_storage(ensemble_path, "w") as storage: - experiment = storage.get_experiment_by_name(f"experiment_{case_name}") - ensemble = experiment.get_ensemble_by_name(case_name) + experiment = next(storage.experiments) + ensemble = experiment.get_ensemble_by_name(f"batch_{batch_id}") active_realizations = list(range(batch_size)) LibresFacade.load_from_run_path(run_path_format, ensemble, active_realizations)