ert icon indicating copy to clipboard operation
ert copied to clipboard

Implement experiment interface in all run models

Open jondequinor opened this issue 2 years ago • 1 comments

The current interface is

class Experiment(Protocol):
    """The experiment protocol which all experiments must implement."""

    async def run(self, evaluator_server_config: "EvaluatorServerConfig") -> None:
        """Run the experiment to completion."""
        pass

    async def dispatch(self, event: CloudEvent, iter_: int) -> None:
        """Pass an event for iter_ to the experiment. The experiment will internalize
        the event and update its state."""
        pass

    # TODO: this is preliminary, see https://github.com/equinor/ert/issues/3407
    async def successful_realizations(self, iter_: int) -> int:
        pass

    @property
    def id_(self) -> str:
        """The id of the experiment."""
        pass

    @id_.setter
    def id_(self, value: str) -> None:
        """Set the id of the experiment. It should not be possible to set this
        more than once."""
        pass

jondequinor avatar May 23 '22 10:05 jondequinor

Majority of run models are now implementing this interface in this branch: https://github.com/jondequinor/ert/tree/complete-experiment-api

jondequinor avatar Jul 15 '22 09:07 jondequinor