Skip to content

Commit

Permalink
(Everest) Use one experiment per optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
Yngve S. Kristiansen committed Sep 10, 2024
1 parent 89a114c commit 6d8e307
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/ert/simulator/batch_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -224,12 +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(
ensemble = experiment.create_ensemble(

Check failure on line 227 in src/ert/simulator/batch_simulator.py

View workflow job for this annotation

GitHub Actions / type-checking (3.12)

"create_ensemble" of "LocalExperiment" gets multiple values for keyword argument "ensemble_size"
experiment.id,

Check failure on line 228 in src/ert/simulator/batch_simulator.py

View workflow job for this annotation

GitHub Actions / type-checking (3.12)

Argument 1 to "create_ensemble" of "LocalExperiment" has incompatible type "UUID"; expected "int"
name=case_name,
ensemble_size=self.ert_config.model_config.num_realizations,
Expand Down

0 comments on commit 6d8e307

Please sign in to comment.