Skip to content

Commit

Permalink
(fixup) oops
Browse files Browse the repository at this point in the history
  • Loading branch information
yngve-sk committed Oct 15, 2024
1 parent d88c498 commit 2dc3f14
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/everest/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from everest.optimizer.everest2ropt import everest2ropt
from everest.plugins.site_config_env import PluginSiteConfigEnv
from everest.simulator import Simulator
from everest.simulator.everest_to_ert import everest_to_ert_config
from everest.strings import EVEREST, SIMULATOR_END, SIMULATOR_START, SIMULATOR_UPDATE
from everest.util import makedirs_if_needed

Expand Down Expand Up @@ -389,18 +390,19 @@ def start_optimization(self):
of this method will probably lead to a crash
"""
assert self._monitor_thread is None
ert_config = everest_to_ert_config(self._config)

with open_storage(self.ert_config.ens_path, mode="w") as storage:
with open_storage(ert_config.ens_path, mode="w") as storage:
# Initialize the Everest simulator:
experiment = storage.create_experiment(
name=f"EnOpt@{datetime.datetime.now().strftime('%Y-%m-%d@%H:%M:%S')}",
parameters=self.ert_config.ensemble_config.parameter_configuration,
responses=self.ert_config.ensemble_config.response_configuration,
parameters=ert_config.ensemble_config.parameter_configuration,
responses=ert_config.ensemble_config.response_configuration,
)

simulator = Simulator(
self.config,
self.ert_config,
ert_config,
storage,
experiment,
callback=self._simulation_callback,
Expand Down

0 comments on commit 2dc3f14

Please sign in to comment.