saealib.Evaluator#

class saealib.Evaluator[ソース]#

ベースクラス: ABC

Base class for batch evaluators.

Methods

__init__

acknowledge

Acknowledge one contiguous update sequence.

can_reattach

Return whether pending work can be restored after checkpoint load.

cancel

Cancel submitted work when the backend supports cancellation.

collect

Return unacknowledged updates for a handle.

contract

Return the evaluator family contract.

detach

Detach work whose result must no longer be delivered.

evaluate_batch

Evaluate a batch of design vectors.

evaluate_request

Evaluate a request, including its public metadata boundary.

has_partial_lifecycle_override

Return whether lifecycle adapter methods are only partly overridden.

reattach

Restore a pending request or raise when unsupported.

submit

Submit a request through the synchronous adapter.

supports_batch_rollback

Return whether failed batch submission can be rolled back.

Method Details

Evaluator.__init__()#
Evaluator.acknowledge(handle, sequence)[ソース]#

Acknowledge one contiguous update sequence.

パラメータ:
戻り値の型:

None

Evaluator.can_reattach(pending)[ソース]#

Return whether pending work can be restored after checkpoint load.

パラメータ:

pending (PendingEvaluation)

戻り値の型:

bool

Evaluator.cancel(handle)[ソース]#

Cancel submitted work when the backend supports cancellation.

パラメータ:

handle (EvaluationHandle)

戻り値の型:

bool

Evaluator.collect(handle, *, wait=True)[ソース]#

Return unacknowledged updates for a handle.

パラメータ:
戻り値の型:

list[EvaluationUpdate]

Evaluator.contract()[ソース]#

Return the evaluator family contract.

戻り値の型:

ComponentContract

Evaluator.detach(handle)[ソース]#

Detach work whose result must no longer be delivered.

パラメータ:

handle (EvaluationHandle)

戻り値の型:

bool

abstractmethod Evaluator.evaluate_batch(x, problem)[ソース]#

Evaluate a batch of design vectors.

パラメータ:
  • x (np.ndarray) -- Design vectors to evaluate. shape = (n, dim)

  • problem (Problem) -- The optimization problem providing the objective and constraints.

戻り値:

Batched objective values, raw constraint values, and violations.

戻り値の型:

EvaluationResult

Evaluator.evaluate_request(request, problem)[ソース]#

Evaluate a request, including its public metadata boundary.

パラメータ:
戻り値の型:

EvaluationResult

classmethod Evaluator.has_partial_lifecycle_override()[ソース]#

Return whether lifecycle adapter methods are only partly overridden.

戻り値の型:

bool

Evaluator.reattach(pending, problem)[ソース]#

Restore a pending request or raise when unsupported.

パラメータ:
戻り値の型:

EvaluationHandle

Evaluator.submit(request, problem)[ソース]#

Submit a request through the synchronous adapter.

パラメータ:
戻り値の型:

EvaluationHandle

Evaluator.supports_batch_rollback()[ソース]#

Return whether failed batch submission can be rolled back.

戻り値の型:

bool