Skip to content

Commit

Permalink
Make work with export
Browse files Browse the repository at this point in the history
  • Loading branch information
yngve-sk committed Dec 19, 2024
1 parent 4d32b9e commit 3c74f6d
Show file tree
Hide file tree
Showing 3 changed files with 232 additions and 156 deletions.
6 changes: 3 additions & 3 deletions src/ert/run_models/everest_run_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
)

import numpy as np
from seba_sqlite import SqliteStorage, sqlite_storage
from numpy import float64
from numpy._typing import NDArray
from ropt.enums import EventType, OptimizerExitCode
from ropt.evaluator import EvaluatorContext, EvaluatorResult
from ropt.plan import BasicOptimizer
from ropt.plan import Event as OptimizerEvent
from seba_sqlite import SqliteStorage, sqlite_storage
from typing_extensions import TypedDict

from _ert.events import EESnapshot, EESnapshotUpdate, Event
Expand Down Expand Up @@ -130,7 +130,7 @@ def __call__(self) -> str | None: ...


@dataclass
class OptimalResult:
class OptimalResult: # noqa

Check failure on line 133 in src/ert/run_models/everest_run_model.py

View workflow job for this annotation

GitHub Actions / type-checking (3.12)

Name "OptimalResult" already defined (possibly by an import)
batch: int
controls: list[Any]
total_objective: float
Expand Down Expand Up @@ -297,7 +297,7 @@ def run_experiment(

# Seems ROPT batches are 1-indexed now,
# whereas seba has its own 0-indexed counter.
assert self._result == optimal_result_from_everstorage
assert self._result.__dict__ == optimal_result_from_everstorage.__dict__

self._exit_code = (
"max_batch_num_reached"
Expand Down
Loading

0 comments on commit 3c74f6d

Please sign in to comment.