From 56ae36b2dfdffbf073d14fc94fcf7fd86beb2ae8 Mon Sep 17 00:00:00 2001 From: "Yngve S. Kristiansen" Date: Tue, 10 Sep 2024 09:39:17 +0200 Subject: [PATCH] (Everest) Use one experiment per optimization --- src/ert/simulator/batch_simulator.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/ert/simulator/batch_simulator.py b/src/ert/simulator/batch_simulator.py index cf6438c73f8..75bf8d0474b 100644 --- a/src/ert/simulator/batch_simulator.py +++ b/src/ert/simulator/batch_simulator.py @@ -9,7 +9,7 @@ from .batch_simulator_context import BatchContext if TYPE_CHECKING: - from ert.storage import Ensemble, Storage + from ert.storage import Ensemble, Experiment class BatchSimulator: @@ -165,7 +165,7 @@ def start( self, case_name: str, case_data: List[Tuple[int, Dict[str, Dict[str, Any]]]], - storage: Storage, + experiment: Experiment, ) -> BatchContext: """Start batch simulation, return a simulation context @@ -224,13 +224,7 @@ def start( time, so when you have called the 'start' method you need to let that batch complete before you start a new batch. """ - experiment = storage.create_experiment( - parameters=self.ert_config.ensemble_config.parameter_configuration, - responses=self.ert_config.ensemble_config.response_configuration, - name=f"experiment_{case_name}", - ) - ensemble = storage.create_ensemble( - experiment.id, + ensemble = experiment.create_ensemble( name=case_name, ensemble_size=self.ert_config.model_config.num_realizations, )