saealib.AsyncEvaluator#
- class saealib.AsyncEvaluator(evaluator=None, *, max_workers=1)[ソース]#
ベースクラス:
EvaluatorThread-backed asynchronous evaluator.
- パラメータ:
evaluator (Evaluator | None)
max_workers (int)
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
- AsyncEvaluator.__init__(evaluator=None, *, max_workers=1)[ソース]#
- パラメータ:
evaluator (Evaluator | None)
max_workers (int)
- 戻り値の型:
None
- AsyncEvaluator.acknowledge(handle, sequence)[ソース]#
Acknowledge one asynchronous update.
- パラメータ:
handle (EvaluationHandle)
sequence (int)
- 戻り値の型:
None
- AsyncEvaluator.can_reattach(pending)#
Return whether pending work can be restored after checkpoint load.
- パラメータ:
pending (PendingEvaluation)
- 戻り値の型:
bool
- AsyncEvaluator.cancel(handle)[ソース]#
Cancel work that has not started.
- パラメータ:
handle (EvaluationHandle)
- 戻り値の型:
bool
- AsyncEvaluator.collect(handle, *, wait=True)[ソース]#
Collect one completed update, optionally without waiting.
- パラメータ:
handle (EvaluationHandle)
wait (bool)
- 戻り値の型:
list[EvaluationUpdate]
- AsyncEvaluator.contract()#
Return the evaluator family contract.
- 戻り値の型:
- AsyncEvaluator.detach(handle)[ソース]#
Detach a running future and discard its eventual result.
- パラメータ:
handle (EvaluationHandle)
- 戻り値の型:
bool
- AsyncEvaluator.evaluate_batch(x, problem)[ソース]#
Evaluate one batch on the wrapped evaluator.
- パラメータ:
x (GenomeBatch | np.ndarray)
problem (Problem)
- 戻り値の型:
- AsyncEvaluator.evaluate_request(request, problem)#
Evaluate a request, including its public metadata boundary.
- パラメータ:
request (EvaluationRequest)
problem (Problem)
- 戻り値の型:
- classmethod AsyncEvaluator.has_partial_lifecycle_override()#
Return whether lifecycle adapter methods are only partly overridden.
- 戻り値の型:
bool
- AsyncEvaluator.reattach(pending, problem)#
Restore a pending request or raise when unsupported.
- パラメータ:
pending (PendingEvaluation)
problem (Problem)
- 戻り値の型:
- AsyncEvaluator.submit(request, problem)[ソース]#
Submit work without blocking the caller.
- パラメータ:
request (EvaluationRequest)
problem (Problem)
- 戻り値の型: