|
QDpy
|
Allocate fixed rung resources and promote by the latest measured niche. More...
Public Member Functions | |
| quotas (self) | |
| pending (self) | |
| trials (self) | |
| spent (self) | |
| reserved (self) | |
| ask (self) | |
| Reserve and return a ready evaluation, or return None. | |
| tell (self, request, result) | |
| Accept an outcome and release any promotions it enables. | |
| run (self, evaluate, *, executor=None, max_pending=1) | |
| Run the scheduler sequentially or with a caller-owned executor. | |
Allocate fixed rung resources and promote by the latest measured niche.
Run a descriptor-aware single-ladder adaptation of asynchronous halving.
Each group of eta completed requests at one rung unlocks a promotion
to the next rung. Eligible niches with fewer previous promotions go
first. Within that niche choose the best measured candidate. Reserve
the whole ladder's resources up front and charge each request in full.
When a rung cannot supply enough candidates, fill the next rung
with direct proposals. Only the highest fidelity populates the archive.
:param archive: Empty parentless best-only Grid or CVTGrid.
:param dimension: Number of real design coordinates.
:param fidelities: Strictly increasing positive integer resource costs.
:param budget: Total planned resource units, at least the highest cost.
:param eta: Minimum number of completed lower rung calls per promotion.
:param late_fraction: Fraction of promotion slots held until the
upstream rung finishes, so slower niches can still compete.
Keep at least one slot available to early results.
:param ind_domain: Common bounds for real coordinates.
:param propose: Optional callback (rng) for new genomes. By default
draw them uniformly within ind_domain.
:param seed: Seed for new proposals in scheduling order.
Definition at line 46 of file async_halving.py.
| qdpy.algorithms.async_halving.AsyncQDHalving.ask | ( | self | ) |
Reserve and return a ready evaluation, or return None.
Schedule the deepest ready promotion before starting new designs. A None result with pending tickets means more completions are needed. With no pending tickets, the planned evaluation slots are exhausted. Call ask and tell from the same coordinator.
Definition at line 160 of file async_halving.py.
| qdpy.algorithms.async_halving.AsyncQDHalving.pending | ( | self | ) |
Return outstanding tickets in submission order.
Definition at line 116 of file async_halving.py.
| qdpy.algorithms.async_halving.AsyncQDHalving.quotas | ( | self | ) |
Return the number of evaluation slots budgeted at each fidelity.
Definition at line 111 of file async_halving.py.
| qdpy.algorithms.async_halving.AsyncQDHalving.reserved | ( | self | ) |
Return resource units assigned to outstanding tickets.
Definition at line 131 of file async_halving.py.
| qdpy.algorithms.async_halving.AsyncQDHalving.run | ( | self, | |
| evaluate, | |||
| * | , | ||
| executor = None, | |||
| max_pending = 1 ) |
Run the scheduler sequentially or with a caller-owned executor.
Use evaluate(genome, fidelity) and return the full-fidelity archive. With a QDpy-supported executor consume first completions and dispatch new requests up to max_pending at a time. Evaluator exceptions are warned and charged as failed attempts. The caller owns the executor's lifetime.
Definition at line 215 of file async_halving.py.
| qdpy.algorithms.async_halving.AsyncQDHalving.spent | ( | self | ) |
Return completed resource units, including failed evaluations.
Definition at line 126 of file async_halving.py.
| qdpy.algorithms.async_halving.AsyncQDHalving.tell | ( | self, | |
| request, | |||
| result ) |
Accept an outcome and release any promotions it enables.
Record (scalar fitness, descriptors) or a failed evaluation (None). Pass back the ticket returned by ask. A malformed measurement raises and leaves the ticket pending so the caller can correct it or record a failure. Valid measurements outside the archive domain are charged.
Definition at line 184 of file async_halving.py.
| qdpy.algorithms.async_halving.AsyncQDHalving.trials | ( | self | ) |
Return attempted measurements in the order accepted by tell.
Definition at line 121 of file async_halving.py.