saealib.execution.AsyncEvaluationScheduler#
- class saealib.execution.AsyncEvaluationScheduler(evaluator, *, max_pending=1, max_reserved_fe=None, max_reserved_cost=None, timeout=None, retry_limit=0, feedback_builder=None, algorithm=None, callback_manager=None)[ソース]#
ベースクラス:
objectCoordinate asynchronous requests and serialized state mutation.
- パラメータ:
evaluator (Evaluator)
max_pending (int)
max_reserved_fe (int | None)
max_reserved_cost (float | None)
timeout (float | None)
retry_limit (int)
feedback_builder (FeedbackBuilder | None)
algorithm (Any)
callback_manager (Any)
Methods
Cancel a pending request and commit its terminal update. |
|
Save pending state only when the evaluator can reattach it. |
|
Return the scheduler contract and its evaluator part. |
|
Enable delivery through a compiler-inserted accumulator. |
|
Return candidate IDs reserved by pending requests. |
|
Collect completed work and commit updates serially. |
|
Collect completed work and report whether this call made progress. |
|
Rebuild runtime handles for checkpointed requests. |
|
Return reserved estimated cost. |
|
Return reserved candidate count. |
|
Submit disjoint requests within capacity and budget limits. |
Method Details
- AsyncEvaluationScheduler.__init__(evaluator, *, max_pending=1, max_reserved_fe=None, max_reserved_cost=None, timeout=None, retry_limit=0, feedback_builder=None, algorithm=None, callback_manager=None)[ソース]#
- パラメータ:
evaluator (Evaluator)
max_pending (int)
max_reserved_fe (int | None)
max_reserved_cost (float | None)
timeout (float | None)
retry_limit (int)
feedback_builder (FeedbackBuilder | None)
algorithm (Any)
callback_manager (Any)
- 戻り値の型:
None
- AsyncEvaluationScheduler.cancel(state, request_id)[ソース]#
Cancel a pending request and commit its terminal update.
- パラメータ:
state (OptimizationState)
request_id (int)
- 戻り値の型:
OptimizationState
- AsyncEvaluationScheduler.checkpoint(state, path)[ソース]#
Save pending state only when the evaluator can reattach it.
- パラメータ:
state (OptimizationState)
path (str)
- 戻り値の型:
None
- AsyncEvaluationScheduler.contract()[ソース]#
Return the scheduler contract and its evaluator part.
- 戻り値の型:
- AsyncEvaluationScheduler.enable_feedback_accumulator()[ソース]#
Enable delivery through a compiler-inserted accumulator.
- 戻り値の型:
None
- AsyncEvaluationScheduler.pending_candidate_ids(state)[ソース]#
Return candidate IDs reserved by pending requests.
- パラメータ:
state (OptimizationState)
- 戻り値の型:
np.ndarray
- AsyncEvaluationScheduler.poll(state, *, wait=False)[ソース]#
Collect completed work and commit updates serially.
- パラメータ:
state (OptimizationState)
wait (bool)
- 戻り値の型:
OptimizationState
- AsyncEvaluationScheduler.poll_result(state, *, wait=False)[ソース]#
Collect completed work and report whether this call made progress.
- パラメータ:
state (OptimizationState)
wait (bool)
- 戻り値の型:
- AsyncEvaluationScheduler.reattach(state)[ソース]#
Rebuild runtime handles for checkpointed requests.
- パラメータ:
state (OptimizationState)
- 戻り値の型:
OptimizationState
- AsyncEvaluationScheduler.reserved_cost(state)[ソース]#
Return reserved estimated cost.
- パラメータ:
state (OptimizationState)
- 戻り値の型:
float
- AsyncEvaluationScheduler.reserved_fe(state)[ソース]#
Return reserved candidate count.
- パラメータ:
state (OptimizationState)
- 戻り値の型:
int
- AsyncEvaluationScheduler.submit(state, requests)[ソース]#
Submit disjoint requests within capacity and budget limits.
- パラメータ:
state (OptimizationState)
requests (Iterable[EvaluationRequest])
- 戻り値の型:
OptimizationState