Skip to content

Commit

Permalink
Use baserunmodel in test_egg_simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
yngve-sk authored and andreas-el committed Oct 25, 2024
1 parent 78890c9 commit da45b44
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions tests/everest/test_egg_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import everest
from ert.config import ErtConfig, QueueSystem
from ert.config.parsing import ConfigKeys as ErtConfigKeys
from ert.ensemble_evaluator import EvaluatorServerConfig
from ert.run_models.everest_run_model import EverestRunModel
from everest.config import EverestConfig
from everest.config.export_config import ExportConfig
from everest.config_keys import ConfigKeys
Expand Down Expand Up @@ -693,12 +695,12 @@ def sweetcallbackofmine(self, *args, **kwargs):
self.called = True

cbtracker = CBTracker()
workflow = everest.suite._EverestWorkflow(
config=config, simulation_callback=cbtracker.sweetcallbackofmine
)
assert workflow is not None
with PluginSiteConfigEnv():
workflow.start_optimization()
run_model = EverestRunModel.create(
config, simulation_callback=cbtracker.sweetcallbackofmine
)
evaluator_server_config = EvaluatorServerConfig()
run_model.run_experiment(evaluator_server_config)

assert cbtracker.called
# TODO: The comparison is currently disabled because we know it would
Expand Down Expand Up @@ -819,12 +821,12 @@ def sweetcallbackofmine(self, *args, **kwargs):
self.called = True

cbtracker = CBTracker()
workflow = everest.suite._EverestWorkflow(
config=config, simulation_callback=cbtracker.sweetcallbackofmine
)
assert workflow is not None
with PluginSiteConfigEnv():
workflow.start_optimization()
run_model = EverestRunModel.create(
config, simulation_callback=cbtracker.sweetcallbackofmine
)
evaluator_server_config = EvaluatorServerConfig()
run_model.run_experiment(evaluator_server_config)

assert cbtracker.called

Expand Down

0 comments on commit da45b44

Please sign in to comment.