saealib.ThreadPoolEvaluator#
- saealib.ThreadPoolEvaluator#
alias of
AsyncEvaluator
Methods
Acknowledge one asynchronous update. |
|
Return whether pending work can be restored after checkpoint load. |
|
Cancel work that has not started. |
|
Release worker resources. |
|
Collect one completed update, optionally without waiting. |
|
Return the evaluator family contract. |
|
Detach a running future and discard its eventual result. |
|
Evaluate one batch on the wrapped evaluator. |
|
Evaluate a request, including its public metadata boundary. |
|
Return whether lifecycle adapter methods are only partly overridden. |
|
Restore a pending request or raise when unsupported. |
|
Submit work without blocking the caller. |
|
Return whether submitted futures can be detached. |
Method Details
- ThreadPoolEvaluator.__init__(evaluator=None, *, max_workers=1)#
- Parameters:
evaluator (Evaluator | None)
max_workers (int)
- Return type:
None
- ThreadPoolEvaluator.acknowledge(handle, sequence)#
Acknowledge one asynchronous update.
- Parameters:
handle (EvaluationHandle)
sequence (int)
- Return type:
None
- ThreadPoolEvaluator.can_reattach(pending)#
Return whether pending work can be restored after checkpoint load.
- Parameters:
pending (PendingEvaluation)
- Return type:
bool
- ThreadPoolEvaluator.cancel(handle)#
Cancel work that has not started.
- Parameters:
handle (EvaluationHandle)
- Return type:
bool
- ThreadPoolEvaluator.close()#
Release worker resources.
- Return type:
None
- ThreadPoolEvaluator.collect(handle, *, wait=True)#
Collect one completed update, optionally without waiting.
- Parameters:
handle (EvaluationHandle)
wait (bool)
- Return type:
list[EvaluationUpdate]
- ThreadPoolEvaluator.contract()#
Return the evaluator family contract.
- Return type:
- ThreadPoolEvaluator.detach(handle)#
Detach a running future and discard its eventual result.
- Parameters:
handle (EvaluationHandle)
- Return type:
bool
- ThreadPoolEvaluator.evaluate_batch(x, problem)#
Evaluate one batch on the wrapped evaluator.
- Parameters:
x (GenomeBatch | np.ndarray)
problem (Problem)
- Return type:
- ThreadPoolEvaluator.evaluate_request(request, problem)#
Evaluate a request, including its public metadata boundary.
- Parameters:
request (EvaluationRequest)
problem (Problem)
- Return type:
- classmethod ThreadPoolEvaluator.has_partial_lifecycle_override()#
Return whether lifecycle adapter methods are only partly overridden.
- Return type:
bool
- ThreadPoolEvaluator.reattach(pending, problem)#
Restore a pending request or raise when unsupported.
- Parameters:
pending (PendingEvaluation)
problem (Problem)
- Return type:
- ThreadPoolEvaluator.submit(request, problem)#
Submit work without blocking the caller.
- Parameters:
request (EvaluationRequest)
problem (Problem)
- Return type:
- ThreadPoolEvaluator.supports_batch_rollback()#
Return whether submitted futures can be detached.
- Return type:
bool