Skip to content

Commit

Permalink
Fix everest batch numbering (#9563)
Browse files Browse the repository at this point in the history
  • Loading branch information
verveerpj authored Dec 16, 2024
1 parent 0d10c5d commit d4e7b72
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ert/run_models/everest_run_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,18 +682,21 @@ def _slug(entity: str) -> str:
self._simulator_cache.add_simulation_results(
sim_idx, real_id, control_values, objectives, constraints
)
self.batch_id += 1

# Note the negative sign for the objective results. Everest aims to do a
# maximization, while the standard practice of minimizing is followed by
# ropt. Therefore we will minimize the negative of the objectives:
return EvaluatorResult(
evaluator_result = EvaluatorResult(
objectives=-objectives,
constraints=constraints,
batch_id=self.batch_id,
evaluation_ids=sim_ids,
)

self.batch_id += 1

return evaluator_result

def send_snapshot_event(self, event: Event, iteration: int) -> None:
super().send_snapshot_event(event, iteration)
if type(event) in (EESnapshot, EESnapshotUpdate):
Expand Down

0 comments on commit d4e7b72

Please sign in to comment.