Skip to content

Optimization Workflows

ropt.workflow

Optimization workflow functionality.

ropt.workflow.create_compute_step

create_compute_step(
    method: str, **kwargs: Any
) -> ComputeStep

Create a new compute step.

Parameters:

Name Type Description Default
method str

The method string to find the compute step.

required
kwargs Any

Optional keyword arguments passed to the compute step init.

{}

Returns:

Type Description
ComputeStep

The new compute step.

ropt.workflow.create_event_handler

create_event_handler(
    method: str, **kwargs: Any
) -> EventHandler

Create a new event handler.

Parameters:

Name Type Description Default
method str

The method string to find the handler.

required
kwargs Any

Optional keyword arguments passed to the handler init.

{}

Returns:

Type Description
EventHandler

The new event handler.

ropt.workflow.create_evaluator

create_evaluator(method: str, **kwargs: Any) -> Evaluator

Create a new evaluator.

Parameters:

Name Type Description Default
method str

The method string to find the evaluator.

required
kwargs Any

Optional keyword arguments passed to the evaluator init.

{}

Returns:

Type Description
Evaluator

The new evaluator.

ropt.workflow.create_server

create_server(method: str, **kwargs: Any) -> Server

Create a new server.

Parameters:

Name Type Description Default
method str

The method string to find the server.

required
kwargs Any

Optional keyword arguments passed to the server init.

{}

Returns:

Type Description
Server

The new server.

ropt.workflow.Event dataclass

Stores data related to an optimization event.

During the execution of an optimization workflow, events are triggered to signal specific occurrences. Callbacks can be registered to react to these events and will receive an Event object containing relevant information.

The specific data within the Event object varies depending on the event type. See the EventType documentation for details.

Attributes:

Name Type Description
event_type EventType

The type of event that occurred.

data dict[str, Any]

A dictionary containing additional event-specific data.