saealib.SerialEvaluator#

class saealib.SerialEvaluator[source]#

Bases: Evaluator

Default evaluator: evaluates each candidate sequentially.

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, using the problem's optional evaluation adapter.

evaluate_request

Evaluate a request while exposing its context to the adapter.

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

SerialEvaluator.__init__()#
SerialEvaluator.acknowledge(handle, sequence)#

Acknowledge one contiguous update sequence.

Parameters:
Return type:

None

SerialEvaluator.can_reattach(pending)#

Return whether pending work can be restored after checkpoint load.

Parameters:

pending (PendingEvaluation)

Return type:

bool

SerialEvaluator.cancel(handle)#

Cancel submitted work when the backend supports cancellation.

Parameters:

handle (EvaluationHandle)

Return type:

bool

SerialEvaluator.collect(handle, *, wait=True)#

Return unacknowledged updates for a handle.

Parameters:
Return type:

list[EvaluationUpdate]

SerialEvaluator.contract()#

Return the evaluator family contract.

Return type:

ComponentContract

SerialEvaluator.detach(handle)#

Detach work whose result must no longer be delivered.

Parameters:

handle (EvaluationHandle)

Return type:

bool

SerialEvaluator.evaluate_batch(x, problem)[source]#

Evaluate a batch, using the problem’s optional evaluation adapter.

Parameters:
  • x (GenomeBatch | np.ndarray)

  • problem (Problem)

Return type:

EvaluationResult

SerialEvaluator.evaluate_request(request, problem)[source]#

Evaluate a request while exposing its context to the adapter.

Parameters:
Return type:

EvaluationResult

classmethod SerialEvaluator.has_partial_lifecycle_override()#

Return whether lifecycle adapter methods are only partly overridden.

Return type:

bool

SerialEvaluator.reattach(pending, problem)#

Restore a pending request or raise when unsupported.

Parameters:
Return type:

EvaluationHandle

SerialEvaluator.submit(request, problem)#

Submit a request through the synchronous adapter.

Parameters:
Return type:

EvaluationHandle

SerialEvaluator.supports_batch_rollback()#

Return whether failed batch submission can be rolled back.

Return type:

bool